/super-review:web-headersfrom super-review
Web security headers anti-patterns reference loaded by super-review:run. Covers CSP (nonces/strict-dynamic/Trusted Types), HSTS, CORS, COOP/COEP, Permissions-Policy, SRI, cookie attributes (Secure/HttpOnly/SameSite/__Host-/Partitioned/CHIPS), Referrer-Policy. Load when reviewing HTTP response code, middleware, edge config, or framework header settings.
Ships in super-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
HTTP-header-level hardening checks for the Cybersec L5 reviewer in super-review:run. Auto-loaded when the diff touches middleware, next.config, vercel.json, nginx.conf, response-header setters, or cookie code.
'unsafe-inline' and 'unsafe-eval' in script-srcDetection signal: Content-Security-Policy value contains 'unsafe-inline' for script-src or any 'unsafe-eval'.
Verbatim bad example:
res.setHeader('Content-Security-Policy',
"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'");
Why it's wrong: Defeats CSP's XSS mitigation entirely — inline <script> and eval/new Function execute attacker payloads.
Fix: Per-request nonce + strict-dynamic: script-src 'nonce-${nonce}' 'strict-dynamic' https: 'unsafe-inline'; (legacy unsafe-inline is ignored by browsers that honor nonce/strict-dynamic, so it acts as fallback for ancient UAs).
Review prompt one-liner: Reject any CSP containing 'unsafe-eval' or any script-src that mixes 'unsafe-inline' without a nonce/hash + 'strict-dynamic'.
CWE: CWE-79, CWE-1021.
frame-ancestors and base-uriDetection signal: CSP without base-uri 'none' or frame-ancestors.
Verbatim bad example:
"default-src 'self'; script-src 'self' 'nonce-abc'"
Why it's wrong: default-src does not cover base-uri or frame-ancestors; attacker can inject <base href="//evil/"> to redirect relative script URLs, bypassing nonced CSP; missing frame-ancestors re-enables clickjacking even with X-Frame-Options dropped.
Fix: Always add base-uri 'none'; frame-ancestors 'none'; (or specific origins) explicitly.
Review prompt one-liner: Every CSP must explicitly set base-uri and frame-ancestors; do not rely on default-src fallback.
CWE: CWE-1021.
Detection signal: No require-trusted-types-for 'script' directive; presence of innerHTML/document.write/eval in client bundles.
Verbatim bad example:
// CSP omits trusted-types entirely
"script-src 'nonce-abc' 'strict-dynamic'"
Why it's wrong: Even strict CSP allows DOM-XSS sinks (Element.innerHTML, Range.createContextualFragment, Worker ctor) to execute attacker strings. Trusted Types (baseline across major browsers since early 2026) forces typed values into sinks.
Fix: require-trusted-types-for 'script'; trusted-types default app#html; and emit values via trustedTypes.createPolicy(...).
Review prompt one-liner: For any browser app with React/Vue/Svelte server-rendered HTML, require Trusted Types enforcement in CSP.
CWE: CWE-79.
Access-Control-Allow-Origin reflecting Origin with credentialsDetection signal: Access-Control-Allow-Origin: <req.headers.origin> + Access-Control-Allow-Credentials: true; or * paired with credentials (browser rejects, but reflection is the real bug).
Verbatim bad example:
res.setHeader('Access-Control-Allow-Origin', req.headers.origin);
res.setHeader('Access-Control-Allow-Credentials', 'true');
Why it's wrong: Any origin (including https://evil.com) can issue credentialed cross-site reads, exfiltrating authenticated responses (CSRF read).
Fix: Hardcoded allow-list; if multiple origins needed, check req.headers.origin against a Set and only then echo. Never combine * with Allow-Credentials.
Review prompt one-liner: Any CORS handler that echoes Origin must validate it against a static allow-list before responding, especially when credentials are allowed.
CWE: CWE-942, CWE-346.
includeSubDomains and preload (and short max-age)Detection signal: Strict-Transport-Security: max-age= < 31536000; missing includeSubDomains; missing preload.
Verbatim bad example:
res.setHeader('Strict-Transport-Security', 'max-age=3600');
Why it's wrong: Attacker on hostile network downgrades first visit; one-hour max-age expires before user returns.
Fix: max-age=63072000; includeSubDomains; preload and submit to hstspreload.org.
Review prompt one-liner: HSTS must have max-age ≥ 1 year, includeSubDomains, and preload for production HTTPS apps.
__Host- prefix, Secure, HttpOnly, SameSiteDetection signal: Set-Cookie: without Secure, HttpOnly, or SameSite; session cookie not using __Host- prefix.
Verbatim bad example:
res.cookie('session', token, { httpOnly: true }); // no Secure, no SameSite
Why it's wrong: Cookie can be set/overwritten by sibling subdomain, sent over HTTP, attached to cross-site POST (CSRF), or read by document.cookie.
Fix: Set-Cookie: __Host-session=...; Secure; HttpOnly; Path=/; SameSite=Lax (or Strict for high-value). __Host- enforces no Domain attribute, Path=/, Secure.
Review prompt one-liner: Session/auth cookies must use __Host- prefix, Secure, HttpOnly, and explicit SameSite.
CWE: CWE-1004, CWE-614, CWE-352.
Partitioned (CHIPS)Detection signal: Embeddable widget setting cross-site cookie without Partitioned.
Verbatim bad example:
res.setHeader('Set-Cookie', '_widget=abc; SameSite=None; Secure');
Why it's wrong: Chrome 115+ default-blocks unpartitioned third-party cookies; Firefox ETP-Strict partitions all third-party cookies by default; widget breaks silently.
Fix: Set-Cookie: __Host-_widget=abc; SameSite=None; Secure; Partitioned; Path=/.
Review prompt one-liner: Any SameSite=None cookie set from an embeddable/iframe context must include Partitioned.
Detection signal: App uses SharedArrayBuffer, performance.now() high-res timers, or WASM threads but no Cross-Origin-Opener-Policy: same-origin + Cross-Origin-Embedder-Policy: require-corp|credentialless.
Why it's wrong: Spectre side channels are unmitigated; SharedArrayBuffer is silently disabled; tab can be referenced via window.opener for tab-nabbing.
Fix: Cross-Origin-Opener-Policy: same-origin, Cross-Origin-Embedder-Policy: credentialless (less invasive than require-corp), and Cross-Origin-Resource-Policy: same-origin on owned assets.
Review prompt one-liner: Any app using SAB or precise timers must set COOP same-origin + COEP credentialless (or require-corp).
Detection signal: No Referrer-Policy header (browser default varies) or unsafe-url; password-reset/magic-link URLs containing tokens in query string.
Verbatim bad example:
<!-- Reset link: https://app/reset?token=abc123 -->
<!-- No Referrer-Policy → token sent to every third-party asset on the page -->
Why it's wrong: First page load after click sends the URL (including token) in the Referer header to every analytics/CDN/font origin.
Fix: Referrer-Policy: strict-origin-when-cross-origin globally; move tokens to POST body / fragment / first-party only paths.
Review prompt one-liner: Set Referrer-Policy explicitly and verify no auth tokens appear in URL query parameters.
CWE: CWE-598.
Detection signal: No Permissions-Policy header at all.
Why it's wrong: Third-party iframes/scripts inherit ability to request camera, microphone, geolocation, payment, USB, serial, bluetooth, browsing-topics, FLoC/interest-cohort. Even denied user prompts are phishing surface.
Fix: Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=(), serial=(), bluetooth=(), browsing-topics=(), interest-cohort=() — opt-in only what you use.
Review prompt one-liner: Production responses must include a Permissions-Policy that denies all sensitive features by default.
Detection signal: <script src="https://cdn.tld/lib.js"> without integrity=.
Verbatim bad example:
<script src="https://cdn.example.com/widget.js"></script>
Why it's wrong: CDN compromise / takeover (Polyfill.io 2024) silently injects malicious JS into every visitor.
Fix: <script src="..." integrity="sha384-..." crossorigin="anonymous"> and pin versioned URLs; or self-host.
Review prompt one-liner: Every cross-origin <script> or <link rel="stylesheet"> in HTML must carry an integrity attribute or be self-hosted.
CWE: CWE-353.
frame-ancestorsDetection signal: Only X-Frame-Options: DENY set; no frame-ancestors in CSP.
Why it's wrong: Modern browsers prefer frame-ancestors; some embedding contexts (e.g. PDF viewers, custom UAs) honor only the CSP form. XFO does not support multiple allowed origins.
Fix: Set both: X-Frame-Options: DENY plus Content-Security-Policy: frame-ancestors 'none'.
Review prompt one-liner: Verify both XFO and CSP frame-ancestors are present and consistent.
CWE: CWE-1021.
strict-dynamic + Trusted TypesContent-Security-Policy:
default-src 'self';
script-src 'nonce-{random}' 'strict-dynamic' 'unsafe-inline' https:;
base-uri 'none';
frame-ancestors 'none';
require-trusted-types-for 'script';
trusted-types app#html default;
Why it works: Inline scripts forbidden unless they carry the per-request nonce; loaded scripts can transitively load more (strict-dynamic) but only those they vouch for; DOM-XSS sinks reject string inputs; clickjacking + base-href injection closed. Affirm: CSP pins nonce + strict-dynamic, declares base-uri + frame-ancestors explicitly, and enforces Trusted Types.
__Host- prefixed session cookieSet-Cookie: __Host-session=<token>; Path=/; Secure; HttpOnly; SameSite=Lax
Why it works: __Host- enforces no Domain attribute, Path=/, Secure; sibling subdomain cannot set/overwrite; HttpOnly blocks document.cookie reads; SameSite mitigates CSRF.
Affirm: Every session/auth cookie uses __Host- prefix, Secure, HttpOnly, and explicit SameSite.
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Why it works: 2-year max-age survives intermittent visits; includeSubDomains covers the whole org; eligible for hstspreload.org so the first visit is also HTTPS-only.
Affirm: HSTS is max-age ≥ 31536000 + includeSubDomains + preload.
const ALLOWED = new Set(['https://app.example.com', 'https://admin.example.com']);
const origin = req.headers.origin ?? '';
if (ALLOWED.has(origin)) {
res.setHeader('Access-Control-Allow-Origin', origin);
res.setHeader('Vary', 'Origin');
res.setHeader('Access-Control-Allow-Credentials', 'true');
}
Why it works: Only known origins receive credentialed CORS responses; Vary: Origin prevents cache poisoning; no wildcard with credentials.
Affirm: Every CORS handler matches Origin against a static allow-list before echoing it; Vary: Origin is always set.
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
Cross-Origin-Resource-Policy: same-origin
Why it works: Enables SharedArrayBuffer and high-res timers safely; blocks tab-nabbing via window.opener; credentialless mode is less restrictive than require-corp for third-party resources.
Affirm: Apps using SharedArrayBuffer / precise timers set COOP same-origin + COEP credentialless (or require-corp).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
22 skills in this plugin
/accessibilityAccessibility (WCAG 2.2) review referenceWCAG 2.2 accessibility anti-patterns reference loaded by super-review:run when the diff touches client-facing UI. Covers the new 2.2 criteria (Focus Appearance, Dragging, Target Size, Consistent Help, Redundant Entry, Accessible Authentication) plus the perennial misses — div-as-button, focus management on route/modal change, contrast, label/placeholder confusion, aria-hidden on focusable elements, alt-text discipline. Patterns automated axe/Lighthouse scans miss. Load when `client/`, `app/`, `src/`, `*.tsx`/`*.jsx`/`*.vue`/`*.svelte` files in diff, OR HTML templates touched./audit-selfsuper-review:audit-selfSelf-audit sub-skill for super-review. Reads past super-review comments on a PR (or across multiple PRs in a repo) and audits the audits — surfaces repeated false positives, missed-positive patterns, and proposes concrete skill-prompt edits. Use when the user says "audit super-review", "review the reviews", "what's super-review getting wrong", "/super-review:audit-self", or wants to tune the skill against this team's actual usage history.Generated from the plugin's indexed repository (mattnowdev/super-review) — no native marketplace selected
npx claudepluginhub p/mattnowdev-super-review