Sec Headers

Grades the HTTP security headers of a URL — HSTS, Content-Security-Policy, framing protection (X-Frame-Options/frame-ancestors), X-Content-Type-Options, Referrer-Policy, and cookie Secure/HttpOnly flags — with an A-F letter grade and per-header pass/warn/fail. Stdlib-only fetch, no browser.

trac3r00 155ff86 2 files · 5.1 KB Updated

File contents

Sec Headers

The security headers browsers enforce, graded in one request.

Commands

python3 scripts/sec_headers.py https://your-app.com
python3 scripts/sec_headers.py https://your-app.com --json --min-grade B

Checks

Header Missing =
Strict-Transport-Security FAIL (-25): downgrade attacks possible
Content-Security-Policy FAIL (-25): no XSS second line of defense
X-Frame-Options or CSP frame-ancestors WARN (-10): clickjacking possible
X-Content-Type-Options WARN (-10): MIME confusion
Referrer-Policy WARN (-10): URL leakage
Cookie Secure/HttpOnly WARN (-10): session theft surface

Grade: A ≥90, B ≥75, C ≥60, D ≥40, F below. --min-grade makes it a CI gate.

Pairs with

api-tester (endpoint behavior), secret-gate (credential leaks in the code behind those headers), net-probe (TLS validity of the connection).

trac3r00/agent-skills/tree/main/skills/sec-headers commit 155ff86727

Frequently asked questions

npx skillmds@latest add trac3r00/sec-headers