Skip to content

Commit 1898858

Browse files
authored
Merge pull request #14382 from vojtapolasek/rhel9_stig_update_02_26
Update RHEL 9 STIG content to align with DISA STIG v2r7
2 parents 0ec1efd + ff74d6e commit 1898858

13 files changed

Lines changed: 2488 additions & 3683 deletions

File tree

linux_os/guide/system/accounts/accounts-physical/logind_session_timeout/ansible/shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{{{ ansible_instantiate_variables("var_logind_session_timeout") }}}
88

9-
{{% if product in ["sle15", "sle16"] %}}
9+
{{% if product in ["rhel9", "rhel10", "sle15", "sle16"] %}}
1010
# create drop-in in the /etc/systemd/logind.conf.d/ directory
1111
{{% set logind_conf_file = "/etc/systemd/logind.conf.d/oscap-idle-sessions.conf" %}}
1212
{{% else %}}

linux_os/guide/system/accounts/accounts-physical/logind_session_timeout/bash/shared.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{{ bash_instantiate_variables("var_logind_session_timeout") }}}
44

5-
{{% if product in ["sle15", "sle16"] %}}
5+
{{% if product in ["rhel9", "rhel10", "sle15", "sle16"] %}}
66
# create drop-in in the /etc/systemd/logind.conf.d/ directory
77
{{% set logind_conf_file = "/etc/systemd/logind.conf.d/oscap-idle-sessions.conf" %}}
88
{{% else %}}

linux_os/guide/system/accounts/accounts-physical/logind_session_timeout/oval/shared.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{{% if product in ["sle15", "sle16"] %}}
1+
{{% if product in ["rhel9", "rhel10", "sle15", "sle16"] %}}
22
{{% set logind_conf_file = "/etc/systemd/logind.conf.d/" %}}
33
{{% else %}}
44
{{% set logind_conf_file = "/etc/systemd/logind.conf" %}}
55
{{% endif %}}
66

77
<def-group>
88
<definition class="compliance" id="logind_session_timeout" version="1">
9-
{{% if product in ["sle15", "sle16"] %}}
9+
{{% if product in ["rhel9", "rhel10", "sle15", "sle16"] %}}
1010
{{{ oval_metadata("Ensure 'StopIdleSessionSec' is configured with desired value in section 'Login' in {{{ logind_conf_file }}}", rule_title=rule_title) }}}
1111
<criteria comment="logind is configured correctly and configuration file exists" operator="AND">
1212
<criterion comment="Check the StopIdleSessionSec in {{{ logind_conf_file }}}" test_ref="test_logind_session_timeout_drop_in"/>

linux_os/guide/system/accounts/accounts-physical/logind_session_timeout/tests/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# this file prepares unified test environment used by other scenarios
44
# These should be tuned per product to match defaults
55

6-
{{% if product in ["sle15", "sle16"] %}}
6+
{{% if product in ["rhel9", "rhel10", "sle15", "sle16"] %}}
77
LOGIND_CONF_FILE="/etc/systemd/logind.conf.d/oscap-idle-sessions.conf"
88
mkdir -p /etc/systemd/logind.conf.d/
99
{{% else %}}

linux_os/guide/system/accounts/accounts-physical/require_emergency_target_auth/ansible/shared.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
dest: /etc/systemd/system/emergency.service.d/10-oscap.conf
1212
block: |
1313
[Service]
14+
ExecStart=
1415
ExecStart=-/usr/lib/systemd/systemd-sulogin-shell emergency
1516
{{% else %}}
1617
- name: Require emergency mode password

linux_os/guide/system/accounts/accounts-physical/require_emergency_target_auth/bash/shared.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sulogin='/bin/sh -c "/sbin/sulogin; /usr/bin/systemctl --fail --no-block default
1616
{{% if 'sle' in product or 'rhel' in product or product == 'fedora' or product == 'slmicro5' or 'ol' in families %}}
1717
mkdir -p "${service_dropin_cfg_dir}"
1818
echo "[Service]" >> "${service_dropin_file}"
19+
echo "ExecStart=" >> "${service_dropin_file}"
1920
echo "ExecStart=-$sulogin" >> "${service_dropin_file}"
2021
{{% else %}}
2122
if grep "^ExecStart=.*" "$service_file" ; then

linux_os/guide/system/permissions/files/dir_perms_world_writable_system_owned/rule.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ references:
2828
stigid@ol7: OL07-00-021031
2929
stigid@ol8: OL08-00-010700
3030

31+
identifiers:
32+
cce@rhel9: CCE-86469-4
33+
3134
ocil_clause: 'there is output'
3235

3336
ocil: |-

products/rhel9/controls/stig_rhel9.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ controls:
13031303
title: All RHEL 9 world-writable directories must be owned by root, sys, bin, or an application
13041304
user.
13051305
rules:
1306-
- dir_perms_world_writable_root_owned
1306+
- dir_perms_world_writable_system_owned
13071307
status: automated
13081308

13091309
- id: RHEL-09-232245
@@ -2087,9 +2087,10 @@ controls:
20872087
- id: RHEL-09-271065
20882088
levels:
20892089
- medium
2090-
title: RHEL 9 must automatically lock graphical user sessions after 15 minutes of inactivity.
2090+
title: RHEL 9 must automatically lock graphical user sessions after 10 minutes of inactivity.
20912091
rules:
20922092
- dconf_gnome_screensaver_idle_delay
2093+
- inactivity_timeout_value=10_minutes
20932094
status: automated
20942095

20952096
- id: RHEL-09-271070
@@ -2495,7 +2496,7 @@ controls:
24952496
title: RHEL 9 must terminate idle user sessions.
24962497
rules:
24972498
- logind_session_timeout
2498-
- var_logind_session_timeout=15_minutes
2499+
- var_logind_session_timeout=10_minutes
24992500
status: automated
25002501

25012502
- id: RHEL-09-431010
@@ -3484,6 +3485,16 @@ controls:
34843485
- audit_rules_privileged_commands_crontab
34853486
status: automated
34863487

3488+
- id: RHEL-09-654097
3489+
levels:
3490+
- medium
3491+
title: RHEL 9 must audit any script or executable called by cron as root or by any privileged user.
3492+
rules:
3493+
- audit_rules_etc_cron_d
3494+
- audit_rules_var_spool_cron
3495+
status: automated
3496+
3497+
34873498
- id: RHEL-09-654100
34883499
levels:
34893500
- medium

shared/references/cce-redhat-avail.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
CCE-86466-0
22
CCE-86468-6
3-
CCE-86469-4
43
CCE-86482-7
54
CCE-86483-5
65
CCE-86484-3

shared/references/disa-stig-rhel9-v2r6-xccdf-manual.xml renamed to shared/references/disa-stig-rhel9-v2r7-xccdf-manual.xml

Lines changed: 693 additions & 1031 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)