Web-Surface Header, TLS and Cookie Audit (On the Wire)
Exit 0 clean, 1 findings, 2 could not run; two is not a worse one.
$29
Works with the AI Agents you already use
Web-Surface Header, TLS and Cookie Audit (On the Wire)
Example session with this skill installed
Our nginx configs all have the security headers but a pentest says they're missing on some hosts. Audit every host this server actually serves and tell me what clients really get.
- Read your context and instructions
- Compiled the web-surface header tls
Summary
Audited 41 hosts enumerated from nginx -T (a static list in the runbook named 32). 9 hosts send none of the baseline headers on the wire; the configs are right and a location block discards them.
$ python -I scripts/web_surface_audit.py --from-nginx --exclusions /etc/web-audit/exclusions.conf
note: 1 host(s) excluded by /etc/web-audit/exclusions.conf: auth.example.com
HOST CODE HDRS HSTS CERT RDR CKIE REASON
---------------------------------- ----- ----- ----- ------ ---- ----- ------------------------------
api.example.com 200 MISS ok 61d ok ok no policy,options,options
app.example.com 200 MISS ok 61d ok MISS no policy,options,options; cookie flags
files.example.com 200 ok - 9d - ok no HSTS; cert 9d; http!redirect
... (6 more with findings)
www.example.com 200 ok ok 61d ok ok ok
clean : 32 / 41 reachable (41 enumerated)
baseline headers : 32 / 41
HSTS : 40 / 41
cert > 21d : 40 / 41
http->https : 40 / 41
cookie flags : 40 / 41
Root cause (9 hosts): each has location /api/ { add_header Cache-Control no-store; }. nginx replaces every inherited add_header inside that block, so the final response for / after the app's redirect to /api/... has no CSP, X-Content-Type-Options or X-Frame-Options. Config review could not see it; the wire shows it.
Other findings
app.example.com:sidcookie missing HttpOnly and SameSite.files.example.com: no HSTS, certificate expires in 9 days (renewal cron failed),http://answers 200 instead of redirecting.
Fix (one include, always, in every location with its own add_header; see reference/why-the-wire.md), then rerun: 41/41 clean. The daily timer now runs --observations and the rule engine refuses envelopes older than 7 days.
Connects securely to your tools. The creator never sees your data.
About this skill
A site can have perfect security headers in every nginx config and send none of them: add_header inside a location block discards the server-level ones. Config review cannot see that. This audit checks the final response a real client receives, per host, and fails on the wire state whatever the config says.
Checks per host
Baseline headers on the final response after redirects (CSP, X-Content-Type-Options, X-Frame-Options; configurable), HSTS present with a minimum max-age, certificate days to expiry, http:// answering 301 or 308 to https:// on the first hop (a 302 is a downgrade window), Secure/HttpOnly/SameSite on every Set-Cookie with the missing flags named, optional referrer-policy and permissions-policy, server version disclosure reported.
Honest denominator
--from-nginx audits every server_name nginx itself resolves, minus an exclusions file where each skipped host has a reason; an empty enumeration or zero reachable hosts is exit 2, never a clean 0/0. A hardcoded list once said 32 clean hosts while nginx served 41, three of them failing.
Outputs
A table with a reason per host, --json with redirect hops and cookie problems, --observations as a sealed envelope with collector name, collectedAt and expiresAt so a rule engine can refuse stale evidence. Exit 0 clean, 1 findings, 2 could not run; two is not a worse one.
Reference
The nginx inheritance trap with the snippet pattern that fixes it (always, include in every location), why exit 2 is not a worse 1, and what each check protects.
Requirements
13 offline tests with a fake fetcher. Python 3.9+, standard library only, read-only: one GET over https, one over http and one TLS handshake per host.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Audits home paths only. No DOM-level analysis for CSP effectiveness. Enumeration requires Nginx; other servers need manual host files. TLS trust depends on the Python environment trust store.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 19 days ago
- Software
Python 3.9+
- Optional
- nginx
nginx is only for --from-nginx host enumeration.
Permissions
Allowed Hosts
Shell runs python and, with --from-nginx, `nginx -T` to read the served host names. Read files: an optional hosts file and exclusions file. Write files: none (output to stdout; redirect it yourself). Network: one GET over https (following redirects), one GET over http and one TLS handshake per host you name. Nothing is changed on any host.