-
Notifications
You must be signed in to change notification settings - Fork 698
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 Audit related rules in RHEL 10 #12359
Fix Audit related rules in RHEL 10 #12359
Conversation
Skipping CI for Draft Pull Request. |
🤖 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: |
3a9b6c4
to
64058fa
Compare
and add macro to setup auditctl-like test environment
64058fa
to
d25fc4c
Compare
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.
There might be more places where a change is needed, for example:
Line 20 in 7523107
grep '^ExecStartPost' /usr/lib/systemd/system/auditd.service |
and a few occurrences in this file:
content/linux_os/guide/auditing/group.yml
Line 22 in 7523107
appropriate <tt>ExecStartPost</tt> directive setting in the |
…_commands template Augenrules is default option as far as I know. This is the only case of test scenarios where this is set. I decided to remove it.
d25fc4c
to
daeb8e7
Compare
Hello @ggbecker and thank you for noticing this. I made some fixes. However, I am not able to fix the rule audit_rules_suid_auid_privilege_function. I am afraid this will take nontrivial effort. Basically, reloading of auditd service shows us that rules can't be reloaded after remediation. I am stil not entirely sure why, but I would like to tackle this remaining rule and possibly also audit_rules_suid_privilege_function in a separate PR. |
Code Climate has analyzed commit daeb8e7 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.5% (0.0% change). View more on Code Climate. |
audit_rules_suid_auid_privilege_function doesn't seem to be included in RHEL10 content, so there shouldn't be any major issue with it. Overall it looks good to me. Thanks |
@ggbecker actually I see the rule audit_rules_suid_auid_privilege_function in RHEL 10 CIS level 2 profile for both server and workstation. |
That's true. So please continue with the plan on following up on another pull request. |
Description:
Rationale:
In RHEL 10, there is a special Systemd service file which loads rules.
Previously, this was done through ExecStartPost directive in auditd.service.
In RHEL 10, there is a new file audit-rules.service which achieves the same but through ExecStart directive.
Review Hints: