Skip to content

Commit

Permalink
Merge pull request #1366 from stackhpc/bugfix/cis-log-perms
Browse files Browse the repository at this point in the history
CIS: Stop recursively setting permissions on logs files
  • Loading branch information
Alex-Welsh authored Nov 7, 2024
2 parents e8c03a2 + bc050c1 commit 69115f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions etc/kayobe/inventory/group_vars/cis-hardening/cis
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ rhel9cis_rule_6_1_15: false
# filesystem. We do not want to change /var/lib/docker permissions.
rhel9cis_no_world_write_adjust: false

# Prevent hardening from recursivley changing permissions on log files
rhel9cis_rule_4_2_3: false

# Configure log rotation to prevent audit logs from filling the disk
rhel9cis_auditd:
space_left_action: syslog
Expand Down Expand Up @@ -153,6 +156,9 @@ ubtu22cis_no_owner_adjust: false
ubtu22cis_no_world_write_adjust: false
ubtu22cis_suid_adjust: false

# Prevent hardening from recursivley changing permissions on log files
ubtu22cis_rule_4_2_3: false

# Configure log rotation to prevent audit logs from filling the disk
ubtu22cis_auditd:
action_mail_acct: root
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
fixes:
- |
The CIS hardening scripts no longer change permissions of log files by
default. It is preferred to configure these permissions at source i.e on
whatever is creating the files. It also suffered from a time-of-check to
time-of-use race condition. If you want the old behaviour you can change
``rhel9cis_rule_4_2_3`` and/or ``ubtu22cis_rule_4_2_3`` to ``true``.

0 comments on commit 69115f7

Please sign in to comment.