STIGQter STIGQter: STIG Summary: Red Hat OpenShift Container Platform 4.x Security Technical Implementation Guide Version: 2 Release: 6 Benchmark Date: 01 Jul 2026:

OpenShift must protect audit logs from any type of unauthorized access.

DISA Rule

SV-257527r960930_rule

Vulnerability Number

V-257527

Group Title

SRG-APP-000118-CTR-000240

Rule Version

CNTR-OS-000250

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

Correct permissions (audit logs have a mode of "0600") by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; machine_id=$(systemd-machine-id-setup --print); chmod 600 /var/log/audit/audit.log' 2>/dev/null; done

Correct permissions (audit log is owned by "root") by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; machine_id=$(systemd-machine-id-setup --print); chown root:root /var/log/audit/audit.log' 2>/dev/null; done

Correct permissions (audit log directory is group-owned by "root") by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; machine_id=$(systemd-machine-id-setup --print); chown root:root /var/log/audit' 2>/dev/null; done

Correct permissions ( audit log directories have a mode of "0700") by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; machine_id=$(systemd-machine-id-setup --print); chmod 700 /var/log/audit' 2>/dev/null; done

Check Contents

Verify the audit logs have a mode of "0600" by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%a %n" /var/log/audit/audit.log' 2>/dev/null; done

(Sample Output: 600 /var/log/audit/audit.log)
If the audit log has a mode more permissive than "0600", this is a finding.

Determine if the audit log is owned by "root" executing the following command:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; ls -l /var/log/audit/audit.log' 2>/dev/null; done

(Sample Output: rw------- 2 root root 23 Jun 11 11:56 /var/log/audit/audit.log)
If the audit log is not owned by "root", this is a finding.

Verify the audit log directory is group-owned by "root" to prevent unauthorized read access by executing the following.

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; ls -ld /var/log/audit' 2>/dev/null; done

(Sample Output: drw------- 2 root root 23 Jun 11 11:56 /var/log/audit)
If the audit log directory is not group-owned by "root", this is a finding.

Verify the audit log directories have a mode of "0700" by executing the following command:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%a %n" /var/log/audit' 2>/dev/null; done

(Sample Output: 700 /var/log/audit)
If the audit log directory has a mode more permissive than "0700", this is a finding.

Vulnerability Number

V-257527

Documentable

False

Rule Version

CNTR-OS-000250

Severity Override Guidance

Verify the audit logs have a mode of "0600" by executing the following:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%a %n" /var/log/audit/audit.log' 2>/dev/null; done

(Sample Output: 600 /var/log/audit/audit.log)
If the audit log has a mode more permissive than "0600", this is a finding.

Determine if the audit log is owned by "root" executing the following command:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; ls -l /var/log/audit/audit.log' 2>/dev/null; done

(Sample Output: rw------- 2 root root 23 Jun 11 11:56 /var/log/audit/audit.log)
If the audit log is not owned by "root", this is a finding.

Verify the audit log directory is group-owned by "root" to prevent unauthorized read access by executing the following.

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; ls -ld /var/log/audit' 2>/dev/null; done

(Sample Output: drw------- 2 root root 23 Jun 11 11:56 /var/log/audit)
If the audit log directory is not group-owned by "root", this is a finding.

Verify the audit log directories have a mode of "0700" by executing the following command:

for node in $(oc get node -oname); do oc debug $node -- chroot /host /bin/bash -c 'echo -n "$HOSTNAME "; stat -c "%a %n" /var/log/audit' 2>/dev/null; done

(Sample Output: 700 /var/log/audit)
If the audit log directory has a mode more permissive than "0700", this is a finding.

Check Content Reference

M

Target Key

5547