-
Notifications
You must be signed in to change notification settings - Fork 706
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
fix xccdf_value substitution with dotnotation #12217
fix xccdf_value substitution with dotnotation #12217
Conversation
Hi @sluetze. 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. |
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
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.
Thanks,
there are extra spaces around the double curly braces that can be removed.
Since we are touching these lines, could you remove them?
applications/openshift/api-server/api_server_request_timeout/rule.yml
Outdated
Show resolved
Hide resolved
applications/openshift/authentication/oauth_inactivity_timeout/rule.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: Watson Yuuma Sato <wsato@redhat.com>
Code Climate has analyzed commit eda052c 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 59.4% (0.0% change). View more on Code Climate. |
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.
Thank you!
Description:
fix xccdf_variable substitution with dotnotation
Rationale:
there are multiple rules which use xccdf_value notation to refer to variables in the
ocil
field. these result in an empty string in the compliance operator. example in the case ofapi_server_request_timeout
api_server_request_timeout
defines the variablevar_api_min_request_timeout
this results in a build/rules/ of
BUT in the CO CCR the instruction (which seems to map to ocil) is:
so the variable does not get inserted into the field.
this is consistent also in other checks. But the same method works for the
description
field.Review Hints:
to check the result, you have to check the output of the
instruction
field in the compliancecheckresult resource of each rulealso there may be the same issue with
ocil_clause
fields, but I do not have the output of ocil_clause