Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object_reference - OVAL check #3626

Closed
immortalday opened this issue Nov 27, 2018 · 2 comments
Closed

object_reference - OVAL check #3626

immortalday opened this issue Nov 27, 2018 · 2 comments
Labels
OVAL OVAL update. Related to the systems assessments.

Comments

@immortalday
Copy link

immortalday commented Nov 27, 2018

Hello,

how i can use <object_refence> when write check.

i try

...
 <unix:shadow_object id="object_test" version="1">
   <set >
       <object_reference>object_ref_my</object_reference>
       <filter>sts_my_filter</filter>
   </set>
 </unix:shadow_object>
...

but when i run testoval.py, i see next:

File '/tmp/shadow_pass7qW3KD.xml' line 33: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': [facet 'pattern'] The value 'object_ref_my' is not accepted by the pattern 'oval:[A-Za-z0-9_-.]+:obj:[1-9][0-9]*'.
File '/tmp/shadow_pass7qW3KD.xml' line 33: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': 'object_ref_my' is not a valid value of the atomic type '{http://oval.mitre.org/XMLSchema/oval-common-5}ObjectIDPattern'.
File '/tmp/shadow_pass7qW3KD.xml' line 33: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': Warning: No precomputed value available, the value was either invalid or something strange happend.
OpenSCAP Error: Invalid OVAL Definition (5.10) content in /tmp/shadow_pass7qW3KD.xml. [oscap_source.c:342]

UPD.

the build also fails

...
~]# oscap xccdf eval --profile test ssg-centos7-xccdf.xml
WARNING: This content points out to the remote resources. Use `--fetch-remote-resources' option to download them.
WARNING: Skipping https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml.bz2 file which is referenced from XCCDF content
OpenSCAP Error: File './ssg-rhel7-oval.xml' line 24130: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': [facet 'pattern'] The value 'object_ref_my' is not accepted by the pattern 'oval:[A-Za-z0-9_-.]+:obj:[1-9][0-9]*'.
[xccdf_session.c:614]
File './ssg-rhel7-oval.xml' line 24130: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': 'object_ref_myr' is not a valid value of the atomic type '{http://oval.mitre.org/XMLSchema/oval-common-5}ObjectIDPattern'.
[xccdf_session.c:614]
File './ssg-rhel7-oval.xml' line 24130: Element '{http://oval.mitre.org/XMLSchema/oval-definitions-5}object_reference': Warning: No precomputed value available, the value was either invalid or something strange happend.
[xccdf_session.c:614]
Invalid OVAL Definition (5.11) content in ./ssg-rhel7-oval.xml. [oscap_source.c:342]
Invalid XCCDF Checklist (1.1) content in ssg-rhel7-oval.xml [xccdf_session.c:1019]
...

@immortalday immortalday changed the title object_refence - OVAL check object_reference - OVAL check Nov 27, 2018
@yuumasato
Copy link
Member

Hello, I believe the problem is that your object id is not conforming to OVAL pattern id.
It should be like 'oval:[A-Za-z0-9_-.]+:obj:[1-9][0-9]*'. For example:
oval:object_ref_my:obj:1

@matusmarhefka matusmarhefka added the OVAL OVAL update. Related to the systems assessments. label Dec 6, 2018
@redhatrises
Copy link
Contributor

Closing as there is no further movement on this. Please re-open if needing further assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OVAL OVAL update. Related to the systems assessments.
Projects
None yet
Development

No branches or pull requests

4 participants