-
Notifications
You must be signed in to change notification settings - Fork 700
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
Fixing rule checks for CMP-3034 #12686
base: master
Are you sure you want to change the base?
Conversation
Hi @rutvik23. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_security_profiles_operator_exists'.
--- xccdf_org.ssgproject.content_rule_security_profiles_operator_exists
+++ xccdf_org.ssgproject.content_rule_security_profiles_operator_exists
@@ -13,7 +13,7 @@
[warning]:
This rule's check operates on the cluster configuration dump.
-Therefore, you need to use a tool that can query the OCP API, retrieve the /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator-sub API endpoint to the local /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator-sub file.
+Therefore, you need to use a tool that can query the OCP API, retrieve the /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator API endpoint to the local /apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles/subscriptions/security-profiles-operator file.
[reference]:
SYS.1.6.A21
OCIL for rule 'xccdf_org.ssgproject.content_rule_security_profiles_operator_exists' differs.
--- ocil:ssg-security_profiles_operator_exists_ocil:questionnaire:1
+++ ocil:ssg-security_profiles_operator_exists_ocil:questionnaire:1
@@ -1,5 +1,5 @@
To check if the Security Profiles Operator is installed, run the following command:
-oc get sub -nopenshift-security-profiles security-profiles-operator-sub -ojsonpath='{.status.installedCSV}'
+oc get sub -nopenshift-security-profiles security-profiles-operator -ojsonpath='{.status.installedCSV}'
the output should return the version of the CSV that represents the installed operator.
Is it the case that the security profiles operator is not installed?
|
Code Climate has analyzed commit c0c5b35 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 60.9% (0.0% change). View more on Code Climate. |
Interesting, when installing through the web console, the Subscription CRD is named I think this needs to be adjusted in https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/security_and_compliance/security-profiles-operator#spo-installing-cli_spo-enabling as well. |
/test e2e-aws-ocp4-bsi |
/ok-to-test |
/test e2e-aws-ocp4-bsi |
@rutvik23: The following test 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-sigs/prow repository. I understand the commands that are listed here. |
Description:
The PCI-DSS compliance rule
ocp4-security-profiles-operator-exists
is not able to check existence of subscription object due to an extra suffix-sub
in the commandoc get subscription security-profiles-operator-sub -nopenshift-security-profiles -o jsonpath='{.status.installedCSV}'
, as well inside filepath:/apis/operators.coreos.com/v1alpha1/namespaces/openshift-security-profiles-sub/subscriptions/
Rationale:
Fixes CMP-3034
Review Hints:
ocp4-pci-dss-4-0/ocp4-pci-dss
profile scanocp4-security-profiles-operator-exists
ocp4-security-profiles-operator-exists