Bug 642672 - Rebase openscap for SCAP 1.1 functionality
Rebase openscap for SCAP 1.1 functionality
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openscap (Show other bugs)
6.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Peter Vrabec
Ondrej Moriš
: Rebase
: 578581 (view as bug list)
Depends On:
Blocks: 683579
  Show dependency treegraph
 
Reported: 2010-10-13 10:36 EDT by Steve Grubb
Modified: 2011-05-19 09:35 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
The openscap packages have been upgraded to upstream version 0.7.1, which provides a number of bug fixes and enhancements over the previous version. The most important changes include support for Open Vulnerability and Assessment Language (OVAL) version 5.6, new OpenSCAP API, and various memory and CPU optimizations.
Story Points: ---
Clone Of:
: 683579 (view as bug list)
Environment:
Last Closed: 2011-05-19 09:35:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
OVAL content with tests referencing multiple states (3.74 KB, application/xml)
2011-03-16 11:16 EDT, Ondrej Moriš
no flags Details
OVAL content with file_object using filepath (6.37 KB, application/xml)
2011-03-17 10:12 EDT, Ondrej Moriš
no flags Details
OVAL content with interface_object using type (2.43 KB, application/xml)
2011-03-17 10:43 EDT, Ondrej Moriš
no flags Details
OVAL content with pattern match operation on enumeration type (2.42 KB, application/xml)
2011-03-19 10:08 EDT, Ondrej Moriš
no flags Details
OVAL content with text in textfilecontent54_state (2.64 KB, application/xml)
2011-03-19 13:28 EDT, Ondrej Moriš
no flags Details

  None (edit)
Description Steve Grubb 2010-10-13 10:36:59 EDT
Description of problem:
The currently shipped version of openscap is a mostly complete version that meets SCAP 1.0 requirements. Currently, NIST is certifying SCAP 1.1 tools. So, we need to update openscap so that it could be certified under NIST's 1.1 requirements. This means: 

Completing support for all required elements in all libraries
Updating OVAL to 5.6
Updating CPE to 2.2
Adding OCIL 2.0
Comment 2 Steve Grubb 2010-11-16 14:58:04 EST
*** Bug 578581 has been marked as a duplicate of this bug. ***
Comment 13 Ondrej Moriš 2011-03-16 11:16:03 EDT
Created attachment 485765 [details]
OVAL content with tests referencing multiple states
Comment 15 Ondrej Moriš 2011-03-17 10:12:45 EDT
Created attachment 486021 [details]
OVAL content with file_object using filepath
Comment 17 Ondrej Moriš 2011-03-17 10:43:26 EDT
Created attachment 486029 [details]
OVAL content with interface_object using type
Comment 20 Ondrej Moriš 2011-03-19 10:07:05 EDT
> * https://bugzilla.redhat.com/show_bug.cgi?id=669701

It seems that this is not working properly, see attached enum-pattern-match.xml, it contains '<type operation="pattern match">ARPHRD_.*</type>':

# oscap oval eval enum-pattern-match.xml
1 1840 In file 'enum-pattern-match.xml' on line 48: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#unix}type': [facet 'enumeration'] The value 'ARPHRD_.*' is not an element of the set {'ARPHRD_ETHER', 'ARPHRD_FDDI', 'ARPHRD_LOOPBACK', 'ARPHRD_VOID', 'ARPHRD_PPP', 'ARPHRD_SLIP', 'ARPHRD_PRONET', ''}.
1 1824 In file 'enum-pattern-match.xml' on line 48: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5#unix}type': 'ARPHRD_.*' is not a valid value of the local atomic type.
oscap was unable to validate the XML document you provided.
Please ensure that the XML document is valid and well-formed, and try again.

Validation failed. If I understand it well, interface type is an enumeration and in the latest openscap (more precisely, in the 5.6 language) it should be possible to specify a value from enumeration by a pattern.
Comment 21 Ondrej Moriš 2011-03-19 10:08:30 EDT
Created attachment 486378 [details]
OVAL content with pattern match operation on enumeration type
Comment 23 Ondrej Moriš 2011-03-19 13:28:39 EDT
Created attachment 486392 [details]
OVAL content with text in textfilecontent54_state
Comment 24 Peter Vrabec 2011-03-21 17:35:00 EDT
hey Ondrej,

this seems to be a bug in official OVAL schemas. We will examines schemas and see if it's possible to fix them. But I hope this is not a blocker. 

btw. I have implemented new option called "--skip-valid" for oscap tool. This might be very helpful for you and other people when validation does not work properly (libxml2 issue or wrong schemas).

If I evaluate your content, I get
$ ./oscap oval eval --skip-valid  /home/pvrabec/a//enum-pattern-match.xml
Definition oval:1:def:1: true

To get this option into RHEL6.1 would require errata respin. If we have some more issues to fix I would recommend to go this way. ;)


(In reply to comment #20)
> > * https://bugzilla.redhat.com/show_bug.cgi?id=669701
> 
> It seems that this is not working properly, see attached
> enum-pattern-match.xml, it contains '<type operation="pattern
> match">ARPHRD_.*</type>':
> 
> # oscap oval eval enum-pattern-match.xml
> 1 1840 In file 'enum-pattern-match.xml' on line 48: Element
> '{http://oval.mitre.org/XMLSchema/oval-definitions-5#unix}type': [facet
> 'enumeration'] The value 'ARPHRD_.*' is not an element of the set
> {'ARPHRD_ETHER', 'ARPHRD_FDDI', 'ARPHRD_LOOPBACK', 'ARPHRD_VOID', 'ARPHRD_PPP',
> 'ARPHRD_SLIP', 'ARPHRD_PRONET', ''}.
> 1 1824 In file 'enum-pattern-match.xml' on line 48: Element
> '{http://oval.mitre.org/XMLSchema/oval-definitions-5#unix}type': 'ARPHRD_.*' is
> not a valid value of the local atomic type.
> oscap was unable to validate the XML document you provided.
> Please ensure that the XML document is valid and well-formed, and try again.
> 
> Validation failed. If I understand it well, interface type is an enumeration
> and in the latest openscap (more precisely, in the 5.6 language) it should be
> possible to specify a value from enumeration by a pattern.
Comment 25 Ondrej Moriš 2011-03-21 17:43:16 EDT
Great, thanks a lot for this clarification. Since all new features were verified successfully, updated self-test is passing and oscap is able to evaluate SRT OVAL contents, I am moving this bug into VERIFIED state.
Comment 26 Jaromir Hradilek 2011-05-02 12:28:48 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The openscap packages have been upgraded to upstream version 0.7.1, which provides a number of bug fixes and enhancements over the previous version. The most important changes include support for Open Vulnerability and Assessment Language (OVAL) version 5.6, new OpenSCAP API, and various memory and CPU optimizations.
Comment 27 errata-xmlrpc 2011-05-19 09:35:26 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0609.html

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