Skip to content

Commit

Permalink
Merge pull request #12674 from mpurg/ubuntu2404_cis_6_1_2_2
Browse files Browse the repository at this point in the history
Add new rule journald_disable_forward_to_syslog
  • Loading branch information
dodys authored Dec 10, 2024
2 parents 0595c98 + ea22547 commit 9cf3c5e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ rules:
- file_permissions_system_journal
- journald_compress
- journald_forward_to_syslog
- journald_disable_forward_to_syslog
- journald_storage
- package_systemd-journal-remote_installed
- package_timesyncd_installed
Expand Down
5 changes: 3 additions & 2 deletions controls/cis_ubuntu2404.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2277,8 +2277,9 @@ controls:
levels:
- l1_server
- l1_workstation
status: planned
notes: TODO. Rule does not seem to be implemented. Analogous to ubuntu2204/4.2.1.5.
rules:
- journald_disable_forward_to_syslog
status: automated

- id: 6.1.2.3
title: Ensure journald Compress is configured (Automated)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
documentation_complete: true

title: Ensure journald ForwardToSyslog is disabled

description: |-
Data from journald should be kept in the confines of the service and not forwarded to other services.
rationale:
If journald is the method for capturing logs, all logs of the system should be
handled by journald and not forwarded to other logging mechanisms.

platform: package[systemd]

severity: medium

{{%- if product in ["rhel8", "rhel9", "sle15"] %}}
template:
name: systemd_dropin_configuration
vars:
master_cfg_file: /etc/systemd/journald.conf
dropin_dir: {{{ journald_conf_dir_path }}}
section: Journal
param: ForwardToSyslog
value: no
no_quotes: 'true'
{{% else %}}
template:
name: shell_lineinfile
vars:
path: /etc/systemd/journald.conf
parameter: ForwardToSyslog
value: no
no_quotes: 'true'
{{% endif -%}}

0 comments on commit 9cf3c5e

Please sign in to comment.