CLI-Anything Bundle #60 — Web Server Trust Recon Pack
Four agent-native read-only harnesses that census the web-server config trust surface: the config layers a Linux host actually serves HTTP through — nginx's include-layered directive grammar, Apache's section-nesting ruleset, the virtual-host enablement layer that decides which name answers for which docroot on BOTH stacks, and Caddy's site-block policy file. Each grammar is a place where one mis-typed line quietly hands the internet more access than intended. Adjacent, not overlapping: network recon (Bundle #8) and packet filters (#39) cover different surfaces — no other bundle owns these four configs.
- nginxconfpeek — nginx.conf + one-hop include layer trust census. Directive/block grammar with UNTERMINATED_DIRECTIVE and UNBALANCED_BRACES rows named file:line (cap 10 + truncation, never a crash). The include law most tools get wrong: glob includes expand sorted, one hop, depth capped — a pattern matching nothing is an INCLUDE_ABSENT finding (nginx would refuse to start on it). TLS trust: WEAK_PROTOCOL_ALLOWED per-token (SSLv2/SSLv3/TLSv1/1.0/1.1 carried), WEAK_CIPHER_TOKEN census (RC4/3DES/MD5/NULL/EXP/DES), CIPHERS_ABSENT; SERVER_TOKENS_EXPOSED absent-law (nginx ships version disclosure ON by default); AUTOINDEX_ON, USER_ROOT, LARGE_BODY_LIMIT, LISTEN census, and CERT_ABSENT stat law on
ssl_certificate paths. Stat hygiene on main + every include.
- apacheconfpeek — Apache core config + include layer census. Section-nesting grammar (
<Directory>/<Files>/<Location>/<IfModule>/<VirtualHost>) with UNCLOSED_SECTION and UNBALANCED rows; Include vs IncludeOptional pairing law — missing Include = INCLUDE_ABSENT finding, missing IncludeOptional = INCLUDEOPT_ABSENT DATA row (that's its documented semantics — honest, both directions). The default-disclosure absent-laws: SERVER_TOKENS_FULL_DEFAULT (Apache ships Full), TRACE_UNRESTRICTED (TRACE method default-enabled) with explicit On/Off winners carried; SERVER_SIGNATURE_ON, ALLOWOVERRIDE_ALL, OPTIONS census, LISTEN census. Stat law throughout.
- vhostpeek — virtual-host enablement + name-collision census across BOTH stacks. nginx sites-enabled AND apache sites-enabled in one family: VHOST_ENABLED rows with single-hop symlink resolve (link mask never judged), DANGLING_VHOST for broken targets, VHOST_DISABLED available-not-enabled rows, and the takeover-class law: SERVER_NAME_DUP — the same server_name claimed by two enabled files with both file:lines carried (SERVERNAME_DUP for Apache vhosts), SERVER_NAME_ABSENT. Port census (VHOST_PORT), certificate paths statted never trusted (CERT_PATH_ABSENT), and directory-write law: VHOST_DIR_WORLD_WRITABLE (a world-writable sites-enabled is a vhost-hijack surface).
- caddypeek — Caddyfile site-block policy census. Site-block grammar with UNCLOSED_SITE/UNBALANCED_BRACES rows; import glob one-hop with IMPORT_ABSENT; per-site TLS policy: TLS_ABSENT (with the auto-HTTPS context carried as data — the finding stays about explicit policy), WEAK_TLS_PROTOCOL, TLS_INTERNAL/TLS_EMAIL rows; the admin-plane law: ADMIN_WILDCARD when the admin endpoint listens beyond localhost (ADMIN_DEFAULT localhost:2019 as data); HEADER/HSTS census; BROWSE_ENABLED directory-listing finding. Stat law on main + imports.
Contract: rc0 clean / rc4 findings / rc6 nothing readable / rc2 usage, --json emits one report object per tool with the --conf main-path override flag so an agent can point the census laws at any tree or fixture. Pure Python stdlib; zero subprocesses, zero writes, zero sockets; web-server configs are only ever READ and certificate presence is verified, not contents — the census never "fixes" an exposed posture, it names it.
Self-test battery: 734 fixture-based executed assertions inside (runner_count.py) — verified fired twice consecutively from this exact tree plus two clean-room fires from this shipping zip, 0 failed.
MIT license · stdlib-only · Python 3.8+. Read-only by construction: nothing is enabled, disabled, or written by the census.