Skip to main content

How do I check CSP reports in Sentry?

Issue

I set up CSP (Content Security Policy) reporting for one of my projects, but I cannot find the CSP reports in Sentry. I want to know where CSP reports appear and how to filter for them.

Applies To

  • All SaaS Customers and Self-Hosted Users

  • Security Headers / CSP Reporting

Resolution

CSP reports are ingested as their own event type. To view only CSP events, search with event.type:csp on your Issues or Discover pages. You can narrow further using the tags Sentry sets on each CSP event: effective-directive, blocked-uri, and blocked-host.

Screenshot 2025-01-17 at 12.58.15.png

[Screenshot: the Issues page filtered by event.type:csp, showing CSP violation events.]

If no CSP events appear, confirm they are being ingested before filtering:

  1. Verify your policy header points to the Sentry security endpoint. Your server must send a Content-Security-Policy (or Content-Security-Policy-Report-Only) header whose report-uri targets your project's Security Header endpoint. Find the exact endpoint under Project Settings > Security Headers, and see the Security Policy Reporting documentation for the full header setup, including how to configure your CSP to allow Sentry.

  2. Check that the reports are not being filtered out. Under Project Settings > Security Headers > CSP, the "Additional Ignored Sources" field drops reports whose blocked_uri, source_file, or document_uri match a listed pattern. See how do I filter CSP reports? and how do I configure Content-Security-Policy (CSP) filters? for details and pattern examples.

  3. Once reports are arriving, use event.type:csp on the Issues or Discover page to find them.

For the searchable fields available on events, see the searchable properties reference.

Did this answer your question?