New: the free Technology Checker finds outdated libraries and known CVEs on any page. Check your site

Policy builders

Strict CSP and policy headers, built from real traffic.

A strict Content Security Policy is your best defense against cross-site scripting, and the hardest header to write by hand. CentralCSP builds it from what real browsers report, not from a crawler's snapshot of your homepage, and the same reports build your Permissions-Policy and Connection-Allowlist.

  • From real traffic

    Not a crawler snapshot

  • Report-only first

    Enforce when it's clean

  • Value by value

    Every source explained

  • Dashboard, API or MCP

    Same builder, same answer

Three builders

One set of reports, three policy headers.

Each builder reads the reports its header sends and proposes the strictest value your real traffic allows. Every plan includes all three.

Content-Security-Policy

Controls which scripts, styles, frames and connections your pages may load. The strongest defense you have against cross-site scripting and injected scripts.

  • Built from CSP violation reports
  • Detects the policy you already serve
  • Nonces and 'strict-dynamic' handled
Build a strict CSP

Permissions-Policy

Switches off the browser features your pages never use, like the camera, microphone, geolocation or the payment sheet, for your pages and every frame you embed.

  • Built from violation and potential-violation reports
  • 25 features, denied by default
  • Frames granted by origin
Build a Permissions-Policy

Connection-Allowlist

Limits where your pages can send data. Every destination not on the list is blocked, so an injected script has nowhere to send what it steals.

  • Built from Connection-Allowlist reports
  • WebSocket and WebRTC covered
  • Redirects blocked unless you allow them
Build a Connection-Allowlist

How the builders work

From real reports to a policy you can enforce.

A policy builder turns the violation reports browsers already send into a header. Instead of loading one page in a headless browser, the CSP generator, like the other two builders, reads what every visitor's browser reported across every page they opened, then proposes the policy value by value. Same four steps for all three.

  1. 01 - Period

    Pick a period

    Pick up to 30 days of the reports your visitors' browsers send, with a preset or by dragging across the chart.

  2. 02 - Start

    Choose a start

    Start from our secure baseline, a policy detected in your reports, a preset, or a header you paste in.

  3. 03 - Review

    Review each value

    One row per value, with its reports. Noise starts rejected: add or reject the rest, or let Auto decide.

  4. 04 - Deploy

    Copy and ship it

    Copy both headers or export them as a text file. Run report-only for a week, then enforce the same policy.

CSP builder

A strict Content Security Policy, value by value.

The CSP builder is the deepest of the three: it detects the policy you serve, filters extension noise and knows how nonces change a policy.

Start from the policy you already serve.

If your site already reports to CentralCSP, the builder reads the policies inside those reports and tells you which one is live, which covers only part of the site and which was replaced. Start from yours and it gains the protections the baseline adds, without losing anything it allows. No CSP yet? Start from the CentralCSP baseline: default-src 'self', object-src 'none', frame-ancestors 'none' and nothing third-party allowed.

  • Live, partial and old policies detected
  • Nonce-based policies recognized
  • A secure baseline when you have none

You decide every value before it ships.

Every value the builder proposes carries its evidence: how many reports it drew, its share of the directive, the days it was active, and the browsers, pages and code that reported it. A real dependency is obvious. Browser-extension sources, known injectors such as adware and coupon tools, and one-off bursts from a single browser are flagged as noise and start rejected, so they never land in your allowlist. Add what's real, reject the rest, or let Auto decide.

  • The evidence behind every value
  • Extension and injector noise starts rejected
  • Add or reject, value by value
How the CSP builder decides each value

Safe to copy today, stricter every release.

A policy that breaks checkout never ships, so everything your pages rely on today starts added, even a value that weakens the policy. None of it slips through quietly: each weak value carries a risk flag from our CSP evaluator and the steps to remove it, like moving an inline script into a file or giving it a nonce. Where your policy uses nonces, the builder adds 'strict-dynamic' and rejects 'unsafe-inline' for you. And before you deploy, the evaluator grades the finished policy.

  • Risky values flagged, with the fix
  • Nonces and 'strict-dynamic' handled for you
  • Evaluator findings before you deploy
