Skip to content

feat: stig-ubuntu2204: 27 controls of the DISA STIG for Ubuntu 22.04, and a profile OS - #306

Merged
with-developer merged 6 commits into
mainfrom
feat/stig-ubuntu2204
Nov 14, 2026
Merged

with-developer merged 6 commits into
mainfrom
feat/stig-ubuntu2204

Conversation

@with-developer

Copy link
Copy Markdown
Owner

Decision (made by the maintainer; the owner asked for a US baseline and left the choice to me)

What changes: a new built-in profile, stig-ubuntu2204: 27 controls of the DISA STIG for Canonical Ubuntu 22.04 LTS (V2R8) that vmsctl can decide, a US government standard. It is not part of kisa-2026 or essentials, so no existing profile, revision or waiver changes.
Why the STIG and Ubuntu 22.04 first: the STIG is published by DISA as a US government work (no licence problem for IDs, importance or reading it), its requirements are concrete settings, and the list of controls with their IDs and importance is available in machine readable form (ComplianceAsCode). CIS Benchmarks need registration and have a licence that allows IDs only; they come later as an overlay.
Honesty about coverage: 27 of 188 controls. The profile, docs/stig.md, the Korean doc and the generated page all say it is not a complete STIG assessment and what is not checked (audit rules, file ownership of commands, smart cards, FIPS, boot loader password, ...). A check is mapped only when it decides exactly what the STIG requires, with the STIG's number as the parameter where it fixes one; a looser check is not mapped (for example the STIG asks for SHA512 hashing and accounts.password-hash-method also accepts yescrypt).
Impact: none on existing scans. New: a profile can name the OS it is for (os: [ubuntu-22.04]); on any other host every control is NOT_APPLICABLE with the reason, so the profile never reports a pass about another system. Profiles without os have the same digests as before.
Reversibility: a later release can drop or rename the profile; nothing else depends on it.
Not chosen: a RHEL 9 profile first (the control list is not in the same ready form), mapping looser checks to reach more controls, claiming a STIG compliance score.

What

  • profiles/stig-ubuntu2204.yaml (27 controls; IDs and CAT levels are the STIG's, titles are ours, English and Korean).
  • Six small checks the controls need: packages.installed and packages.absent (the package is a parameter of the profile; a package that is only unpacked or half configured is not installed), services.unit-enabled and services.unit-masked (the unit is the parameter), firewall.ufw-active (ufw.conf says ENABLED=yes), accounts.root-locked (also fails when /etc/shadow has no root entry). Each has PASS, FAIL and unreadable/absent tests.
  • Engine: Profile.OS and the NOT_APPLICABLE rule above (tested: match, several, another version, another distribution, validation, digest).
  • docs/stig.md and docs/stig.ko.md; README en/ko and the docs index; a generated English page site/stig/ubuntu2204/ (made by make docs, tested for staleness, its numbers checked against the profile) and a sitemap entry; CLAUDE.md layout.
  • The remediation text of three parameterised checks no longer names a number the STIG overrides (minlen = 8, PASS_MAX_DAYS 90, TMOUT=600): it says "the required value (X by default)".
  • The table's pointer to vmsctl explain only appears when a control failed.

Review

/code-review medium: ten findings. Fixed: fix text that contradicted the parameter, no OS gate (the review's strongest point: a stock Rocky host would have passed telnetd absent), partly installed packages counting as installed, root with no shadow entry passing, hard-coded numbers on the page (now constants checked by a test), a promise of a RHEL 9 profile in the docs, a mislabelled nav link. Documented, not changed: accounts.password-min-length is stricter than the STIG when a positive credit is set (a false FAIL, never a false PASS). The reviewer doubted control ID 255025; it is right (checked against the published check text: PermitEmptyPasswords and PermitUserEnvironment).

Tests

All new checks have rule tests; make lint test; the profile run on a stock ubuntu:22.04 container (14 FAIL, 11 PASS, 2 N/A, the rest as expected) and on debian:12 (27 NOT_APPLICABLE); the generated page axe-clean in light and dark at 1280 and 390 px.

…204), generated by make docs; a sitemap entry
…_APPLICABLE elsewhere; partly installed packages are not installed; root without a shadow entry is not locked; fix text that matches the parameter; page numbers checked; the fix pointer needs a failed control)
@with-developer
with-developer merged commit c9fde8b into main Nov 14, 2026
20 checks passed
@with-developer
with-developer deleted the feat/stig-ubuntu2204 branch November 14, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant