open source · read-only · rust

state-witness

Reports what your host actually enforces — with the file and line that set it — not what a config file claims. Built for immutable Linux.

sudo state-witness ssh
$ sudo state-witness ssh ✓ PermitRootLogin: no └─ from (effective, sshd -T) ✗ PasswordAuthentication: yes └─ from (effective, sshd -T) $ state-witness sysctl ✗ IP forwarding: net.ipv4.ip_forward = 1 (expected 0) └─ from (effective, sysctl -n) ✓ ASLR: kernel.randomize_va_space = 2 └─ from (effective, sysctl -n)
[01]

What it does differently

Most scanners read the file. Attackers read the drop-in. On a host where /etc/ssh/sshd_config includes a wildcard directory — and one of those files is generated by the crypto-policies subsystem — the file you read is not the configuration that runs.

effective state

Reads what the kernel and daemons enforce right now: sshd -T, sysctl -n, live sockets, systemctl show, auditctl -l.

provenance

The command or file the value came from — (effective, sysctl -n), /etc/passwd — including when the honest answer is “nobody set this, it is the compiled default”. Line numbers inside the file are not resolved yet.

atomic / ostree native

Knows /usr is read-only, detects /etc drift via ostree admin config-diff, understands bootc deployments.

CI-first

Versioned JSON output and meaningful exit codes. A single static binary — no Ruby, no Python engine.

[02]

Run it yourself (free)

Read-only by default. It never changes your system unless you ask it to.

$ git clone https://github.com/7sh1d0w7x/state-witness && cd state-witness $ cargo build --release $ sudo ./target/release/state-witness ssh

Also builds as a static (musl) binary, so it runs in a scratch container. Missing tools are reported as Skip, not as errors — the audit degrades gracefully.

[03]

Why immutable hosts specifically

Fedora Atomic, Bazzite, bootc / RHEL Image Mode and Universal Blue are the fastest-growing part of the Linux fleet — and the least audited. Tools that probe or remediate via dnf break on them. And because /usr/etc → /etc is a three-way merge, the “effective” file may not be where a scanner looks.

state-witness treats the deployment as a first-class fact: which one you are on, whether it is signed, what /etc drift exists, and whether the enforced service state is consistent with it.

Want it run on your fleet?

The tool tells you what your hosts enforce. I turn that into a report you can act on. Implementing the fixes is a separate step: hardening, from €179.

Server Health Check · €49 — read-only. What is exposed, severity, the top 3 fixes, every finding labelled with the source it came from. If I find nothing, you don't pay. If you continue with hardening, the €49 comes off the price.