A Pre-Launch Security Headers and CSP Review: What It Covers, What It Doesn't, and a Remediation Item Template
A headers and CSP review before launch is useful and narrow. This article covers what to check against OWASP and MDN guidance, why a Report-Only policy doesn't enforce its own restrictions, and a remediation item format with evidence, severity reasoning, an owner and a retest, using a synthetic example.


Text equivalent. Pre-launch review Teaching diagram • Evidence, remediation and retest Synthetic response review HSTS: present; HTTPS behaviour untested Referrer / Permissions / frame-ancestors: present X-Content-Type-Options: missing > REM-01 X-Powered-By: exposed > REM-02 script-src unsafe-inline > REM-03 REM-03 / remediation Evidence > why it matters Severity rationale > fix Named owner > retest Status: record the result Finding REPORT-ONLY MONITORS; IT DOES NOT ENFORCE. Headers are a narrow review, not an authentication audit, pen test or compliance certificate. Synthetic local review • header presence and actual browser enforcement are different tests
Before a site goes live, someone should look at the HTTP response headers it sends and the Content Security Policy it sets. It's quick, the fixes are usually cheap, and getting them wrong is common. It's also easy to oversell. A tidy header report can make a site look "secure" when the review never touched login, permissions or server code.
This article sets out what a delivery-stage headers and CSP review covers, what it doesn't, and how to write findings the team can act on and verify.
Scope, stated plainly. This is a review of response headers and CSP before launch. It is not a penetration test, a code audit or a compliance assessment, and passing it doesn't certify anything. Every header value, finding and test result below comes from a synthetic local example: a small Node server on plain HTTP at 127.0.0.1, and headless Chrome 156 (one browser). It's not taken from any client site. Those conditions limit what the checks can show, and each limit is stated where it applies.
What the review covers, and what it doesn't
| In scope | Out of scope (needs other work) |
|---|---|
| Which security-relevant response headers are present, and their values | Whether authentication can be bypassed |
| Whether the CSP meaningfully restricts script execution | Whether users can reach data they shouldn't (authorization) |
Clickjacking protection (frame-ancestors) | Server-side input handling, injection, business-logic flaws |
Information leakage in headers (for example X-Powered-By) | Dependency vulnerabilities, secrets in code, infrastructure configuration |
| Consistency across page types (HTML, redirects, error pages, assets) | Anything that requires attacking the application |
Headers are browser-side instructions. The OWASP cheat sheet says "proper HTTP response headers can help prevent security vulnerabilities like Cross-Site Scripting, Clickjacking, Information disclosure and more." That's real value. But good headers and a high scanner score don't establish that authentication, authorization or server-side logic are correct. MDN says the same thing about the most important header: "Setting a CSP is not an alternative to sanitizing input."
The header review table
The expectations below come from the OWASP HTTP Headers Cheat Sheet, the OWASP Secure Headers Project and MDN. They're reference examples, not universal settings for every application. This is the synthetic review target's output, produced by a short script that compares observed headers with expectations. The script also asserts that this fixture produces exactly these three flags, and a run against different headers failed that assertion as intended:
| Header | Observed (synthetic) | Expected | Why it matters | Result |
|---|---|---|---|---|
Strict-Transport-Security | max-age=63072000; includeSubDomains | Present with a max-age (OWASP's example adds preload) | Tells browsers to use HTTPS for future requests | OK (value/presence only; behaviour not tested over HTTPS) |
Content-Security-Policy | default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.example.net; object-src 'none'; frame-ancestors 'none' | For this policy: no 'unsafe-inline' without a nonce or hash; ideally nonce- or hash-based | Main browser-side mitigation for XSS | Flag (REM-03) |
CSP frame-ancestors | 'none' | 'none' unless the site must be embeddable | Clickjacking protection; OWASP notes it "obsoletes X-Frame-Options for supporting browsers" | OK |
X-Content-Type-Options | missing | nosniff | Stops MIME-type sniffing | Flag (REM-01) |
Referrer-Policy | strict-origin-when-cross-origin | Set explicitly. OWASP: "Set the header explicitly rather than relying on browser defaults" | Limits URL leakage to other sites | OK |
Permissions-Policy | geolocation=(), camera=(), microphone=() | Disable features the site doesn't use | Reduces what embedded or compromised code can request | OK |
X-Powered-By | ExampleFramework | Absent. OWASP: "Remove all X-Powered-By headers" | Fingerprinting (OWASP adds that attackers have other ways to fingerprint) | Flag (REM-02, low) |
Three cautions on using the references:
- HSTS needs an HTTPS check, and
includeSubDomains/preloadneed care. MDN: "Browsers ignore the header if sent over HTTP", and "an IP address cannot be an HSTS host". So the localhost check above shows only that the header is present, not that HSTS works. Verify it on the real HTTPS host. Before addingincludeSubDomainsorpreload, confirm that every covered subdomain serves HTTPS. Browsers remember the policy formax-age, so a mistake persists, and OWASP warns that if HSTS is misconfigured, or the certificate has a problem, "legitimate users might be unable to access the website". - Don't paste a recommended header set wholesale. The Secure Headers Project publishes a strict reference set, which includes
Cache-Control: no-storeandCross-Origin-Embedder-Policy: require-corp. On a content or marketing site those can break caching or third-party embeds. Treat each header as a decision with a reason, not a checklist item. - Some advice reverses over time. OWASP's current advice for
X-XSS-Protectionis to "not set this header or explicitly turn it off" (X-XSS-Protection: 0), because the old filter could itself introduce vulnerabilities. Check current guidance rather than older scanner rules.
Check every response type, not just the home page. Run the review on an HTML page, a redirect, a 404, an API route and a static asset. MDN says a CSP "should be set on all responses to all requests, not just the main document". What each header does depends on the response. A CSP mainly governs documents that load and run content, and OWASP notes it "might be meaningless" on an API response that isn't rendered. So a header on an asset or API response doesn't prove the main documents are protected. Check those separately.
CSP: what Report-Only does and doesn't do
Content-Security-Policy-Report-Only is a monitoring approach for introducing a policy, and it needs its own privacy and compatibility review. It's also a commonly misunderstood header. In MDN's words, it "helps to monitor Content Security Policy (CSP) violations and their effects without enforcing the security policies."
To make that concrete, the synthetic server served the same page (with one inline script) under different headers. An asserting browser script loaded each one in headless Chrome 156.0.8078.47 and recorded 7 PASS / 0 FAIL. When the server was changed to send Report-Only where the enforcing header should be, the same script failed 2 checks, as intended:
| Header used | Inline script | securitypolicyviolation event |
|---|---|---|
Content-Security-Policy: script-src 'self' | Blocked | script-src-elem, disposition enforce |
Content-Security-Policy-Report-Only: script-src 'self' | Ran | script-src-elem, disposition report |
| Both: the enforcing policy above plus a separate Report-Only policy | Blocked (by the enforcing policy) | enforce and report |
Content-Security-Policy: script-src 'nonce-…' 'unsafe-inline' | Script without the nonce blocked; script with the nonce ran | enforce |
A report-only policy doesn't enforce its own restrictions, but another enforcing CSP may still apply. The violation is detected either way. The last row shows why a string match on 'unsafe-inline' isn't the whole story: in browsers that support nonces, 'unsafe-inline' is ignored when a nonce or hash is present. That's one browser on one fixture. It isn't a cross-browser result.
Two practical details from MDN:
- Reports aren't sent unless you configure them: "The CSP
report-todirective must be specified for reports to be sent." That also needs a configured reporting endpoint and browser support. MDN marks the olderreport-urias deprecated, but its current guidance is to declare both. The local violation events above don't prove that any remote report was delivered. No endpoint was exercised. - Reports can contain sensitive data, such as page URLs and samples of the blocked content. Decide where they go, who can read them and how long they're kept.
- Report-Only "is not supported inside a
<meta>element". It has to be a real response header.
Moving from Report-Only to enforcement is a compatibility exercise, not a switch. Collect reports across real page types and browsers. Fix or explicitly allow each legitimate source (analytics, embeds, payment widgets). Enforce only when the remaining reports are understood. Expect third-party scripts to be the slow part.
Allowlist versus strict CSP. MDN recommends nonce- or hash-based policies ("strict CSP") and warns that "allowlist CSPs are hard to get right and often policies inadvertently whitelist unsafe domains". The tradeoff is architecture. In Next.js, the official CSP guide notes that per-request nonces mean "you must use dynamic rendering to add nonces", so statically generated pages lose some caching benefits. That cost should be part of the decision, not something you discover after launch.
The remediation item template
A finding is only useful if someone can fix it and someone else can confirm the fix. Each item carries the same fields. Here's REM-03 from the synthetic review:
REM-03:script-srcallows'unsafe-inline'(synthetic example) - Evidence: response header ofGET /review-targeton the local review server, 2026-11-07:script-src 'self' 'unsafe-inline' https://cdn.example.net. Captured with a header fetch; full header block attached. - Why it matters (for this policy): it has no nonce or hash, so'unsafe-inline'takes effect here. MDN: "Developers should avoid'unsafe-inline', because it defeats much of the purpose of having a CSP. Inline JavaScript is one of the most common XSS vectors." - Severity: Medium (illustrative, reviewer's scale), with reasoning. It isn't evidence of an actual XSS defect. It removes the browser-side safety net if one does. The rating would rise if the site renders user-supplied content, and fall if every page is static and has no user input. - Recommended fix: move inline scripts to files, or use nonces or hashes. Re-check whetherhttps://cdn.example.netis still needed. Deploy the new policy as Report-Only first, withreport-toconfigured. - Owner: front-end lead (named person, not a team). Target: before launch, or a dated exception with a reason. - Retest (definition of done): (1) The production header no longer contains'unsafe-inline'inscript-src. (2) A browser check confirms a test inline script is blocked. Run it only in a controlled, authorized local or test fixture, never by injecting into a live site. (3) Key user journeys still work with the enforcing policy. (4) Report-Only reports from a sample period are reviewed and explained. - Status: open → fixed → verified (only the retest sets "verified").
REM-01 (X-Content-Type-Options: nosniff) and REM-02 (remove X-Powered-By) follow the same format with much shorter fixes. Usually it's one line of server or framework configuration, verified by re-fetching the headers.
Why severity needs reasoning: a bare "High/Medium/Low" from a scanner tells the owner nothing about context. One sentence about the conditions that would change the rating lets a non-specialist prioritize sensibly. It also stops a theoretical issue from blocking a launch with no explanation.
Re-review after changes
Headers drift. A new CDN, analytics tag or hosting platform can add, drop or override them. Re-run the same review after any infrastructure change and before each major release, and keep the review script with the project so the check costs minutes. Retest what you changed and what could have changed it, not only the item you fixed.
Where this fits in a delivery
Security belongs in design as well as delivery. A headers and CSP review is the delivery-stage check, alongside performance and SEO checks. SecureVibe, an AI security project in my portfolio, combines AI-assisted and manual review with a remediation list. This article describes the general method, not that project's configuration. If your product handles accounts, payments or sensitive data, plan a proper application security assessment as well. A headers review can't replace one.
Launching soon and want the headers and CSP checked, with findings your team can close? That's part of SaaS & Product Engineering delivery. Start here.
Sources
- OWASP Secure Headers Project: https://owasp.org/www-project-secure-headers/ (reference header set: https://raw.githubusercontent.com/OWASP/www-project-secure-headers/master/ci/headers_add.json)
- OWASP Cheat Sheet Series, HTTP Security Response Headers: https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html
- MDN, Content Security Policy (CSP) guide: https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP
- MDN, Content-Security-Policy-Report-Only: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy-Report-Only
- MDN, Strict-Transport-Security: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Strict-Transport-Security
- Next.js, Content Security Policy guide: https://nextjs.org/docs/app/guides/content-security-policy
What could this change for you?
Tell me what you’re building — I’ll tell you honestly where I’d start.
Start a project with me