Skip to content

Commit d521a43

Browse files
committed
Enable CIS hardening for Ubuntu Noble
1 parent fb944bb commit d521a43

File tree

2 files changed

+24
-30
lines changed
  • etc/kayobe
    • ansible/maintenance
    • inventory/group_vars/cis-hardening

2 files changed

+24
-30
lines changed

etc/kayobe/ansible/maintenance/cis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
name: ansible-lockdown.rhel9_cis
3737
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '9'
3838

39-
- name: Run CIS hardening role (Ubuntu 22)
39+
- name: Run CIS hardening role (Ubuntu 24)
4040
ansible.builtin.include_role:
41-
name: ansible-lockdown.ubuntu22_cis
42-
when: ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version == '22'
41+
name: ansible-lockdown.ubuntu24_cis
42+
when: ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version == '24'

etc/kayobe/inventory/group_vars/cis-hardening/cis

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ rhel9cis_rule_5_6_1_1: false
7575

7676
##############################################################################
7777
# Ubuntu Noble CIS Hardening Configuration
78-
# FIXME: These settings are untested, they are just carried over from Jammy
78+
79+
# Stop general "High Disruption" tasks
80+
ubtu24cis_disruption_high: false
7981

8082
# Ubuntu 24 CIS configuration
8183
# Disable changing routing rules
@@ -94,16 +96,15 @@ ubtu24cis_install_network_manager: false
9496
ubtu24cis_syslog_service: journald
9597

9698
# Squashfs is compiled into the kernel
97-
ubtu24cis_rule_1_1_1_2: false
99+
# ubtu24cis_rule_1_1_1_2: false
98100

99101
# This updates the system. Let's do this explicitly.
100-
ubtu24cis_rule_1_9: false
102+
# ubtu24cis_rule_1_9: false
101103

102104
# Do not change Chrony Time servers
103-
ubtu24cis_rule_2_1_2_1: false
104-
105-
# Disable CIS from touching sudoers
106-
ubtu24cis_rule_5_3_4: false
105+
ubtu22cis_rule_2_3_3_1: false
106+
ubtu22cis_rule_2_3_3_2: false
107+
ubtu22cis_rule_2_3_3_3: false
107108

108109
# Add stack and kolla to allowed ssh users
109110
ubtu24cis_sshd:
@@ -144,21 +145,17 @@ ubtu24cis_sshd:
144145
# takes a long time. Related to the changing permissions block below. This
145146
# would normally warn you about violations, but we can use Wazuh to continually
146147
# monitor this.
147-
ubtu24cis_rule_6_1_9: false
148-
ubtu24cis_rule_6_1_10: false
149-
ubtu24cis_rule_6_1_11: false
150-
ubtu24cis_rule_6_1_12: false
151-
ubtu24cis_rule_6_1_13: false
148+
ubtu24cis_rule_6_3_1: true
149+
ubtu24cis_rule_6_3_2: true
150+
ubtu24cis_rule_6_3_3: true
152151

153152
# The following rules change permissions on all files on every mounted
154153
# filesystem. We do not want to change /var/lib/docker permissions.
155-
ubtu24cis_no_group_adjust: false
156-
ubtu24cis_no_owner_adjust: false
154+
ubtu24cis_ownership_adjust: false
157155
ubtu24cis_no_world_write_adjust: false
158-
ubtu24cis_suid_adjust: false
156+
ubtu24cis_suid_sgid_adjust: false
159157

160158
# Prevent hardening from recursivley changing permissions on log files
161-
ubtu24cis_rule_4_2_3: false
162159

163160
# Configure log rotation to prevent audit logs from filling the disk
164161
ubtu24cis_auditd:
@@ -175,20 +172,17 @@ ubtu24cis_max_log_file_size: 1024
175172
ubtu24cis_rule_1_4_1: false
176173
ubtu24cis_rule_1_4_3: false
177174

178-
# Disable: Ensure minimum days between password changes is configured
179-
ubtu24cis_rule_5_5_1_1: false
180-
181-
# Disable: Ensure password expiration is 365 days or less
182-
ubtu24cis_rule_5_5_1_2: false
175+
# Disable minimum days between password changes
176+
ubtu24cis_rule_5_4_1_1: false
177+
ubtu24cis_rule_5_4_1_2: false
178+
ubtu24cis_rule_5_4_1_3: false
179+
ubtu24cis_rule_5_4_1_5: false
180+
ubtu24cis_rule_5_4_1_6: false
183181

184-
# Disable: Ensure inactive password lock is 30 days or less
185-
ubtu24cis_rule_5_5_1_4: false
186-
187-
# Disable: Ensure all users last password change date is in the past
188-
ubtu24cis_rule_5_5_1_5: false
182+
# Do not require a root password
183+
ubtu24cis_rule_5_4_2_4: false
189184

190185
# The way this is disabled currently breaks kolla's IPV6 check, see:
191186
# https://bugs.launchpad.net/kolla-ansible/+bug/2071443
192187
# Also matches RHEL hardening behavior.
193188
ubtu24cis_ipv6_required: true
194-

0 commit comments

Comments
 (0)