osec CSP Reports: Know when an unknown script runs on your pages
Point your Content-Security-Policy reports at osec.one. We group them and email you when a new script or domain shows up: often the first sign of a card skimmer.
What it does
- Works with report-uri and the Reporting API (report-to)
- Grouped by directive, blocked domain and page
- Email digest of new violations
- Helps with PCI DSS 4.0 script monitoring (6.4.3 / 11.6.1)
What goes in, what comes out
- What goes in
- The violation reports browsers send when a page breaks your Content-Security-Policy. You add our report URL with your site key to the header.
- What comes out
- Violations grouped by directive, blocked domain and page in the console, and an email when a script or domain shows up that was not seen before.
- Example
- Content-Security-Policy-Report-Only: default-src 'self'; report-uri https://api.osec.one/tools/csp/r/YOUR_SITEKEY
- Limits
- Each report counts as 1 request. Over the daily quota, reports are dropped quietly. It tells you a script ran; it does not block it. Your policy does that.
How to set it up
- Create a site key and list your hostnames.
- Add the report URL to your Content-Security-Policy header (start with Report-Only).
- Console → CSP reports shows grouped violations. New ones are emailed to you.
- Allow what's legit in your policy, investigate the rest.
nginx
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' https://www.googletagmanager.com; report-uri https://api.osec.one/tools/csp/r/YOUR_SITEKEY; report-to osec" always;
add_header Reporting-Endpoints 'osec="https://api.osec.one/tools/csp/r/YOUR_SITEKEY"' always;Good to know
- Each report counts as 1 request. Over quota, reports are dropped quietly.