You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
With OpenSCAP v1.2.16 from the Ubuntu distribution, on SSG-built content, we get something like the following:
$ arf-to-graph ~/ssg-ubuntu2004-ds-1-arf.xml file_permissions_audit_configuration
Traceback (most recent call last):
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/xml_parser.py", line 45, in __init__
self.scan_definitions = _XmlParserScanDefinitions(
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/_xml_parser_oval_scan_definitions.py", line 9, in __init__
self.test_info_parser = _XmlParserTestInfo(report_data)
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/_xml_parser_test_info.py", line 20, in __init__
self.system_data = self._get_system_data()
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/_xml_parser_test_info.py", line 39, in _get_system_data
foritemin data:
TypeError: 'NoneType' object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line.py", line 30, in arf_to_graph
main(ArfToHtml(args))
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line_client/arf_to_html.py", line 8, in __init__
super().__init__(args)
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line_client/client_arf_input.py", line 10, in __init__
self.arf_xml_parser = XmlParser(self.source_filename)
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/xml_parser.py", line 48, in __init__
raise ValueError(
ValueError: This file "/home/cipherboy/ssg-ubuntu2004-ds-1-arf.xml" is not arf report file or there are no results
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/cipherboy/.local/bin/arf-to-graph", line 33, in<module>
sys.exit(load_entry_point('oval-graph', 'console_scripts', 'arf-to-graph')())
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line.py", line 32, in arf_to_graph
print_detail_traceback_if_verbose(args)
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line.py", line 24, in print_detail_traceback_if_verbose
if any(arg in args forargin ("-v", "--verbose")):
File "/home/cipherboy/GitHub/OpenSCAP/oval-graph/oval_graph/command_line.py", line 24, in<genexpr>if any(arg in args forargin ("-v", "--verbose")):
TypeError: argument of type'NoneType' is not iterable
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}oval_system_characteristics at 0x7fb36088cfc0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}generator at 0x7fb36088ce80>
<Element {http://oval.mitre.org/XMLSchema/oval-common-5}product_name at 0x7fb36088cdc0>
<Element {http://oval.mitre.org/XMLSchema/oval-common-5}product_version at 0x7fb36088ce40>
<Element {http://oval.mitre.org/XMLSchema/oval-common-5}schema_version at 0x7fb36088cf00>
<Element {http://oval.mitre.org/XMLSchema/oval-common-5}timestamp at 0x7fb36088cf80>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}system_info at 0x7fb360891040>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}os_name at 0x7fb360891080>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}os_version at 0x7fb3608910c0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}architecture at 0x7fb360891100>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}primary_host_name at 0x7fb360891140>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interfaces at 0x7fb36088cf40>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface at 0x7fb360891180>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface_name at 0x7fb3608911c0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}ip_address at 0x7fb360891200>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}mac_address at 0x7fb360891240>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface at 0x7fb360891280>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface_name at 0x7fb3608912c0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}ip_address at 0x7fb360891300>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}mac_address at 0x7fb360891340>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface at 0x7fb360891380>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface_name at 0x7fb3608913c0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}ip_address at 0x7fb360891400>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}mac_address at 0x7fb360891440>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface at 0x7fb360891480>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}interface_name at 0x7fb3608914c0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}ip_address at 0x7fb360891500>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}mac_address at 0x7fb360891540>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}collected_objects at 0x7fb360891580>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}object at 0x7fb36088cac0>
<Element {http://oval.mitre.org/XMLSchema/oval-system-characteristics-5}object at 0x7fb36088ca00>
Rule "xccdf_org.ssgproject.content_rule_file_permissions_audit_configuration" done!
Result is saved:"/tmp/graph-of-xccdf_org.ssgproject.content_rule_file_permissions_audit_configuration-02_07_2021-08_36_51.html"
And it just stops parsing the objects and stuff under it collected_objects before getting to system_data!
Hello @cipherboy,
I was unable to replicate the issue. Can you please provide an ARF report? I hope with the report, I can find out more about why part of the XML file is not processed.
@Honny1 Do you have any way of minimizing the ARF? I've pasted part of it above (see "Subset of ARF file"), but the file is still several hundred KB when gziped and is from our private CaC branch.
I'm wondering if it is perhaps a parsing issue caused by the older OpenSCAP?
@cipherboy I don't have any way of minimizing the ARF. You can put here the ARF file as a TXT file. Like in issue. Hundreds of KB are fine for Github.
I tried to generate graphs from ARF generated from content for Ubuntu 20.04 with OpenSCAP 1.2.7 and 1.2.6 and everything was fine. It is very strange that the system_data could not be found, even though they are in the report.
With OpenSCAP v1.2.16 from the Ubuntu distribution, on SSG-built content, we get something like the following:
In
_XmlParserTestInfo
I see:If I change it as so:
it works, but I'm wondering if this is the right result. Perhaps the element tree is corrupted/modified during loading?
Oddly, if I print the children of
oval-characteristics:oval_system_characteristics
I see:And it just stops parsing the objects and stuff under it collected_objects before getting to system_data!
Snippet of XML below:
Subset of ARF file
XMLLint runs fine on the output (and doesn't detect any dropped closing tags or anything), so I'm really confused.
The report generates fine once the
if not data
is added though:The text was updated successfully, but these errors were encountered: