Skip to content

Commit d514d93

Browse files
committed
Add journald_disable_forward_to_syslog to RHEL 10 CIS
Our control file maps this requirement to rule `journald_forward_to_syslog` which does the opposite than the requirement 6.2.2.2 asks. Instead, the control should list rule `journald_disable_forward_to_syslog`. This change aligns our content with RHEL 10 CIS Benchmark v1.0.1. Resolves: https://issues.redhat.com/browse/OPENSCAP-6110
1 parent ffbe113 commit d514d93

File tree

7 files changed

+25
-6
lines changed

7 files changed

+25
-6
lines changed

controls/cis_rhel10.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,10 +2393,9 @@ controls:
23932393
levels:
23942394
- l1_server
23952395
- l1_workstation
2396-
status: pending
2397-
notes: This rule conflicts with 6.2.3.3. More investigation is needed to properly solve this.
2398-
related_rules:
2399-
- journald_forward_to_syslog
2396+
status: automated
2397+
rules:
2398+
- journald_disable_forward_to_syslog
24002399

24012400
- id: 6.2.2.3
24022401
title: Ensure journald Compress is configured (Automated)

linux_os/guide/system/logging/journald/journald_disable_forward_to_syslog/rule.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,27 @@ platform: package[systemd]
1717

1818
severity: medium
1919

20+
ocil: |-
21+
Run the following command to verify that journald is not forwarding logs to syslog.
22+
<pre>
23+
{{%- if product == "sle15" or "rhel" in product %}}
24+
grep "^\sForwardToSyslog" /etc/systemd/journald.conf {{{ journald_conf_dir_path }}}/*.conf
25+
{{% else %}}
26+
grep "^\sForwardToSyslog" /etc/systemd/journald.conf
27+
{{% endif %}}
28+
</pre>
29+
and it should return
30+
<pre>
31+
ForwardToSyslog=no
32+
</pre>
33+
34+
ocil_clause: 'is commented out or not configured correctly'
35+
2036
identifiers:
37+
cce@rhel10: CCE-88340-5
2138
cce@sle15: CCE-92566-9
2239

23-
{{%- if product in ["rhel8", "rhel9", "sle15"] %}}
40+
{{%- if product == "sle15" or "rhel" in product %}}
2441
template:
2542
name: systemd_dropin_configuration
2643
vars:

shared/references/cce-redhat-avail.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ CCE-88335-5
990990
CCE-88337-1
991991
CCE-88338-9
992992
CCE-88339-7
993-
CCE-88340-5
994993
CCE-88341-3
995994
CCE-88342-1
996995
CCE-88346-2

tests/data/profile_stability/rhel10/cis.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ grub2_password
241241
has_nonlocal_mta
242242
inactivity_timeout_value=15_minutes
243243
journald_compress
244+
journald_disable_forward_to_syslog
244245
journald_storage
245246
kernel_module_atm_disabled
246247
kernel_module_can_disabled

tests/data/profile_stability/rhel10/cis_server_l1.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ grub2_password
161161
has_nonlocal_mta
162162
inactivity_timeout_value=15_minutes
163163
journald_compress
164+
journald_disable_forward_to_syslog
164165
journald_storage
165166
kernel_module_atm_disabled
166167
kernel_module_can_disabled

tests/data/profile_stability/rhel10/cis_workstation_l1.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ grub2_password
159159
has_nonlocal_mta
160160
inactivity_timeout_value=15_minutes
161161
journald_compress
162+
journald_disable_forward_to_syslog
162163
journald_storage
163164
kernel_module_atm_disabled
164165
kernel_module_can_disabled

tests/data/profile_stability/rhel10/cis_workstation_l2.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ grub2_password
241241
has_nonlocal_mta
242242
inactivity_timeout_value=15_minutes
243243
journald_compress
244+
journald_disable_forward_to_syslog
244245
journald_storage
245246
kernel_module_atm_disabled
246247
kernel_module_can_disabled

0 commit comments

Comments
 (0)