root@sudosecurity:~/hardline/changelog $ cat changelog .md
Hardline changelog
Every Hardline release and what changed: new controls, supported Linux distributions, safety fixes and new commands like report, explain and watch.
Every release, newest first. Release binaries, checksums and signatures are on the releases page.
0.8.0 · 2026-11-29
Added
hardline dashboard --serve [--port N]: the dashboard live on127.0.0.1only (default port 9999), rebuilt every minute, with a<meta>refresh so the page keeps itself current. Viewed throughssh -L 9999:127.0.0.1:9999 root@server— no public port is opened. The URL carries a random per-run token: without it every request gets a 404, so other local users can't read the page. OnlyGET /is answered. Requests are capped at 8 KiB with 5/10-second read/write timeouts. Each rebuild re-reads the skip list and the accepted-risk register, so edits andunacceptshow up on the next refresh.
0.7.0 · 2026-11-13
Added
- Site: diagrams for the change flow, the 8 phases, the apply transaction, the confirm step and the exec allowlist, plus an FAQ on the landing page.
- Site: a Getting started page (/hardline/start/) and a Guides page (/hardline/guides/) with recipes for production servers, Docker hosts, phone alerts, fleets, CI, Grafana, auditor evidence and file permissions.
- 14
perm-*controls (phase 8) for the permissions of /etc/passwd, group, shadow, gshadow and their backups, sshd_config, sudoers, crontab and grub.cfg, with CIS/STIG modes (shadow 0640 root:shadow on Debian-family, 0000 on RHEL).applyonly removes permission bits and sets owner/group, never follows symlinks, and rollback restores the old mode and owner. tests/vm/run.shautomates lockout scenarios 1, 2, 3, 13 and 14 over SSH, and the weekly/manual "Lockout tests" workflow runs it against a fresh Ubuntu 24.04 LXD instance.- STABILITY.md: the interfaces Hardline keeps compatible (commands, exit codes, JSON schema, SARIF, control IDs, config and state files, metrics, release key) and the support window for each distro.
- Fuzz tests cover every parser added since 0.5 (sockets, accounts, logins, fleet output and hosts files, timeline, accept files and dates, fstab block, control TOML) with random input, plus byte-flip/truncate/splice mutations of real sshd, control, fstab and /proc/net inputs.
.deband.rpmpackages on each release (packaging/build.sh, built in the release workflow and covered by the signedSHA256SUMS). They install/usr/bin/hardline;self-updaterefuses to replace a packaged binary, so apt or dnf owns updates.hardline fleet --remote-bin PATHaudits servers where hardline lives somewhere other than/usr/local/bin/hardline.--profile cis(Ubuntu 24.04 only): the 30 controls that check CIS Ubuntu Linux 24.04 LTS Benchmark v1.0.0 Level 1 Server recommendations, each with its recommendation numbers inrefs.cis(mapping from ComplianceAsCodecontrols/cis_ubuntu2404.yml; only where Hardline's expected value meets the benchmark).report --auditshows a CIS column.hardline report --audit: a printable evidence page for auditors with one table row per control (status, observed, expected, STIG IDs, CCIs, accepted risk with reviewer and review date), totals, and a sign-off line. A4 print styles; no scripts.contrib/prometheus/hardline.rules.yml(four alerts, withpromtoolunit tests) andcontrib/grafana/hardline-dashboard.json(grade, regressions, modified files, watch freshness, history and a failing-check table per server) for thewatchmetrics.- Dashboard: "Check history" from the watch history: for every check that failed in any run, when its current failing streak started and how long ago, or when it was fixed, and how many runs it failed in.
- Dashboard: a "Who can get in" panel with every port listening on a public address and the processes behind it, accounts that can log in (admin rights, whether a password is set, number of SSH keys) and the last 15 SSH logins from the journal.
journalctladded to the fixed command list. ssh-max-startups(MaxStartups 10:30:60) andssh-per-source-max-startups(PerSourceMaxStartups 10), phase 1: limits on unauthenticated SSH connections against brute-force bots.aide-database(phase 4) is now fixed by apply: it builds AIDE's baseline withaideinit -y -f(RHEL:aide --init), in the same run that installs AIDE. Rollback deletes the database it built.mounts-tmpandmounts-dev-shm(phase 7) are now fixed by apply:tmpfslines withnodev,nosuid,noexecgo in a# BEGIN hardlineblock at the end of/etc/fstab, then the path is remounted. When/tmpisn't its own mount yet it becomes a tmpfs at the next boot. A path that fstab already lists outside the block is skipped. Rollback restores fstab and remounts with the previous options.mount,aideandaideinitadded to the fixed command list.time-synced(phase 3) is now fixed by apply: it enables chrony if installed (always on RHEL), otherwise installs and enables systemd-timesyncd. Rollback disables a client Hardline enabled. The check now also requires a running NTP client, because the kernel keeps reporting "synchronized" for a while after one stops.
0.6.0 · 2026-10-29
Added
- Automatic updates (phase 3):
updates-unattended-installedandupdates-unattended-enabledon Ubuntu/Debian (writes/etc/apt/apt.conf.d/52hardline-auto-upgrades, verified throughapt-config dump);updates-dnf-automatic-installedandupdates-dnf-automatic-timeron RHEL family. time-synced(phase 3):timedatectlreportsNTPSynchronized=yes. Report-only.kernel-suid-dumpable(phase 7): setsfs.suid_dumpable = 0.mounts-tmpandmounts-dev-shm(phase 7):nodev,nosuid,noexec, read from/proc/self/mounts. Report-only.files-no-world-writable,files-no-stray-suid,files-no-unowned(phase 8): one bounded walk of local disk filesystems (no symlinks, no container storage or pseudo filesystems, stops at 3,000,000 entries). Report-only.files-no-unownedis a warning when users also come from LDAP/SSSD.apt-configandtimedatectladded to the fixed command list.hardline dashboard [--out FILE]: a local, script-free status page with the report, score over time and recent watch runs.hardline fleet <host>...: run on your own computer; audits each server over SSH (sshadded to the fixed command list) and writes one local page with every grade, open findings per host and failures shared across servers.- Dashboard: "How to fix" on every open finding (why it matters, what Hardline changes, the exact preview/commit/confirm commands, how to undo), a change timeline from
history.log, and an accepted-risk register with review dates. hardline accept --expires 90d|12w|YYYY-MM-DD: a review date for an accepted finding. Once it passes the finding counts again andwatchreports it once. Existing entries keep working without one. An entry withexpiresis refused by 0.5.x, so after downgrading remove that line (or the entry) from/etc/hardline/accepted.toml.watch runkeeps the last 720 runs inwatch-history.jsonl, rewritesdashboard.html, and writes Prometheus metrics (hardline.prom) for node_exporter's textfile collector.
Fixed
watch-history.jsonlwith one corrupt byte no longer wipes the whole history; only the bad line is dropped.- A full disk while saving history no longer stops the regression alert from
watch run. - File-permission scan: a bind mount of a subdirectory no longer hides the rest of that filesystem; at most 1,000 sample paths per finding are kept (counts stay exact).
- Temp files from atomic writes are per-process, so
hardline dashboardandwatch runcan't publish each other's half-written file. self-updatetakes the hardline lock, so no apply, rollback or watch run starts while the binary is replaced.confirmcommits the snapshots before it stops the revert timer, so a failure there still reverts on its own instead of leaving the change unguarded.- A failure recording files created by a package install, or (for unguarded phases) sealing the snapshot, now rolls the phase back instead of leaving it half-applied.
hardline dashboard --out FILEprints the right file name to open.- Webhook URLs with an IPv6 literal host and no port are accepted; malformed bracketed hosts are refused.
- The dashboard's time formatting no longer assumes ASCII input.
rollback --pendingand an early manual revert are recorded as "rolled back by hand", not "not confirmed in time"; the last-revert line no longer repeats its timestamp.- Writing a file by bare name (e.g.
--out page.html) in the current directory.
0.5.1 · 2026-09-29
Fixed
- SSH stayed down after a failed reload was reverted: a failed
try-reload-or-restartleavesssh.servicefailed, and the revert's owntry-reload-or-restartskips failed units. The revert now resets and restarts a failed SSH unit. Apply also checks that sshd is still running 1 second after the reload, because systemd reports a SIGHUP reload done before sshd re-execs, and the re-exec can still die (seen on Debian 13 withssh.socketandssh.serviceboth started).
0.5.0 · 2026-09-15
Added
- Site: the controls page filters by search, severity, distro, profile and fix type (press
/to search). Docs add an Updating section, a full table of every path Hardline writes, and signed-install steps from sudosecurity.org; the security page documents release signing and shows the public key. Landing-page numbers are now measured (median of 5 audits on 1-vCPU Ubuntu 24.04 and Rocky 9 VMs), and the binary size comes from the build. hardline self-update [--check]: downloads the latest release from https://sudosecurity.org/hardline/releases/latest/, verifies the Ed25519 signature onSHA256SUMSagainst the release key compiled in fromrelease.pub(OpenSSL 3pkeyutl), checksVERSIONand the bare binary against the signed sums, refuses downgrades and pending guarded changes, then replaces the binary atomically and keeps the old one at/var/lib/hardline/hardline.previous. The release workflow publishes an unsigned draft; the Ed25519 key stays root-only on the release host, which signsSHA256SUMSbefore the release is published (see CONTRIBUTING.md).- Eight new baseline controls:
ssh-login-grace-time(LoginGraceTime 1-60, phase 1),aide-installed(installs AIDE,aide-commonon Debian/Ubuntu soaideinitand the daily timer come with it) andaide-database(manual: build the baseline from a trusted state) in phase 4,docker-no-tcp-socket(notcp://Docker API withouttlsverify, from daemon.json or-Hflags; manual) in phase 6, and in phase 7kernel-unprivileged-bpf-disabled(sets 2, which root can undo without a reboot),kernel-yama-ptrace-scope(sets 1),kernel-lockdownandkernel-module-sig-enforce(report-only; need a reboot). hardline accept <id> --reason "...",hardline accept(list) andhardline unaccept <id>. Accepted findings keep their real status but are shown as accepted risk with who and why, are left out of the grade, the audit exit code and watch regressions, are skipped by apply, and are marked suppressed in SARIF. Stored in root-owned/etc/hardline/accepted.toml. The JSON report gainsresults[].acceptedandscore.accepted.hardline watch notify set|test|removeposts watch regressions to Discord, Slack, ntfy or a generic JSON webhook. The URL is read from stdin, must be https without credentials, is saved only after a test alert succeeds, and lives in root-only/etc/hardline/notify.toml(mode 600, refused otherwise). It reaches curl through--config -and never appears in argv, logs or errors. A failed post is logged and doesn't change the run's exit code.hardline apply --allpreviews every phase;apply --all --commitapplies them in one run. Phases 3–8 commit one by one (each still has its ownrollback --phase N), then SSH (1) and the firewall (2) go last under one revert timer, one boot guard and onehardline confirmfrom a new login. If you can't log back in, both revert together, newest first. If a later guarded phase fails, the earlier one is reverted too rather than left without a timer.pending.jsongains an optionalchainlist; a single-phase change keeps the old shape.- Ubuntu 26.04 LTS and Debian 13 (trixie) are supported with the
baselineprofile. Both passed the VM lockout scenarios (timer revert, same-session confirm refused, new-session confirm, reboot before confirm) and every phase with a reboot. Ubuntu 26.04 ships sudo-rs and Rust coreutils by default; Hardline works with both. hardline audit --sarifprints SARIF 2.1.0 for GitHub code scanning and other dashboards. Failing and warning controls become results withsecurity-severity, STIG/CCI tags and a stable per-host fingerprint; a check that couldn't run becomes a tool notification and marks the run unsuccessful. Exit codes are unchanged.- Hardline pages get per-page share images (Open Graph and X cards), Twitter/X titles, and schema.org data (SoftwareApplication on /hardline/, breadcrumbs elsewhere);
site/og.pyrenders the images. - New /hardline/architecture/ page, and docs for the JSON report fields, SARIF upload,
watchalerting, Ansible, cloud-init and grade gates.
Changed
- Findings and
hardline explainlink to https://sudosecurity.org/hardline/controls/, the new controls reference. Links from older versions to/hardline/#idstill land on the right entry. site/build.pynow builds every Hardline page on sudosecurity.org (overview, docs, controls, security, sample report, changelog, about) intosite/pages/, andsite/publish.pypublishes them to Ghost.
0.4.1 · 2026-08-15
Fixed
- Rolling back a change that installed a package (ufw on Debian 12, firewalld on RHEL) deleted the config files that package had just created, such as
/etc/ufw/ufw.conf. On Debian that madeufw disablefail, so the firewall stayed on after rollback. Files a package install creates are now recorded after the install, and rollback puts back the package's own copy.
0.4.0 · 2026-08-01
Added
- An A–F security grade, weighted by severity, in
auditoutput and the JSON report (grade.letter,grade.percent). A failing high-severity control caps an A at B. hardline report [--out FILE]: the audit as a self-contained HTML page with the grade, a "fix first" list and a link for every finding. No scripts or external requests (strict CSP), light and dark themes, works on phones and prints cleanly.--outcreates a new 0600 file and never overwrites or follows an existing path.hardline watch enable|disable|run|status: a systemd timer (hourly, daily or weekly, with jitter and catch-up after downtime) that re-audits and compares with the previous run. A grade drop, a newly failing control or an outside edit to a file Hardline wrote exits 1, sohardline-watch.serviceshows insystemctl --failedandOnFailure=hooks fire. Skips a run while a change awaitsconfirmor another hardline command holds the lock. Results go to/var/lib/hardline/watch.json(0600).hardline explain <id> [--json]: why a control matters, exactly what it checks, whatapplywrites, the preflight checks, and how to undo it. Works offline and without root; an unknown id suggests close matches. The text comes fromcontrols/guides.toml, which also builds the website, so the CLI and https://sudosecurity.org/hardline/ never disagree.- RHEL 9, Rocky Linux 9 and AlmaLinux 9 support for the
baselineprofile: dnf/rpm package handling,sshd.service, a newselinux-enforcingcheck in phase 3, and SELinux labels restored on every file Hardline writes. Tested on Rocky 9.8 and AlmaLinux 9.8 VMs with SELinux enforcing. - Guarded firewalld support on RHEL 9, Rocky Linux 9 and AlmaLinux 9: when firewalld isn't running,
apply --phase 2installs it if needed, opens SSH and every listening port in the default zone while keeping existing zone rules, validates withfirewall-offline-cmd --check-config, and starts it under the confirm/revert/boot guard. Rollback restores the zone file exactly and stops firewalld again. Tested on Rocky 9 with SELinux enforcing. - Controls can be limited to one distro family with
os = ["debian"]oros = ["rhel"].
Fixed
- Boot-guard reverts now also stop units the reverted change enabled; disabling alone didn't cancel a start job already queued for that boot.
- Rollback disables units before restoring files. Before, reverting an nftables change failed with "Unit file hardline-firewall.service does not exist" because the unit file was already removed, so the boot guard reported a failed revert.
audit,diff,status,controlsand dry-runapplyexit 3 when stdout fails for a reason other than a closed pipe (for example a full disk), instead of exiting 0 with a truncated report.- The dpkg lock wait is one 5-minute budget for the whole package install, not 5 minutes per
apt-getcall.
0.3.1 · 2026-07-01
Fixed
- Piping output into
head(or any closed pipe) no longer crashes Hardline with a broken-pipe panic. Output errors can never stop an apply halfway. - Package installs wait up to 5 minutes for the dpkg lock (
DPkg::Lock::Timeout=300) instead of failing while unattended-upgrades runs on a fresh server.
0.3.0 · 2026-06-17
Added
- Ubuntu 22.04 LTS and Debian 12 support for the
baselineprofile. All phases and the SSH/firewall lockout scenarios were run on VMs of each. --profile stigis refused outside Ubuntu 24.04, since its IDs come from the Ubuntu 24.04 STIG.
Changed
- Release binaries are built on Ubuntu 22.04 so they run on glibc 2.35+ (Ubuntu 22.04, Debian 12) as well as 24.04.
0.2.0 · 2026-05-17
Added
- Phase 7, kernel: six sysctl controls (
kernel.dmesg_restrict,net.ipv4.tcp_syncookies,kernel.randomize_va_spacefrom the STIG;kernel.kptr_restrict,fs.protected_symlinks,fs.protected_hardlinksinbaseline). Fixes go in/etc/sysctl.d/99-zz-hardline.conf; rollback restores the previous running values. - Phase 7 blocks kernel modules:
usb-storage(STIG) plusdccp,rds,tipc(baseline) via/etc/modprobe.d/hardline.conf. - Phase 8, accounts: empty passwords, libpam-pwquality, and in
stigthe DISA password rules, password ages,INACTIVE=35and sudo NOPASSWD. Config files are edited in place, so only the managed lines change.
0.1.0 · 2026-04-17
Added
audit,apply(dry run by default,--committo write),confirm,rollback,diff,statusandcontrolscommands.- 43 controls across SSH, firewall, AppArmor, auditd, TLS and Docker, with
baselineandstigprofiles and Ubuntu 24.04 STIG/CCI references. - Guarded SSH and firewall changes: a revert timer plus a boot guard undo anything not confirmed from a new SSH session.
- SHA-256 snapshots with mode and ownership, drift detection, and manual rollback that refuses to overwrite later edits without
--force. - ufw backend, and an nftables backend that only owns
table inet hardline. - JSON report schema version 1.
- Project page at https://sudosecurity.org/hardline/, built from the controls by
site/build.py. Every finding links to its section there. - Release archives have stable names (
hardline-<target>.tar.gz), soreleases/latest/download/links always work.