Guides

How to read a CSP violation report

Most CSP reports are harmless, and a few matter a lot. This is what the fields mean, and how to tell which is which.

An example

Chrome sent this to a report-uri address when a page tried to load a script its policy did not allow:

{
  "csp-report": {
    "document-uri": "https://shop.example/",
    "referrer": "",
    "violated-directive": "script-src-elem",
    "effective-directive": "script-src-elem",
    "original-policy": "default-src 'self'; report-uri /r",
    "disposition": "enforce",
    "blocked-uri": "https://cdn.example.com/a.js?x=1",
    "status-code": 200,
    "script-sample": ""
  }
}

What the fields mean

document-uri
The page it happened on.
effective-directive
The rule that was broken, at its most specific. Here the policy has only default-src, and the browser still says script-src-elem.
blocked-uri
What broke it: a URL, or a word such as inline, eval, data or blob.
disposition
enforce means it was blocked. report means it was only reported, so it loaded.
source-file, line-number
The script that caused it. Often missing, and not always right.
script-sample
The first 40 characters of an inline script or style, if the directive includes 'report-sample'.
original-policy
The whole policy the browser had. If it is not yours, a proxy or extension changed it.

How much of a URL you get

It varies. When we tested Chrome 156, it sent the full address of a blocked script on another site, with its query string, but only the origin of a blocked frame. MDN says addresses on other sites are cut down to the origin, and some browsers do that.

Query strings can hold email addresses, tokens and search terms, so remove them before you store a report. CSP Inbox does this for you. Group reports by host, or the same problem will look like hundreds.

Reports you can ignore

These come from software on the visitor's computer, and no change to your site will stop them:

  • addresses starting chrome-extension:, moz-extension: or safari-web-extension:
  • hosts that belong to antivirus products, password managers, shopping assistants or page translators
  • inline violations seen in one browser by a handful of people, on pages where everyone else has none
  • a document-uri that is not your domain, such as a saved or proxied copy of your page

Do not add any of these to your policy. Allowing a host to quieten a report weakens the policy for everyone.

What to look at first

  1. Unknown script and form hosts on payment, sign-in and account pages. Look closely for names that imitate one you use, such as googie-analytics.com.
  2. Anything enforced that started suddenly. It is probably a feature that broke in your last release, or a vendor that moved to a new host.
  3. Your own domains. Usually a missing www, a subdomain, or a page that moved.
  4. Known third parties. Decide whether you still need each one, then allow it or remove it.
  5. Inline code. The most work, and where most of the protection comes from.

Last checked 24 November 2026.

Read next