# Configure and Verify HTTP Security Headers

Missing or conflicting security headers can leave a site exposed or break expected browser behavior. This skill drafts platform-specific policies and guides staged verification.

## Install

```bash
npx skillstore add squirrelscan/security-headers
```

## Metadata

- Status: approved
- Slug: squirrelscan-security-headers
- Version: 0.1.3
- Author version: 0.1.3
- Skillstore revision: r1
- Version status: valid
- Tree hash: 66b10f2fa853b5b1c5d5b800e490f0e6bf9f26f8c494c87a3ea1c11142a0c4c8
- Author: squirrelscan
- GitHub username: squirrelscan
- License: See LICENSE file in repository root
- Repository: https://github.com/squirrelscan/skills/tree/b0a6a596009deae77e8b99666af348093dde2c51/skills/security-headers
- Ref: 3a13192889f5dd5655c6b4b159b77ad5cf23c95e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: network, filesystem, external\_commands
- Quality score: 50
- Quality tier: warning
- Public page: https://skillstore.pages.dev/skills/squirrelscan-security-headers
- Manifest: https://skillstore.pages.dev/api/skills/squirrelscan-security-headers/manifest

## Capabilities

- Check which security headers an authorized URL returns and note whether the app, host, or CDN sets them.
- Draft header configuration for Next.js, Vercel, Netlify, nginx, and Cloudflare.
- Plan a report-only CSP rollout using nonces or hashes and directive-specific allowlists.
- Tailor framing, referrer, and browser permission policies to site requirements.
- Check for duplicate headers and review browser console warnings during verification.

## Use Cases

- Add a Header Baseline: Draft a Next.js configuration that preserves the browser features and framing behavior the application needs.
- Resolve Duplicate Headers: Compare staging responses at the origin and CDN. Assign each header to one layer and check that the public response matches.
- Review a CSP Rollout: Define report-only acceptance checks for sign-in and checkout before approving an enforcing policy.

## Prompt Templates

### Review Supplied Headers

```
Review the redacted response headers I provide. Explain which baseline headers are missing and what each one does. Do not make network requests.
```

### Draft a Next.js Baseline

```
Review my Next.js header configuration. Propose a minimal update and start CSP in report-only mode. Preserve required framing and browser features. Do not deploy.
```

### Compare Origin and CDN Headers

```
Compare the redacted origin and CDN headers I provide for our staging site. Identify duplicates, recommend one owner for each header, and outline verification steps.
```

### Plan a CSP Enforcement Rollout

```
Use our resource inventory and redacted browser reports to refine a report-only CSP. Propose nonce or hash options, required origins, test flows, and rollback criteria.
```

## Limitations

- Live verification requires curl, network access, and permission to check the target.
- A header check cannot prove that the application is secure or that all pages behave the same.
- Shopify and Webflow may limit which headers site owners can change.
- Browser testing is needed to verify that CSP does not disrupt sign-in, forms, or checkout.

## Best Practices

- Use report-only CSP first and test core user flows before enforcing it.
- Start HSTS with a short lifetime and verify HTTPS readiness before including all subdomains or requesting preload.
- Verify only authorized targets and redact cookie values before sharing header output.

## Anti Patterns

- Enforcing a starter CSP before testing sign-in, checkout, or forms.
- Setting the same header at both the origin and CDN without checking the final response.
- Treating a complete header list as proof that the application is secure.

## Security Audit

- Audited at: 2026-11-30T20:44:00.191\+00:00
- Summary: The static matches are documentation links, installation paths, placeholders, configuration snippets, or Markdown delimiters, not traversal, backtick execution, or system reconnaissance. The workflow exposes raw cookie headers, declares broad command permissions, and suggests passive crawling without requiring authorization. Several HSTS examples also set long-lived subdomain policies despite the staged rollout advice.

## Stats

- Views: 0
- Downloads: 1
- Favorites: 0
- Popularity score: 0
