Ubuntu: Parse finding identifier from Ubuntu OSCAP report
Background
The Ubuntu OSCAP report is not formatted the same as the UBI reports, and one of the differences is the finding identifiers. In the Ubuntu report, CCI IDs can be found in the list of references with a url of https://public.cyber.mil/stigs/cci/
. These CCIs can be retrieved by finding all of these references for a given rule with
identifiers = [ref.text for ref in rule.findall(".//xccdf:reference[@href='https://public.cyber.mil/stigs/cci/']", n_set)]
As there can be more than one reference with this href, this is another difference from the UBI reports, as we never expect more than one identifier. This is related to issue #447 (closed)
AC
-
Update OCSAP code to retrieve the finding IDs from Ubuntu OSCAP reports. -
Update code to retrieve all identifiers found, and not a single ID