Skip to content
Academy ofAI Learning

Store / Website and Server Hygiene Pack

Claude skill · Compliance and security

Security headers and TLS review

Your own site's headers, cookies and TLS reviewed, with the fixes in order and the breakage risk of each

When Claude uses it (the skill's own description)

Review the response headers, cookie flags, TLS version and certificate expiry of a site the user runs, and order the fixes with the breakage risk of each. Use when asked to check security headers, set up CSP, HSTS or cookie flags, or read a header checker's grade. Works from headers pasted from the user's own dev tools, curl on their own site, or a public checker.

security-hygiene/skills/security-headers-and-tls-review/SKILL.md

The skill, as Claude reads it

Plain text you can open, read and edit.

# Security headers and TLS review

A header review answers one question: what does this site tell browsers to do, and what is it leaving to chance. It works only on output from a site the user owns or administers, and ends with an ordered fix list, not a grade.

## Collect first

1. **Ownership**: the domain, and that the user runs it or administers it for the owner. Without this, stop.
2. **Raw response headers** for the home page and one logged-in or form page, from the browser's Network tab, `curl -sI` run by the user on their own site, or a public checker such as securityheaders.com.
3. **Cookies**: the Set-Cookie lines (name, Secure, HttpOnly, SameSite).
4. **TLS facts**: certificate issuer and expiry, protocol versions offered, from the padlock, the hosting panel or SSL Labs. A grade alone is not enough.
5. **What the site does**: static, CMS, e-commerce, third-party scripts, iframes, payment pages, admin area.
6. **Where headers are set**: web server (nginx, Apache, IIS), CDN, application, plugin. "Unknown" is fine.

## Method

1. **Transport first.** A certificate expiring within 30 days is the top item. TLS 1.0 or 1.1 still offered: flag for removal, noting any old client the user must keep. HTTP not redirecting to HTTPS: second item.
2. **Strict-Transport-Security.** A max-age of a year (31536000) once the site has run HTTPS-only without trouble; a day, then a week, while proving it. includeSubDomains only if every subdomain is HTTPS. preload only when the user accepts it is hard to undo; check the current requirements on hstspreload.org. Breakage risk: a subdomain still on HTTP.
3. **X-Content-Type-Options: nosniff.** Near-zero breakage risk; every site.
4. **X-Frame-Options or CSP frame-ancestors.** DENY or SAMEORIGIN unless the site is meant to be embedded. Breakage risk: a partner page that legitimately frames it.
5. **Referrer-Policy.** strict-origin-when-cross-origin by default; no-referrer where URLs carry tokens or personal data.
6. **Permissions-Policy.** Switch off camera, microphone, geolocation and payment unless the site uses them.
7. **Content-Security-Policy, last and in stages.** Build it from every script, style, font, image, frame and connect origin seen in the Network tab. Propose Content-Security-Policy-Report-Only with a reporting endpoint for two weeks, then enforce. Inline scripts and styles are the usual blockers; say whether the CMS needs 'unsafe-inline' for now and what that costs. Never enforce a strict policy on day one.
8. **Cookies.** Session and login cookies: Secure, HttpOnly, SameSite=Lax or Strict. Cookies set for cross-site use need SameSite=None with Secure. Analytics cookies are noted, not changed.
9. **Version strings.** Server and X-Powered-By headers that state versions: remove the version. Low priority, low risk.
10. **Order the fixes** by harm if left, then breakage risk, then effort. Each states where to set it, the config line if the server is known, the test afterwards and the rollback.

## Output

```
Site: <domain>   Reviewed: <date>   Source: <dev tools / curl / checker>
Checked: <headers and TLS facts actually seen>
Not checked: <logged-in pages, subdomains, cipher detail, or whatever the input lacked>
Findings: | Item | Seen | Recommended | Risk if left | Breakage risk | Where to set |
Fix order: 1 to n, each with the config line, the test afterwards and the rollback
CSP draft: report-only policy from observed origins, with the two-week plan
Cookies: per cookie, flags seen and recommended
Questions for the host or developer: <list>
```

## Rules

- Works only on a site the user owns or administers. It never tells the user how to probe or test anyone else's site, and never describes attacks.
- It reports what was checked and what was not. It never says the site is secure; headers are one layer.
- Every recommendation names its breakage risk and a test. HSTS preload and an enforced CSP are never recommended without the staged plan.
- Where a current best-practice value is uncertain, point to the OWASP Secure Headers Project and MDN, and say so.
- British spelling. No em dashes.

Also in the Website and Server Hygiene Pack