Skip to content

Collect reports only

Some applications send their own Content-Security-Policy header, for example a policy with a new nonce on each response. Quant cannot build that policy from a scan, and Quant must not replace it.

For such a site, use Collect reports only. Quant gives the site a report address. Your application adds the address to its policy. Quant then stores the violation reports and sends the alerts.

Function Collect reports only
Violations Yes. You can view, dismiss and ignore reports
Alerts Yes. See Alerts
Scan, review sources, generate, validate No
Deploy No. Quant does not write or change a header on the project
Script integrity, schedules, drift check No

The page has two tabs: Overview and Violations.

You can turn the mode on while the page shows the setup steps. If the project already has a policy that Quant manages, contact Quant.

  1. In the dashboard, open the project and select Security > CSP.
  2. In Base URL, select the address of the site.
  3. In the card My application sets its own policy, select My application sets its own policy. Collect reports only.

The Overview tab now shows Collect reports only, the report address and the number of active violations.

  1. On the Overview tab, copy the text under Add this to the policy of your application. The text is report-uri and the report address.
  2. Add that directive to the policy that your application sends. It works in a Content-Security-Policy header and in a Content-Security-Policy-Report-Only header.
  3. Deploy your application.
  4. Load a page of the site and read the response header. Make sure that the policy holds the report address.

If the policy already has a report-uri directive, add the Quant address to the same directive. A report-uri directive can hold more than one address, with a space between them:

report-uri /my-own-endpoint https://<the report address from the Overview tab>

A policy must have only one report-uri directive. The browser ignores a second one.

Select the Violations tab. Each row is one blocked source on one page, with a count.

  • View shows the full report.
  • Dismiss hides the report. A new report of the same violation does not alert again.
  • Dismiss and ignore hides the report and adds an ignore rule. Use it for reports that a browser tool causes.

There is no Approve action in this mode, because Quant does not own the policy. To allow a source, change the policy in your application.

See Violations for the report types and the ignore rules.

The Overview tab has three actions.

Action Result
Change report address The site gets a new report address. The old address works for 24 hours. Put the new address in the policy of your application
Use a Quant-managed policy The setup steps start, and Quant builds and deploys the policy. The violations and the ignore rules stay
Remove Quant deletes the violations, the ignore rules and the report address. Reports that your application sends to the address are lost

Before you select Use a Quant-managed policy, plan how your application stops sending its own header. Two policies on one response both apply, and the browser blocks a source that one of them does not allow.

Symptom Cause Fix
No report arrives The policy your application sends does not hold the report address Read the response header of a page. Add the report-uri text from the Overview tab
No report arrives after Change report address The application still sends the old address, and 24 hours passed Put the new address in the policy and deploy the application
Reports arrive, but no alert The organisation has no alert channel for security alerts Set up a channel. See Alerts
The card My application sets its own policy does not show The project already has a policy that Quant manages. The card shows only with the setup steps Contact Quant