CLI-Anything Bundle #58 — VPN Tunnel Trust Recon Pack
Four agent-native read-only harnesses that census the VPN tunnel config trust surface: what the four tunnel-config layers on a Linux host actually protect and where one mis-typed line quietly hands a remote principal the keys, the routes, or the plaintext secrets of the whole machine — WireGuard's wg-quick files, OpenVPN's directive configs, strongSwan's swanctl.conf section stack, and NetworkManager's system-connection profiles. No other bundle owns this surface — B45 owns the CA/TLS trust store, B39 owns the packet filters, B55 owns file shares — the tunnel configs themselves are unclaimed census territory (fresh collision sweep: 0 exact / 0 name-class substring token collisions across the whole shipping catalog).
- wgconfpeek — /etc/wireguard/*.conf census under the [Interface]/[Peer] section stack. Private keys and pre-shared keys are stat-only: SECRET_PRESENT rows carry path, size, mode, owner — the value is never read and never printed. NO_PRIVATE_KEY named honestly. SAVECONFIG_ON finding (runtime state gets written back into the conf). PostUp/PreUp/PostDown/PreDown hook rows — command tokens counted, never executed. ALLOWED_ALL for 0.0.0.0/0 or ::/0 AllowedIPs, LISTEN_PORT, ENDPOINT (host:port, never resolved), DNS rows, NO_ADDRESS. Stat law: world-writable = finding, group-writable and non-root-owned = rows; symlinks resolved one hop, the link's own mask never judged.
- ovpnpeek — /etc/openvpn{,/client,/server,/conf.d} census of *.conf + *.ovpn directive grammar. auth-user-pass file pointers statted with contents never read; bare auth-user-pass = AUTH_INTERACTIVE; privilege-drop census (user/group present = PRIVILEGE_DROP, absent = NO_PRIV_DROP); TLS_MODE rows for tls-crypt vs tls-auth, NO_TLS_CONTROL when neither; CRL_ABSENT; KEY_DIRECTION_MISSING; script-security 2+ = SCRIPT_SECURITY_HIGH finding; inline <ca>/<secret> blocks counted, never printed; VERBOSE_LOG; duplicate remotes counted. All FILE_ARG targets (ca/cert/key/dh/crl) statted under the config root — never opened.
- swanctlpeek — /etc/swanctl/swanctl.conf census under the section-stack brace grammar: connections / authorities / secrets / pools per-section census; unterminated braces = UNPARSEABLE rows, never a crash. Secrets files statted SECRETS_WORLD_WRITABLE-finding / group-row — PSKs and private keys are never read. IKE_V1_DATA legacy-posture row; AUTH_EAP / AUTH_PUBKEY / AUTH_PSK rows; VERBOSE charondebug; CERT_DIR_CENSUS over x509/ x509ca/ private/ (file counts only); one-hop sorted includes with depth cap; companion /etc/ipsec.conf presence row with its one-hop include count.
- nmvpnpeek — /etc/NetworkManager/system-connections census of *.nmconnection + *.conf under the ini grammar. MISSING_CONNECTION_SECTION; [vpn] service-type census (openvpn / wireguard / strongswan / libreswan named); password-flags / secret-flags zero = PLAINTEXT_FLAGS finding; every inline secret key named with its value withheld (len=N) — private keys included; NO_PERMISSIONS row when permissions= is absent; AUTOCONNECT rows; wireguard profiles gated for ALLOWED_ALL + LISTEN_PORT; WORLD_READABLE = finding (secrets ride in the file), WORLD_WRITABLE = finding — symlink masks never judged.
The contract
Every tool: rc0 clean / rc4 findings / rc6 honest nothing-readable / rc2 usage; --json emits the full report; --dir path-override points the census laws at any tree or fixture. Pure Python stdlib — zero subprocesses, zero writes, zero sockets, zero network; tunnel configs are parsed, paths statted once, and key material is masked by name with length only. The census never "fixes" an exposed posture — it names it.
Self-test battery inside
714 fixture-based executed assertions (checks.py + runner_count.py per bundle norm) — verified as: two consecutive green fires from the shipping tree (714/0, 714/0) plus two clean-room fires from THIS exact shipping zip (714/0, 714/0). The battery pins rc laws, every finding code, the stat-only secret law (planted key material must never appear in any output), grammar edges, include caps, stat hygiene, and write-nothing fingerprints.
Who this is for
Admins who inherited VPN endpoints nobody fully trusts; hardening teams checking whether tunnels leak their own key material, world-readable profiles, or route-everything peers; agent builders who want their AI to census a host's tunnel trust posture without ever mutating it.
MIT licensed · Python 3.8+ · 40 files · stdlib-only