Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new rule journald_disable_forward_to_syslog #12674

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2278,8 +2278,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 -%}}
Loading