-
Notifications
You must be signed in to change notification settings - Fork 710
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
CMP-2375: Implement a new rule for checking audit logging is enabled #11731
CMP-2375: Implement a new rule for checking audit logging is enabled #11731
Conversation
We already have a rule that checks that audit logging is configured to a specific level called audit_profile_set. While this works, it was being used for CIS OpenShift controls 3.2.1 and 3.2.2. CIS 3.2.1 is really just checking if audit logging is enabled, or that the profile isn't set to `None`. CIS 3.2.2 is checking that the audit profile is set to `WriteRequestBodies`. Using the same rule for both controls was causing confusion because control 3.2.1 should be satisfied by default with OpenShift using the `Default` audit profile. Control 3.2.2 is a level 2 control that requires users to make a change to the api server configuration to remediate the finding. This commit breaks the rule into two separate rules so that its easier to see that one rule is clearly for CIS 3.2.1 and the other is for CIS 3.2.2.
/test |
@rhmdnd: The
Use
In response to this:
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. |
/test 4.13-e2e-aws-ocp4-cis |
🤖 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: |
Code Climate has analyzed commit fca4310 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.3% (0.0% change). View more on Code Climate. |
/hold for test |
Verification pass.
|
/unhold |
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.
/lgtm
Thanks for adding this rule
/lgtm |
We already have a rule that checks that audit logging is configured to a
specific level called audit_profile_set. While this works, it was being
used for CIS OpenShift controls 3.2.1 and 3.2.2.
CIS 3.2.1 is really just checking if audit logging is enabled, or that
the profile isn't set to
None
.CIS 3.2.2 is checking that the audit profile is set to
WriteRequestBodies
.Using the same rule for both controls was causing confusion because
control 3.2.1 should be satisfied by default with OpenShift using the
Default
audit profile. Control 3.2.2 is a level 2 control thatrequires users to make a change to the api server configuration to
remediate the finding.
This commit breaks the rule into two separate rules so that its easier
to see that one rule is clearly for CIS 3.2.1 and the other is for CIS
3.2.2.