Four battery-green, agent-native recon tools covering the APT repository trust surface: which repos the host consults, which keys verify them, which pins steer package selection, and what apt's own configuration turns on. Read-only by construction: zero process spawns, nothing written, no network. Apache-2.0, stdlib-only, Python 3.8+.
Reads /etc/apt/sources.list and sources.list.d (one-line + deb822) with file:line provenance on every repository declaration. Trust classes: TRUSTED_YES (verification disabled), INSECURE_SCHEME / SCHEME_LOOPBACK / SCHEME_LOCALMDN, CRED_IN_URI (userinfo masked as ***:LEN — values never printed), SIGNED_BY_SET vs DEFAULT_KEYRING, DUPLICATE re-declarations, DISABLED stanzas. MALFORMED directives, UNSUPPORTED_EXT files (counted, never parsed), UNREADABLE files and empty surfaces are honest rows. rc 0 report / 4 findings / 2 refusal.
python3 -m cli_anything.sourcespeek --json
What key material apt verification actually consults: every regular file in trusted.gpg.d / apt keyrings / shared keyrings with format class from magic bytes ONLY (armored / gpg v4 / gpg v3 / unknown / empty — key bytes are never dumped, the battery pins a canary), permission posture (world-/group-writable flags), plus a Signed-By cross-view resolving every keyring target your source files declare — MISSING / UNREADABLE / RELATIVE / readable, each with the file:line list that declared it. rc 0 report / 4 findings / 6 every-target-exists-but-none-readable / 2 refusal.
python3 -m cli_anything.keyringpeek --no-cross
Why does apt refuse or force this version? Every Package/Pin/Pin-Priority block from classic preferences plus the preferences.d layer, anchored file:line. Pin classes (origin / release / version / package / unknown) and risk classes: HOLD_NEGATIVE (never-install), NOT_CANDIDATE (0<p<100), DOWNGRADE_RISK (>1000 forced downgrades), WILDCARD packages, DUPLICATE pins with provenance, PRIORITY_UNPARSEABLE honesty, MALFORMED_BLOCK rows with the offending fields echoed. Pin values are configuration, not secrets — they print verbatim (battery-pinned). rc 0 report / 4 findings / 2 refusal.
python3 -m cli_anything.prefpeek --json
What APT's configuration turns ON this host: classic apt.conf plus the apt.conf.d drop-in layer — APT::Periodic keys with the truthy law (nonzero or true/yes = PERIODIC_ENABLED), Acquire proxy directives with credentials masked in-URL and non-loopback http/ftp proxies flagged, Unattended-Upgrade declaration blocks, brace-balance structural errors. Plus the auth.conf.d credential store censused by MODE/SIZE/NAME ONLY — expected 0600, world/group readable is a finding, contents are never read (runtime canary-pinned). rc 0 report / 4 findings / 2 refusal.
python3 -m cli_anything.aptconfpeek --auth-dir /your/auth.conf.d
cd <tool>/agent-harness && python3 ../../runner_count.py \ cli_anything/<tool>/tests/test_core.py
Battery truth: 396 executed checks per sweep (94 + 101 + 98 + 103), fired twice with 0 failures each, plus a clean-room re-fire of every battery from this exact shipping zip — 0 failed. zip sha256 20bc0f8adbfb970c5cd3b03b03077ce0dde53bd6e5416dcbf4d799966702ed43 (51,649 bytes, 39 files, 0 junk).
Laws: named rc2 refusals for bad arguments (never a stack trace); secret-class values never appear in any output (URI userinfo and proxy credentials masked, auth contents never read, key bytes never dumped); honest absence rows; no spawns, no writes, no network. Apache-2.0. Support: [email protected]