Repository navigation
Getting Started
Alexandr Krikun edited this page Oct 26, 2026
·
1 revision
Node.js 18 or newer. No other dependencies.
# one-off run
npx github:ksanyok/security-headers example.com
# global CLI
npm install -g github:ksanyok/security-headers
# as a library in your project
npm install github:ksanyok/security-headerssecurity-headers example.comThe first lines show the final URL after redirects and the grade with its score. Then each finding: ✖ a key protection is missing, ! a protection is weak or a cookie lacks flags, i optional hardening or information leaks. With --min the exit code is 1 when the grade is below the threshold.
| Code | Meaning |
|---|---|
| 0 | No errors (warnings allowed unless --strict) |
| 1 | Errors found (or warnings with --strict) |
| 2 | Bad arguments or the check could not run |
Fail if the grade drops below B
security-headers https://example.com --min BAnalyse headers you already have (no request from this tool)
curl -sI https://example.com | security-headers --stdinSee every response header
security-headers example.com --show-headersUse the online Security Headers Checker.
Home · Getting started · FAQ · Troubleshooting · Online tool