Skip to content

Add defaults for ubuntu24-cis - #321

Draft
ideaship wants to merge 1 commit into
mainfrom
ubuntu24-cis
Draft

ideaship wants to merge 1 commit into
mainfrom
ubuntu24-cis

Conversation

@ideaship

@ideaship ideaship commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds all/099-ubuntu24-cis.yml, the OSISM defaults for the UBUNTU24-CIS role (osism apply ubuntu24-cis, enable_cis_hardening): the CIS Level 1 server profile without the controls that break an OSISM node or rewrite files OSISM roles own. Operators tighten it with ubtu24cis_* variables in environments/configuration.yml.

The commit message lists every setting with its reason. In short:

  • No firewall management (section 4), no disruption_high.
  • Forwarding, rp_filter, router advertisements and tcp_syncookies stay with OSISM (is_router, 3.3.7, 3.3.11, 3.3.10).
  • Logging stays journald → rsyslog → fluentd; nothing is forwarded to the role's placeholder log host.
  • chrony, login banners, journald.conf and the rsyslog logrotate file stay with the OSISM roles that own them.
  • The rsync daemon is masked instead of the package being removed.
  • Unowned, world-writable and SUID files are reported, not changed: Docker and Ceph data has no host owner, and re-owning it to root broke MariaDB, Ceph and Redis on a test cluster. Docker and Ceph paths are excluded from the unowned-file search.
  • No AIDE.
  • All 61 Level 2-only rules are switched off one by one between # BEGIN level2 and # END level2; osism/release's ubuntu24_cis_level2 drift check keeps that block in step with the pinned role.

Should merge before the osism/release PR.

Part of:

🤖 Generated with Claude Code

OSISM 11 integrates ansible-lockdown/UBUNTU24-CIS as "osism apply
ubuntu24-cis" and, with enable_cis_hardening: true, in bootstrap and
maintenance. The role's own defaults (1.7.0) apply Level 1 and Level 2
with disruption_high and a ufw firewall, which would break an OSISM
node. all/099-ubuntu24-cis.yml carries the values OSISM ships instead:
the Level 1 server profile without the controls that conflict with how
OSISM runs a node. Operators tighten it in configuration.yml.

Not changed, and documented in the OSISM 11 release notes instead: 1.5.5
and 2.2.4/2.2.6 uninstall apport and the telnet and ftp clients, which
removes the ubuntu-server and ubuntu-standard metapackages; the next
maintenance run's autoremove then takes the packages they pulled in
(open-vm-tools, fwupd, udisks2, tcpdump, nano, ...). Whether OSISM keeps
any of them is left open.

- Firewall: section 4 is off. firewall_package: none alone would still
  run the 4.1.1 audit.
- disruption_high is off, which also skips locking system accounts
  (5.4.2.7, 5.4.2.8).
- Routing sysctls: is_router skips the forwarding and redirect rules
  (3.3.1, 3.3.2, 3.3.8). 3.3.7 (rp_filter=1) and 3.3.11 (accept_ra=0)
  are not guarded by is_router and are turned off explicitly. 3.3.7
  writes /etc/sysctl.conf, which systemd loads after sysctl.d, so it
  would override osism.services.frr's rp_filter=2 after a reboot.
- tcp_syncookies: osism.commons.sysctl sets it to 0 on the rabbitmq
  group, which 3.3.10 would reset to 1 on every run, so 3.3.10 is off.
- Logging: the role's journald default sets ForwardToSyslog=no and
  enables systemd-journal-upload to a placeholder host. OSISM ships host
  logs journald -> rsyslog -> fluentd, so syslog_service is rsyslog and
  6.1.3.6 (forwarding to the same placeholder) is off.
- Time sync: 2.3.3.1 adds the NIST servers and 2.3.3.2 a user line to
  chrony.conf, which osism.services.chrony owns and rewrites; both are
  off. Ubuntu's chronyd runs as _chrony already.
- rsync: 2.1.13 removes the rsync package by default, which breaks every
  rsync to the hosts (tbng's checks, the testbed's manager setup).
  rsync_mask keeps the client and masks the daemon, which is what the
  rule is about.
- Files OSISM roles own are left to them, so that repeated maintenance
  runs do not rewrite them back and forth: login banners (1.6.1-1.6.3,
  osism.commons.motd), journald.conf (6.1.1.3 would also override
  OSISM's journald sizing with a drop-in; 6.1.3.3) and the rsyslog
  logrotate file (6.1.3.8).
- AIDE is off; its scans would walk /var/lib/docker and Ceph hosts.
- File sweeps report instead of fixing. Docker volume and Ceph data is
  owned by container users without a host account. With
  ownership_adjust, 7.1.12 chowns all of it to root, which on a test
  cluster broke MariaDB, the Ceph OSDs, Prometheus and the manager's
  Redis. no_world_write_adjust would make 7.1.11 strip world-write from
  the same data. suid_sgid_adjust is already off upstream and is pinned
  so that 7.1.13 never strips SUID bits inside container layers.
  The unowned-file search also excludes /var/lib/docker, /var/lib/ceph
  and /var/log/ceph, on top of the role's own exclusions. Container
  image layers alone are some 380k files per node; looping over them
  made 7.1.12 take most of a two-hour maintenance run and buried the
  few dozen host files the report is meant to show.
- Level 2: the role defines ubtu24cis_level_2 but no task reads it,
  levels are selected by tags only. The 61 rules tagged level2-server
  and not level1-server in 1.7.0 are set to false one by one, between
  "# BEGIN level2" and "# END level2". Among them are 1.1.1.6
  (blacklists overlayfs, breaks Docker), 5.2.4 (sudo with password,
  breaks the operator user and cephadm) and all of 6.2 (auditd).
  osism/release's ubuntu24_cis_level2 drift check compares the block
  with the pinned role version, so a role bump that adds Level 2 rules
  is flagged.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants