oscap command fails with "W: oscap: No bytes exported: xmlCode: -<high value>"

Solution Verified - Updated -

Issue

  • When executing a scan of the system, the command returns in error with some random negative value being printed in the error message, as shown in the example below

    # oscap xccdf eval --local-files scap-files --profile xccdf_org.ssgproject.content_profile_cis_server_l1 --results result.xml /usr/share/xml/scap/ssg/content/ssg-rhel8-ds-1.2.xml
    
    [...]
    
    W: oscap: No bytes exported: xmlCode: -1860719034.
    OpenSCAP Error: Could not save file: /tmp/oscap.5k51BR/ssg-rhel8-oval.xml.result.xml [/builddir/build/BUILD/openscap-1.3.10/src/XCCDF/xccdf_session.c:1757]
    

Environment

  • Red Hat Enterprise Linux 8 and 9
    • openscap-scanner
    • scap-security-guide

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content