Analyzing Security Headers
Overview
Evaluate HTTP response headers for web applications against OWASP Secure Headers Project recommendations and browser security baselines. Identify missing, misconfigured, or information-leaking headers across both HTTP and HTTPS responses.
Prerequisites
- Target URL or domain name accessible over the network
- Authorization to perform HTTP requests against the target domain
- Network connectivity for both HTTP and HTTPS protocols
- Optional: write access to
${CLAUDE_SKILL_DIR}/security-reports/ for persisting results
Instructions
- Accept the target domain. If only a domain name is provided, default to
https://. For batch analysis, accept a newline-separated list.
- Fetch response headers using
WebFetch for both HTTP and HTTPS endpoints. Record the full redirect chain and final destination URL.
- Evaluate critical headers -- flag any that are missing or misconfigured:
Strict-Transport-Security: require max-age>=31536000, includeSubDomains, and preload eligibility
Content-Security-Policy: check for unsafe-inline, unsafe-eval, overly broad default-src, and missing frame-ancestors
X-Frame-Options: require DENY or SAMEORIGIN
X-Content-Type-Options: require nosniff
Permissions-Policy: verify camera, microphone, geolocation restrictions
- Evaluate important headers -- report status and recommendations:
Referrer-Policy: recommend strict-origin-when-cross-origin or no-referrer
Cross-Origin-Embedder-Policy (COEP), Cross-Origin-Opener-Policy (COOP), Cross-Origin-Resource-Policy (CORP)
- Check for information disclosure -- flag
Server, X-Powered-By, X-AspNet-Version, and any header revealing technology stack or version numbers.
- Inspect cookie attributes on
Set-Cookie headers: verify Secure, HttpOnly, SameSite=Lax|Strict, and __Host-/__Secure- prefix usage.
- Calculate a security grade: A+ (95-100), A (85-94), B (75-84), C (65-74), D (50-64), F (<50) based on weighted presence and correctness of each header.
- Generate per-header remediation directives with configuration examples for Nginx, Apache, and Cloudflare.
See ${CLAUDE_SKILL_DIR}/references/implementation.md for the five-phase implementation workflow.
Output
- Headers Analysis Report: overall grade, per-header status (present/missing/misconfigured), and risk impact
- Remediation Checklist: prioritized fixes with server configuration snippets
- Cookie Security Assessment: attribute compliance for each
Set-Cookie header
- Comparison Table: side-by-side HTTP vs. HTTPS header differences
Error Handling
| Error |
Cause |
Solution |
| Failed to connect to domain |
DNS resolution failure, firewall block, or domain down |
Verify domain spelling and DNS records; test alternate protocols |
| SSL certificate verification failed |
Expired, self-signed, or mismatched certificate |
Note TLS issue in report; indicates HSTS not properly enforced |
| Too many redirects |
Redirect loop between HTTP and HTTPS |
Report the redirect chain and analyze headers at each hop |
| HTTP 429 Too Many Requests |
Rate limiting by target server |
Implement backoff; queue domain for delayed re-analysis |
| Headers differ between HTTP and HTTPS |
Inconsistent server configuration |
Report both sets; highlight critical differences and flag HSTS gap |
Examples
- "Analyze security headers for
https://claudecodeplugins.io and explain any CSP or HSTS issues."
- "Check headers for
example.com on both HTTP and HTTPS and provide an Nginx remediation config."
- "Batch-analyze headers for five staging domains and rank them by security grade."
Resources
Source: jeremylongshore/claude-code-plugins-plus-skills → skills/.curated/analyzing-security-headers/SKILL.md
Also appears in: jeremylongshore/claude-code-plugins-plus-skills/plugins/security/security-headers-analyzer/skills/analyzing-security-headers/SKILL.md
1---
2name: analyzing-security-headers
3description: "'Analyze HTTP security headers of web domains to identify vulnerabilities and misconfigurations. Use when you need to audit website security headers, assess header compliance, or get security recommendations for web applications. Trigger with phrases like \"analyze security headers\", \"check HTTP headers\", \"audit website security headers\", or \"evaluate CSP and HSTS configuration\". '"
4allowed-tools: "Read, WebFetch, WebSearch, Grep"
5category: security-and-compliance
6source_repo: jeremylongshore/claude-code-plugins-plus-skills
7source_path: "skills/.curated/analyzing-security-headers/SKILL.md"
8source_url: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/skills/.curated/analyzing-security-headers/SKILL.md
9metadata:
10 source: https://skillmd.com/skills/thedixitjain/analyzing-security-headers
11---
12
13# Analyzing Security Headers
14
15## Overview
16
17Evaluate HTTP response headers for web applications against OWASP Secure Headers Project recommendations and browser security baselines. Identify missing, misconfigured, or information-leaking headers across both HTTP and HTTPS responses.
18
19## Prerequisites
20
21- Target URL or domain name accessible over the network
22- Authorization to perform HTTP requests against the target domain
23- Network connectivity for both HTTP and HTTPS protocols
24- Optional: write access to `${CLAUDE_SKILL_DIR}/security-reports/` for persisting results
25
26## Instructions
27
281. Accept the target domain. If only a domain name is provided, default to `https://`. For batch analysis, accept a newline-separated list.
292. Fetch response headers using `WebFetch` for both HTTP and HTTPS endpoints. Record the full redirect chain and final destination URL.
303. Evaluate **critical headers** -- flag any that are missing or misconfigured:
31 - `Strict-Transport-Security`: require `max-age>=31536000`, `includeSubDomains`, and preload eligibility
32 - `Content-Security-Policy`: check for `unsafe-inline`, `unsafe-eval`, overly broad `default-src`, and missing `frame-ancestors`
33 - `X-Frame-Options`: require `DENY` or `SAMEORIGIN`
34 - `X-Content-Type-Options`: require `nosniff`
35 - `Permissions-Policy`: verify camera, microphone, geolocation restrictions
364. Evaluate **important headers** -- report status and recommendations:
37 - `Referrer-Policy`: recommend `strict-origin-when-cross-origin` or `no-referrer`
38 - `Cross-Origin-Embedder-Policy` (COEP), `Cross-Origin-Opener-Policy` (COOP), `Cross-Origin-Resource-Policy` (CORP)
395. Check for **information disclosure** -- flag `Server`, `X-Powered-By`, `X-AspNet-Version`, and any header revealing technology stack or version numbers.
406. Inspect cookie attributes on `Set-Cookie` headers: verify `Secure`, `HttpOnly`, `SameSite=Lax|Strict`, and `__Host-`/`__Secure-` prefix usage.
417. Calculate a security grade: A+ (95-100), A (85-94), B (75-84), C (65-74), D (50-64), F (<50) based on weighted presence and correctness of each header.
428. Generate per-header remediation directives with configuration examples for Nginx, Apache, and Cloudflare.
43
44See `${CLAUDE_SKILL_DIR}/references/implementation.md` for the five-phase implementation workflow.
45
46## Output
47
48- **Headers Analysis Report**: overall grade, per-header status (present/missing/misconfigured), and risk impact
49- **Remediation Checklist**: prioritized fixes with server configuration snippets
50- **Cookie Security Assessment**: attribute compliance for each `Set-Cookie` header
51- **Comparison Table**: side-by-side HTTP vs. HTTPS header differences
52
53## Error Handling
54
55| Error | Cause | Solution |
56|-------|-------|----------|
57| Failed to connect to domain | DNS resolution failure, firewall block, or domain down | Verify domain spelling and DNS records; test alternate protocols |
58| SSL certificate verification failed | Expired, self-signed, or mismatched certificate | Note TLS issue in report; indicates HSTS not properly enforced |
59| Too many redirects | Redirect loop between HTTP and HTTPS | Report the redirect chain and analyze headers at each hop |
60| HTTP 429 Too Many Requests | Rate limiting by target server | Implement backoff; queue domain for delayed re-analysis |
61| Headers differ between HTTP and HTTPS | Inconsistent server configuration | Report both sets; highlight critical differences and flag HSTS gap |
62
63## Examples
64
65- "Analyze security headers for `https://claudecodeplugins.io` and explain any CSP or HSTS issues."
66- "Check headers for `example.com` on both HTTP and HTTPS and provide an Nginx remediation config."
67- "Batch-analyze headers for five staging domains and rank them by security grade."
68
69## Resources
70
71- OWASP Secure Headers Project: https://owasp.org/www-project-secure-headers/
72- MDN Security Headers Guide: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#security
73- Security Headers Scanner: https://securityheaders.com/
74- Content Security Policy Reference: https://content-security-policy.com/
75- HSTS Preload Submission: https://hstspreload.org/
76- `${CLAUDE_SKILL_DIR}/references/errors.md` -- full error handling reference
77- `${CLAUDE_SKILL_DIR}/references/examples.md` -- additional usage examples
78- https://intentsolutions.io
79
80---
81
82**Source:** [`jeremylongshore/claude-code-plugins-plus-skills`](https://github.com/jeremylongshore/claude-code-plugins-plus-skills) → `skills/.curated/analyzing-security-headers/SKILL.md`
83
84**Also appears in:** `jeremylongshore/claude-code-plugins-plus-skills/plugins/security/security-headers-analyzer/skills/analyzing-security-headers/SKILL.md`