-
Notifications
You must be signed in to change notification settings - Fork 743
implement support for multiple platforms connected with disjunction #6661
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
Conversation
|
Hello @vojtapolasek! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-03-24 18:34:08 UTC |
|
Changes identified: Show detailsRule chronyd_or_ntpd_set_maxpoll: Recommended tests to execute: |
12eb3ae to
d892420
Compare
|
Since there can be multiple platforms in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Do you think it makes sense to change at least one rule to have multiple platforms in this PR?
I guess good starting rules would be the chronyd_or_ntpd_*.
|
The rhel7 build needs to be fixed too, it looks like you are importing something not supported. |
In my opinion, keeping the This should be all valid. This way we don't need to change more than 300 files and we keep the old behavior. |
| platforms: | ||
| - ntp | ||
| - chrony |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely
[root@localhost ~]# oscap xccdf eval --profile _stig --rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll ./ssg-rhel7-ds.xml
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL7.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml'. Use '--fetch-remote-resources' option to download it.
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml' file which is referenced from datastream
WARNING: Skipping ./security-data-oval-com.redhat.rhsa-RHEL7.xml file which is referenced from XCCDF content
Title Configure Time Service Maxpoll Interval
Rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll
Ident CCE-80439-3
Result pass
[root@localhost ~]# yum remove ntp
Removed:
ntp.x86_64 0:4.2.6p5-29.el7_8.2
Complete!
[root@localhost ~]# oscap xccdf eval --profile _stig --rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll ./ssg-rhel7-ds.xml
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL7.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml'. Use '--fetch-remote-resources' option to download it.
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml' file which is referenced from datastream
WARNING: Skipping ./security-data-oval-com.redhat.rhsa-RHEL7.xml file which is referenced from XCCDF content
Title Configure Time Service Maxpoll Interval
Rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll
Ident CCE-80439-3
Result notapplicable
[root@localhost ~]# yum install chrony
Installed:
chrony.x86_64 0:3.4-1.el7
Complete!
^[[A[root@localhost oscap xccdf eval --profile _stig --rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll ./ssg-rhel7-ds.xml
WARNING: Datastream component 'scap_org.open-scap_cref_security-data-oval-com.redhat.rhsa-RHEL7.xml' points out to the remote 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml'. Use '--fetch-remote-resources' option to download it.
WARNING: Skipping 'https://www.redhat.com/security/data/oval/com.redhat.rhsa-RHEL7.xml' file which is referenced from datastream
WARNING: Skipping ./security-data-oval-com.redhat.rhsa-RHEL7.xml file which is referenced from XCCDF content
Title Configure Time Service Maxpoll Interval
Rule xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_set_maxpoll
Ident CCE-80439-3
Result pass
also change some conditions which check if platforms were actually defined, they were abusing fact that platforms were defined as lists
|
@vojtapolasek: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Description:
either
or
Rationale:
This PR is part of an initiative which plans to implement support for CPE applicability language. This support will allow content authors to specify more granular definition of rule applicability.