Nonces and unsafe-inline in the CSP builder

Beyond CSP

Two more policy headers, built the same way.

Permissions-Policy and Connection-Allowlist come from the same reports, the same four steps and the same review table. Few sites send either, because nobody wants to write them by hand.

Permissions-Policy: deny every feature your pages never use.

Browsers never report the Permissions-Policy a page was served with, so you start from a preset or paste yours. The builder then reads the violations from your own pages and the potential ones from iframes asking for a feature. What your pages used is granted to your own origin, what a frame asked for goes to that frame's origin, and a feature only a third-party script reached for stays denied: granting it would hand the camera or the payment sheet to that script.

  • 25 features, denied by default
  • Frames granted by origin, with the allow attribute they need
  • Third-party script requests stay denied
Get started with the Permissions-Policy builder

Connection-Allowlist: an egress allowlist from the connections your pages make.

Start from your own origin and add only the destinations real browsers were blocked from reaching. Once three or more subdomains of one site are kept, they fold into a single pattern. WebSocket and WebRTC connections get their own groups, and redirects stay blocked unless a sign-in or payment step bounces through another site. Only Chromium-based browsers enforce it today, so keep CSP connect-src alongside it.

  • Starts from your own origin, never from a reported list
  • One pattern for three or more subdomains
  • WebSocket, WebRTC and redirects decided apart
Get started with the Connection-Allowlist builder

Approaches

Three ways to get a Content Security Policy.

A CSP is only as good as its coverage. Here is the honest comparison between writing one by hand, scanning a page for one, and building it from the traffic you already have.

Comparison of ways to produce a Content Security Policy
CentralCSPCrawler / scannerBy hand
Covers pages behind a loginEvery visited pageHomepage onlyIf you remember it
Sees conditional third partiesReal sessions catch themMissed if not triggeredOnly what you know
Filters browser-extension noiseFlagged and rejectedNot distinguishedYou guess
Stays current as the site changesRebuild from fresh reportsA one-time snapshotManual rewrite
Reaches enforcement safelyReport-only, then enforceStarter policy onlyDays of testing
Builds Permissions-Policy and Connection-Allowlist tooFrom the same reportsCSP onlyTwo more headers to write

There is a fourth way: inject a report-only policy locally with a browser extension and build from what that one browser sees. It is genuinely good for authoring and debugging a single page, and our Chrome extension does exactly that, free. Whole-site coverage still needs real traffic, because one browser on one page is not your site.

API and MCP

Every builder is one API call away.

The dashboard, the REST API and the MCP server run the same builders, so they give the same answer. Ask for a recommended policy over a period, optionally starting from yours, and get the header back. Nothing is saved.

  • One REST endpoint per header
  • Three MCP tools for AI agents
  • On the Business and Scale plans
See the API and MCP platform

Alerting

A new source shows up? You hear about it.

The same reports that build your policy can page you. When a script loads from an origin your policy never allowed, CentralCSP posts it to Slack, Teams, Google Chat, Telegram or email before the next visitor loads the page.

  • New-origin and hash-change rules
  • Violation spikes after a deploy
  • Routed to the channel that owns the page
See alerting

Check your headers

What does your site send today?

Two minutes, no account: scan your live headers and see whether you have a Content Security Policy at all, how strict it is, and which origins can run code on your pages right now.

Free, no account needed. Results land on a shareable page. Check which policy headers you send today.

FAQ

Frequently asked questions

Building a CSP, a Permissions-Policy or a Connection-Allowlist, filtering noise and rolling it out, answered.

Start collecting today. Enforce when you're ready.

Ship one report-only header this afternoon, then build your CSP, Permissions-Policy and Connection-Allowlist from what real browsers report. 14-day free trial, no agent, no page script.