Skip to content
CSP + CORS + HSTSServer probe · Passive[ Passive HTTP Posture · A–F Grade ]

Security Headers, CSP & CORS Scanner

Grade any public URL (A–F) across HSTS preload, Google CSP Evaluator-style directive checks, CORS misconfigurations, framing, cookies, and version disclosure – with nginx, Vercel, Cloudflare, Express fixes and a starter CSP generator.

Passive HTTP inspection only – sends a single GET request with an untrusted Origin header plus a lightweight HEAD probe for Origin: null. Public domains only; responses are never stored.

Try sample:
[ Interactive Builder · 100% In-Browser ]

Starter Content-Security-Policy Generator

Toggle your stack dependencies to generate a hardened, non-bypassable baseline CSP with object-src 'none' and base-uri 'self'. Start in Report-Only mode, watch violations for a week, then switch to enforcing.

Script & Integration Toggles
Framing (frame-ancestors)

Comma- or space-separated domains added to connect-src. Special characters and semicolons are stripped automatically.

Content-Security-Policy (Enforcing Header)
Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-{{NONCE}}' 'strict-dynamic'; style-src 'self'; font-src 'self'; img-src 'self' data:; connect-src 'self'; frame-src 'none'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests
Safe Rollout (Report-Only Mode)
Content-Security-Policy-Report-Only: default-src 'self'; script-src 'self' 'nonce-{{NONCE}}' 'strict-dynamic'; style-src 'self'; font-src 'self'; img-src 'self' data:; connect-src 'self'; frame-src 'none'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests; report-uri /api/csp-report
DirectiveValueWhy It Matters
default-src'self'Fallback for any fetch directive not explicitly listed – restricts resources to your own origin.
script-src'self' 'nonce-{{NONCE}}' 'strict-dynamic'Requires a per-request cryptographic nonce on every <script> tag and trusts dynamically loaded sub-scripts via 'strict-dynamic' – immune to allowlist CDN bypasses.
style-src'self'Restricts stylesheets to your own origin (and Google Fonts if enabled), blocking injected inline style blocks.
font-src'self'Restricts web fonts to your own origin.
img-src'self' data:Controls image origins, including inline data: URIs (SVG/base64 icons) and enabled third-party thumbnails.
connect-src'self'Restricts fetch(), XMLHttpRequest, EventSource, and WebSocket endpoints to reduce data exfiltration paths.
frame-src'none'Blocks all outbound <iframe> embeds with 'none'.
object-src'none'Disables legacy <object>, <embed>, and <applet> plugins that frequently bypass script allowlists.
base-uri'self'Prevents injected <base href="..."> elements from hijacking relative script and asset URLs.
form-action'self'Restricts HTML form submissions to your own origin so injected forms cannot exfiltrate credentials.
frame-ancestors'none'Prevents any site (including your own) from embedding this application in an iframe.
upgrade-insecure-requests(flag)Instructs browsers to automatically upgrade any accidental HTTP subresource links to HTTPS.
[ Technical FAQ ]

How this check works

What is HSTS preload and what header values are required to qualify?

HTTP Strict Transport Security (HSTS) preload embeds your domain directly inside Chromium, Firefox, Safari, and Edge so browsers refuse plaintext HTTP even on the very first visit. To qualify for submission at hstspreload.org, your HTTPS root response must return Strict-Transport-Security with max-age of at least 31536000 seconds (1 year), the includeSubDomains directive, and the preload token – and every subdomain must serve valid HTTPS.

Why does the CSP Evaluator flag CDNs like cdnjs.cloudflare.com or ajax.googleapis.com?

Allowlist-based Content-Security-Policy rules that trust large public CDNs or user-content domains (such as ajax.googleapis.com, cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, raw.githubusercontent.com, or *.amazonaws.com) can be bypassed even without unsafe-inline. Attackers can load legacy AngularJS builds, JSONP endpoints, or their own hosted buckets from those origins to execute arbitrary JavaScript. Using per-request cryptographic nonces paired with strict-dynamic eliminates host-allowlist bypasses.

Why are missing object-src and base-uri directives treated as CSP security gaps?

Without object-src 'none', an attacker with HTML injection can embed legacy plugin payloads that bypass script-src controls. Without base-uri 'self' or 'none', an injected <base href="https://attacker.example/"> tag rewrites every relative script URL on the page – letting attackers hijack trusted nonced scripts that use relative paths.

Why are CORS Origin: null and Access-Control-Allow-Origin: * with credentials dangerous?

Any malicious website can force a victim browser to send Origin: null by making requests from a sandboxed iframe (<iframe sandbox="allow-scripts">). If an API reflects Access-Control-Allow-Origin: null alongside Access-Control-Allow-Credentials: true, the attacker can read authenticated responses cross-origin. Similarly, dynamically reflecting arbitrary Origins with credentials allows any third-party site to steal session-backed data, while combining * with Access-Control-Allow-Credentials: true violates the Fetch specification and signals a broken CORS filter.

How should we roll out a strict Content-Security-Policy without breaking production?

Generate a baseline policy with the Starter CSP Generator above and deploy it first as Content-Security-Policy-Report-Only with a report-uri or report-to collector. Monitor real browser violation reports across your critical user flows, replace any inline event handlers or unsafe-eval calls with nonced scripts, and then switch the header name to Content-Security-Policy to enforce.

Does this scanner send intrusive payloads or store target data?

No. The scanner performs only a passive GET request (with an untrusted Origin header) plus a lightweight HEAD probe with Origin: null, cancels the response body immediately, validates public DNS resolution on every redirect hop to prevent SSRF, and returns results with Cache-Control: no-store without persisting target headers.

Headers pass – what about your auth, APIs, and business logic?

Hardened HTTP headers close browser-layer gaps, while real breaches exploit broken object-level authorization, SSRF, and injection chains. Book a $2,500 Single-App Proven Audit for proof-gated offensive testing in 24 hours.