SLE15 directory permissions and file ownership rules for var log audit - #13862
Merged
jan-cerny merged 4 commits intoSep 9, 2025
Conversation
…tform - Adds custom oval check for sle15 - Adds ansible remediation for directory_permissions_var_log_audit - Adds support for sle platforms in bash remediation
Member
|
/packit retest-failed |
jan-cerny
reviewed
Sep 5, 2025
| # disruption = low | ||
|
|
||
| - name: "{{{ rule_title }}} - Get audit log file from /etc/audit/auditd.conf" | ||
| ansible.builtin.command: grep -iw ^log_file /etc/audit/auditd.conf |
Member
There was a problem hiding this comment.
I suggest adding check_mode: False to this task because this task can be run in check mode because the grep command is a read operation (it doesn't modify any file).
| when: (log_file_line is defined) and (log_file_line | length > 0) | ||
|
|
||
| - name: "{{{ rule_title }}} - Get audit log group" | ||
| ansible.builtin.command: grep -iw ^log_group /etc/audit/auditd.conf |
| # disruption = low | ||
|
|
||
| - name: "{{{ rule_title }}} - Get audit log file from /etc/audit/auditd.conf" | ||
| ansible.builtin.command: grep -iw ^log_file /etc/audit/auditd.conf |
| @@ -0,0 +1,124 @@ | |||
| <def-group> | |||
Member
There was a problem hiding this comment.
Why does SLE15 has a custom OVAL check? What is the difference from other products? The rule.yml doesn't suggest any major difference between products.
Contributor
Author
There was a problem hiding this comment.
In SLE we try to cover the case where :
- log_file set and log_group set to not root
and - log_file set and log_group root
which are both valid and if we try to extend the existing implementation the OVAL becomes really unreadable
Thanks 🙇 to @jan-cerny for the tip
jan-cerny
approved these changes
Sep 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Rationale: