Repository navigation
feat: stig-ubuntu2204: 27 controls of the DISA STIG for Ubuntu 22.04, and a profile OS - #306
Merged
Merged
Conversation
… and the generic checks they need
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofkisa-2026oressentials, 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-methodalso 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 isNOT_APPLICABLEwith the reason, so the profile never reports a pass about another system. Profiles withoutoshave 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).packages.installedandpackages.absent(the package is a parameter of the profile; a package that is only unpacked or half configured is not installed),services.unit-enabledandservices.unit-masked(the unit is the parameter),firewall.ufw-active(ufw.confsays ENABLED=yes),accounts.root-locked(also fails when /etc/shadow has no root entry). Each has PASS, FAIL and unreadable/absent tests.Profile.OSand the NOT_APPLICABLE rule above (tested: match, several, another version, another distribution, validation, digest).site/stig/ubuntu2204/(made bymake docs, tested for staleness, its numbers checked against the profile) and a sitemap entry; CLAUDE.md layout.minlen = 8,PASS_MAX_DAYS 90,TMOUT=600): it says "the required value (X by default)".vmsctl explainonly 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 passedtelnetdabsent), 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-lengthis 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.