http-security-headers
/install http-security-headers
HTTP Security Headers Analyzer
Analyze HTTP response headers for security best practices. Grade websites A-F with actionable recommendations.
Quick Scan (Single URL)
python3 scripts/scan_headers.py \x3Curl>
Batch Scan (Multiple URLs)
python3 scripts/scan_headers.py \x3Curl1> \x3Curl2> \x3Curl3>
Output Formats
# Text (default)
python3 scripts/scan_headers.py \x3Curl>
# JSON
python3 scripts/scan_headers.py \x3Curl> --format json
# Markdown report
python3 scripts/scan_headers.py \x3Curl> --format markdown
What It Checks
Security Headers (15 checks)
| Header | Impact | Description |
|---|---|---|
| Strict-Transport-Security | Critical | HTTPS enforcement, preload, max-age |
| Content-Security-Policy | Critical | XSS/injection prevention, directive analysis |
| X-Frame-Options | High | Clickjacking protection |
| X-Content-Type-Options | High | MIME sniffing prevention |
| Referrer-Policy | Medium | Information leakage control |
| Permissions-Policy | Medium | Browser feature restrictions |
| X-XSS-Protection | Low | Legacy XSS filter (deprecated but checked) |
| Cross-Origin-Opener-Policy | Medium | Cross-origin isolation |
| Cross-Origin-Resource-Policy | Medium | Resource sharing control |
| Cross-Origin-Embedder-Policy | Medium | Embedding restrictions |
| Cache-Control | Medium | Sensitive data caching |
| X-Permitted-Cross-Domain-Policies | Low | Flash/PDF cross-domain |
| Clear-Site-Data | Info | Logout/session clearing |
| X-DNS-Prefetch-Control | Low | DNS prefetch control |
| Content-Type | High | Charset and MIME type |
Negative Indicators (penalize)
Serverheader revealing version infoX-Powered-Byheader presentX-AspNet-Versionor similar tech disclosure
Grading
- A+ (100): All critical+high headers present with optimal config
- A (90-99): All critical headers, minor improvements possible
- B (75-89): Most headers present, some gaps
- C (60-74): Several missing headers
- D (40-59): Major security gaps
- F (\x3C40): Critical headers missing
CI Integration
Exit codes:
0— Grade A or better1— Grade B-C (warnings)2— Grade D-F (failures)
Use --min-grade B to set custom threshold:
python3 scripts/scan_headers.py https://example.com --min-grade B
Workflow
- User provides URL(s) to scan
- Run the scan script
- Present the grade and findings
- Highlight critical missing headers first
- Provide specific fix recommendations (Nginx, Apache, Cloudflare snippets)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install http-security-headers - After installation, invoke the skill by name or use
/http-security-headers - Provide required inputs per the skill's parameter spec and get structured output
What is http-security-headers?
Analyze HTTP security headers for any URL. Check for HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, CORS, and more.... It is an AI Agent Skill for Claude Code / OpenClaw, with 86 downloads so far.
How do I install http-security-headers?
Run "/install http-security-headers" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is http-security-headers free?
Yes, http-security-headers is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does http-security-headers support?
http-security-headers is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created http-security-headers?
It is built and maintained by charlie-morrison (@charlie-morrison); the current version is v1.0.0.