CLI-Anything Bundle #67 — Firejail Sandbox Trust Recon Pack
Four agent-native read-only harnesses that census the firejail sandbox trust surface: the layer that decides whether this host's mandatory sandboxing stack can still be TRUSTED — the firejail.config main posture, the firecfg desktop-integration footprint, the /run/firejail runtime state, and the /etc/firejail profile grammar fleet. No other bundle owns this surface — #63 keeps the bootloader/EFI layer, #56 keeps the CPU mitigation posture, #66 keeps the AIDE integrity layer (census: 0 exact / 0 name-class substring token collisions across the whole shipping catalog, 140 Gumroad products pulled fresh). Firejail's own config, integration, runtime and profile layers are unclaimed census territory.
- firejailpeek — firejail.config main-config trust census (the main config statted mode/owner/size and parsed line-by-line in the documented key=value grammar — KEY=value / KEY = value / KEY value forms, comments skipped with glued-#-is-data). Weak postures = SECCOMP_OFF / APPARMOR_OFF / XATTR_OFF / SYMLINK_TRAVERSAL_OFF / NONPRIV_OFF / WRITABLE_ETC / WRITABLE_VAR / TRACING_ALLOWED findings; typo-defeated postures = UNK_KEY; duplicates = DUP_KEY; no recorded keys = NO_RECORDED_KEYS / NO_POSTURE_KEYS honesty; world-writable config = stat finding; secret-named key values withheld len-only (masking law battery-pinned); honest absence rc6; root-prefix + explicit-conf overrides for any tree.
- firecfgpeek — firecfg integration trust census (firecfg.config app-list inventory with app-token shape law, DUP_APP, unparseable lines as reason-only rows; lstat-only /usr/local/bin census with SYMLINK/DIR/REGULAR/OTHER rows + BIN_DIR stat law; firecfg-style symlinks detected by target basename with relative targets resolved kernel-style; BROKEN_SYMLINK samples from target stat misses; census cap 200 + DIRLIMIT notes; NO_INTEGRATION honest rc6).
- firemonpeek — runtime sandbox-state census (/run/firejail truth by listdir + lstat only — never opens a runtime file, never enumerates a process; per-entry staleness buckets fresh/day/week/stale relative; RUN_DIR_WORLD_WRITABLE / ENTRY_WORLD_WRITABLE / CHILD_WORLD_WRITABLE / ENTRY_SYMLINK findings with honest broken flags; caps 10-row class + TRUNC, 400-entry census cap RUNLIMIT, 40-entry per-sandbox child cap CHILDREN_CAPPED; RUN_ABSENT honest rc6).
- jailconfpeek — profile grammar census (the /etc/firejail fleet read 2 MiB-capped: per-profile directive counts for include chains stat-resolved with UNRESOLVED_INCLUDE misses, caps.drop/keep families with WEAK_CAPS, seccomp family, apparmor, private-tmp/dev, net/netfilter, protocol, blacklist/noblacklist/whitelist counts; env values on secret-named lines withheld len-only; EMPTY_PROFILE; include chains parsed once with chain_skipped notes; PROFILE_DIR_ABSENT honest rc6).
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc2 usage; --json emits the full report; per-tool root/dir/config overrides point the census at any tree or fixture. Pure Python stdlib — zero subprocesses, zero writes, zero sockets, zero network, zero process enumeration; firejail artifacts are only ever READ and statted, binaries are never executed, symlink targets are lstat/stat only, and any secret-shaped literal is masked by length only. The census never "fixes" an exposed posture — it names it.
Self-test battery inside
621 fixture-based executed assertions (checks.py + runner_count.py per bundle norm) — verified as: three green fires from the shipping tree (fire1, fire2, merged-kit fire) and two clean-room fires from THIS exact shipping zip (621/0 every fire). The battery pins rc laws, every finding code, the never-execute + no-process-enumeration laws, grammar edges, caps, stat hygiene, and write-nothing fingerprints with zero scratch remnants.
Who this is for
Admins who inherited firejail installs nobody can honestly call isolated; hardening teams proving the sandbox's main config, desktop integration, runtime state and profile fleet still form a closed loop; agent builders who want their AI to census a host's sandbox trust posture without ever mutating it. The census reads — the sandbox stack is never touched.
MIT licensed · Python 3.8+ · 40 files · stdlib-only