Skip to content
Back to skills

Http Sec Audit

ASecurity

Audit a website's HTTP security headers and cookie flags — CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, COOP/COEP, version-leaking banners, and Secure/HttpOnly/SameSite cookies. Use when the user asks to "check my site's security headers", "audit HTTP headers", "is my CSP/HSTS configured right", or "scan a URL for header misconfigs".

  • 12 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 8, 2026
securitypythongobashexpresssecurity

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add NovaCode37/claude-security-skills --skill http-sec-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Http Sec Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Http Sec Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/novacode37-http-sec-audit/badge)](https://www.skillsdirectory.com/skills/novacode37-http-sec-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: http-sec-audit
description: >-
  Audit a website's HTTP security headers and cookie flags — CSP, HSTS,
  X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy,
  COOP/COEP, version-leaking banners, and Secure/HttpOnly/SameSite cookies. Use
  when the user asks to "check my site's security headers", "audit HTTP headers",
  "is my CSP/HSTS configured right", or "scan a URL for header misconfigs".
license: MIT
---

# HTTP Security Header Audit

Checks a site's response headers against modern web-security best practices and
returns prioritized findings with concrete fixes. The analysis core is pure and
offline-testable; live scanning uses only Python's stdlib `urllib`.

## When to use this skill

- "Audit the security headers on https://example.com."
- "Is my CSP / HSTS / cookie config correct?"
- "Why is this site flagged for missing headers?"

## What it checks

- **Content-Security-Policy** — presence, `unsafe-inline`, wildcards.
- **Strict-Transport-Security** — presence and `max-age` length.
- **X-Content-Type-Options: nosniff**, **X-Frame-Options** / `frame-ancestors`.
- **Referrer-Policy**, **Permissions-Policy**.
- **Information disclosure** — `Server` / `X-Powered-By` version banners.
- **Cookies** — `Secure`, `HttpOnly`, `SameSite` (incl. `SameSite=None`
  without `Secure`).

## How to run it

```bash
# Live scan
python skills/http-sec-audit/audit.py https://example.com

# JSON output
python skills/http-sec-audit/audit.py https://example.com --json

# Offline: audit a saved raw header block (no network)
python skills/http-sec-audit/audit.py --headers-file response_headers.txt

# Only fail CI on high/critical (a missing Permissions-Policy is LOW and
# shows up on almost every site)
python skills/http-sec-audit/audit.py https://example.com --min-severity high

# Also check cross-origin isolation (COOP/COEP/CORP) and Cache-Control.
# Off by default: most sites have good reasons not to set these, and a
# reported finding fails the run.
python skills/http-sec-audit/audit.py https://example.com --advisory
```

**Exit codes:** `0` clean · `1` findings reported · `2` fetch/usage error.
Every reported finding fails the build; raise `--min-severity` to filter
advisory findings out of both the report and the exit code.

## Recommended workflow for Claude

1. Run the audit (live, or offline against captured headers).
2. Group findings by severity and present each with its one-line fix.
3. Offer ready-to-paste header snippets for the user's stack (nginx, Apache,
   Express, etc.) for the missing headers.
4. Only scan sites the user owns or is authorized to test.

Files in this skill

  • SKILL.md2 KB
  • audit.py8.7 KB
  • tests/test_audit.py3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.