Skip to content

Commit 00875e5

Browse files
authored
Merge pull request ComplianceAsCode#14071 from jan-cerny/rhel10_cis_journal_forward
Add journald_disable_forward_to_syslog to RHEL 10 CIS
2 parents 58478e3 + d514d93 commit 00875e5

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
@@ -988,7 +988,6 @@ CCE-88335-5
988988
CCE-88337-1
989989
CCE-88338-9
990990
CCE-88339-7
991-
CCE-88340-5
992991
CCE-88341-3
993992
CCE-88342-1
994993
CCE-88346-2

tests/data/profile_stability/rhel10/cis.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ grub2_password
242242
has_nonlocal_mta
243243
inactivity_timeout_value=15_minutes
244244
journald_compress
245+
journald_disable_forward_to_syslog
245246
journald_storage
246247
kernel_module_atm_disabled
247248
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
@@ -162,6 +162,7 @@ grub2_password
162162
has_nonlocal_mta
163163
inactivity_timeout_value=15_minutes
164164
journald_compress
165+
journald_disable_forward_to_syslog
165166
journald_storage
166167
kernel_module_atm_disabled
167168
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
@@ -160,6 +160,7 @@ grub2_password
160160
has_nonlocal_mta
161161
inactivity_timeout_value=15_minutes
162162
journald_compress
163+
journald_disable_forward_to_syslog
163164
journald_storage
164165
kernel_module_atm_disabled
165166
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
@@ -242,6 +242,7 @@ grub2_password
242242
has_nonlocal_mta
243243
inactivity_timeout_value=15_minutes
244244
journald_compress
245+
journald_disable_forward_to_syslog
245246
journald_storage
246247
kernel_module_atm_disabled
247248
kernel_module_can_disabled

0 commit comments

Comments
 (0)