Bug 642672

Summary: Rebase openscap for SCAP 1.1 functionality
Product: Red Hat Enterprise Linux 6 Reporter: Steve Grubb <sgrubb>
Component: openscapAssignee: Peter Vrabec <pvrabec>
Status: CLOSED ERRATA QA Contact: Ondrej Moriš <omoris>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0CC: omoris, tao
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 13:35:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 683579    
Attachments:
Description Flags
OVAL content with tests referencing multiple states
none
OVAL content with file_object using filepath
none
OVAL content with interface_object using type
none
OVAL content with pattern match operation on enumeration type
none
OVAL content with text in textfilecontent54_state none

Description Steve Grubb 2010-10-13 14:36:59 UTC
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 19:58:04 UTC
*** Bug 578581 has been marked as a duplicate of this bug. ***

Comment 13 Ondrej Moriš 2011-03-16 15:16:03 UTC
Created attachment 485765 [details]
OVAL content with tests referencing multiple states

Comment 15 Ondrej Moriš 2011-03-17 14:12:45 UTC
Created attachment 486021 [details]
OVAL content with file_object using filepath

Comment 17 Ondrej Moriš 2011-03-17 14:43:26 UTC
Created attachment 486029 [details]
OVAL content with interface_object using type

Comment 20 Ondrej Moriš 2011-03-19 14:07:05 UTC
> * 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 14:08:30 UTC
Created attachment 486378 [details]
OVAL content with pattern match operation on enumeration type

Comment 23 Ondrej Moriš 2011-03-19 17:28:39 UTC
Created attachment 486392 [details]
OVAL content with text in textfilecontent54_state

Comment 24 Peter Vrabec 2011-03-21 21:35:00 UTC
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 21:43:16 UTC
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 16:28:48 UTC
    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 13:35:26 UTC
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