RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2139060 - xmlfilecontent probe produces invalid OVAL results
Summary: xmlfilecontent probe produces invalid OVAL results
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: openscap
Version: 8.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jan Černý
QA Contact: Matus Marhefka
URL:
Whiteboard:
Depends On: 2138884 2176081
Blocks: 2165577 2165578 2165579
TreeView+ depends on / blocked
 
Reported: 2022-11-01 09:27 UTC by Jan Černý
Modified: 2023-05-16 10:09 UTC (History)
6 users (show)

Fixed In Version: openscap-1.3.7-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 2138884
: 2165577 2165578 2165579 (view as bug list)
Environment:
Last Closed: 2023-05-16 08:41:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-137943 0 None None None 2022-11-01 09:41:37 UTC
Red Hat Product Errata RHBA-2023:2892 0 None None None 2023-05-16 08:41:45 UTC

Description Jan Černý 2022-11-01 09:27:17 UTC
+++ This bug was initially created as a clone of Bug #2138884 +++

Description of problem:
During productization of ComplianceAsCode on 2022-10-31 (as of ComplianceAsCode upstream head 4b5551f) we have found that OpenSCAP produces invalid OVAL results.

Version-Release number of selected component (if applicable):

openscap-1.3.6-4.el8.x86_64

How reproducible:
deterministic.

Steps to Reproduce:
1.oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_ism_o --report xccdf_org.ssgproject.content_profile_ism_o.html --results-arf xccdf_org.ssgproject.content_profile_ism_o-xccdf-arf-results.xml --results xccdf_org.ssgproject.content_profile_ism_o-xccdf-results.xml --oval-results /tmp/ssg-rhel9-ds.xml
2. oscap oval validate --results --schematron /var/lib/libvirt/images/ism_o/ssg-rhel9-oval.xml.result.xml


Actual results:
OVAL results are invalid

File '/var/lib/libvirt/images/ism_o/ssg-rhel9-oval.xml.result.xml' line 65535: Element '{http://oval.mitre.org/XMLSchema/oval-system-characteristics-5#independent}value_of', attribute 'datatype': [facet 'enumeration'] The value '' is not an element of the set {'binary', 'boolean', 'evr_string', 'fileset_revision', 'float', 'ios_version', 'int', 'ipv4_address', 'ipv6_address', 'string', 'version'}.
OpenSCAP Error: Invalid OVAL Results (5.11) content in /var/lib/libvirt/images/ism_o/ssg-rhel9-oval.xml.result.xml. [/builddir/build/BUILD/openscap-1.3.6/src/source/oscap_source.c:353]

Notice the value_of element's attribute datatype:

79191           <ind-sys:xmlfilecontent_item id="105091439" status="does not exist">
79192             <ind-sys:filepath>/usr/lib/firewalld/zones/trusted.xml</ind-sys:filepath>
79193             <ind-sys:path>/usr/lib/firewalld/zones</ind-sys:path>
79194             <ind-sys:filename>trusted.xml</ind-sys:filename>
79195             <ind-sys:xpath>/zone/service[@name='ssh']</ind-sys:xpath>
79196             <ind-sys:value_of datatype="" status="does not exist"/>
79197           </ind-sys:xmlfilecontent_item>


Expected results:
valid OVAL results

Additional info:


This is caused by OVAL content in rule firewalld_sshd_port_enabled. This has been improved recently in ComplianceAsCode/content#9712

This has been also reported upstream: https://github.com/OpenSCAP/openscap/issues/1890

Comment 1 Jan Černý 2022-11-02 08:20:17 UTC
A patch has been proposed to upstream for discussion in https://github.com/OpenSCAP/openscap/pull/1891.

Comment 3 Jan Černý 2023-01-04 15:05:24 UTC
Fixed upstream in https://github.com/OpenSCAP/openscap/pull/1891

Comment 18 errata-xmlrpc 2023-05-16 08:41:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openscap bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2892


Note You need to log in before you can comment on or make changes to this bug.