Skip to content

Commit bb6de6f

Browse files
Alex-Welshstackhpc-ci
authored andcommitted
Enable CIS hardening for Ubuntu Noble
1 parent 2730223 commit bb6de6f

File tree

2 files changed

+26
-31
lines changed
  • etc/kayobe
    • ansible/maintenance
    • inventory/group_vars/cis-hardening

2 files changed

+26
-31
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: 23 additions & 28 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
@@ -93,17 +95,13 @@ ubtu24cis_install_network_manager: false
9395
# Set syslog service to journald
9496
ubtu24cis_syslog_service: journald
9597

96-
# Squashfs is compiled into the kernel
97-
ubtu24cis_rule_1_1_1_2: false
98-
99-
# This updates the system. Let's do this explicitly.
100-
ubtu24cis_rule_1_9: false
98+
# Allow rsync server
99+
ubtu24cis_rsync_server: true
101100

102101
# 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
102+
ubtu24cis_rule_2_3_3_1: false
103+
ubtu24cis_rule_2_3_3_2: false
104+
ubtu24cis_rule_2_3_3_3: false
107105

108106
# Add stack and kolla to allowed ssh users
109107
ubtu24cis_sshd:
@@ -144,21 +142,17 @@ ubtu24cis_sshd:
144142
# takes a long time. Related to the changing permissions block below. This
145143
# would normally warn you about violations, but we can use Wazuh to continually
146144
# 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
145+
ubtu24cis_rule_6_3_1: true
146+
ubtu24cis_rule_6_3_2: true
147+
ubtu24cis_rule_6_3_3: true
152148

153149
# The following rules change permissions on all files on every mounted
154150
# filesystem. We do not want to change /var/lib/docker permissions.
155-
ubtu24cis_no_group_adjust: false
156-
ubtu24cis_no_owner_adjust: false
151+
ubtu24cis_ownership_adjust: false
157152
ubtu24cis_no_world_write_adjust: false
158-
ubtu24cis_suid_adjust: false
153+
ubtu24cis_suid_sgid_adjust: false
159154

160155
# Prevent hardening from recursivley changing permissions on log files
161-
ubtu24cis_rule_4_2_3: false
162156

163157
# Configure log rotation to prevent audit logs from filling the disk
164158
ubtu24cis_auditd:
@@ -175,20 +169,21 @@ ubtu24cis_max_log_file_size: 1024
175169
ubtu24cis_rule_1_4_1: false
176170
ubtu24cis_rule_1_4_3: false
177171

178-
# Disable: Ensure minimum days between password changes is configured
179-
ubtu24cis_rule_5_5_1_1: false
180172

181-
# Disable: Ensure password expiration is 365 days or less
182-
ubtu24cis_rule_5_5_1_2: false
173+
# Disable minimum days between password changes
174+
ubtu24cis_rule_5_4_1_1: false
175+
ubtu24cis_rule_5_4_1_2: false
176+
ubtu24cis_rule_5_4_1_3: false
177+
ubtu24cis_rule_5_4_1_5: false
178+
ubtu24cis_rule_5_4_1_6: false
183179

184-
# Disable: Ensure inactive password lock is 30 days or less
185-
ubtu24cis_rule_5_5_1_4: false
180+
# Do not require a sudo password
181+
ubtu24cis_rule_5_2_4: false
186182

187-
# Disable: Ensure all users last password change date is in the past
188-
ubtu24cis_rule_5_5_1_5: false
183+
# Do not require a root password
184+
ubtu24cis_rule_5_4_2_4: false
189185

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

0 commit comments

Comments
 (0)