Skip to content

Content Security Policy (CSP)

Security > CSP in the Quant dashboard builds a Content Security Policy for a project, tests it, and writes it to the project as a response header. It then collects the violation reports that browsers send, and checks the scripts of the site for changes.

A Content Security Policy (CSP) tells the browser which scripts, styles, images, fonts, frames and connections a page may use. A script that an attacker injects is not in the policy, so the browser does not run it.

Function Description
Scan A headless browser loads the pages you choose and records every script, style, font, image, frame and connection
Review sources You approve or deny each domain and each inline hash that the scan found
Generate Quant builds a policy from the approved sources. Each change makes a new version
Validate The scanner loads each page with the draft policy and lists what the policy blocks
Deploy Quant writes the policy to the project in report-only or enforcing mode
Violations Reports from the browsers of real visitors, which you approve, dismiss or ignore
Script integrity A baseline of the scripts of the site, and checks that find added, removed and changed scripts
Schedules Validation and script integrity checks that run on their own
Drift check A comparison of the headers the site serves with the policy you deployed
Alerts Violation, drift and scan alerts to the alert channels of your organisation
  1. Sign in to the dashboard: dashboard.quantcdn.io (QuantCDN) or dash.quantgov.cloud (QuantGov).
  2. Open the project.
  3. Select Security > CSP.

The feature works on a project that Quant serves. Before a policy exists, the page shows the setup steps. After setup, the page has six tabs: Overview, Policy, Violations, Script integrity, Schedules and History.

If your application sends its own Content-Security-Policy header, Quant can collect the violation reports and send the alerts, and leave the header to your application. See Collect reports only.

Security > CSP is available on selected plans. It is not available in trial mode. If the page shows a list of features and no setup steps, contact Quant for access.

Organisation owners, administrators and developers can change a policy. Members and read-only users can view the page.

A deploy writes these response headers to the project:

Header When
Content-Security-Policy-Report-Only The policy is in report-only mode. Browsers report violations and block nothing
Content-Security-Policy The policy is in enforcing mode. Browsers block what the policy does not allow
Reporting-Endpoints Always. It tells browsers where to send violation reports

The report address is on the host csp-report.quantgov.cloud, on both QuantCDN and QuantGov. You see this host in the headers of your site.

After a policy is deployed, the CSP page manages these three headers. Headers shows them in the card Managed by Security > CSP, and you cannot edit them there. The custom headers API does not change them: see Manage the policy.

ScriptAttest is now part of the Quant dashboard

Section titled “ScriptAttest is now part of the Quant dashboard”

Security > CSP replaces ScriptAttest (scriptattest.com), which was a separate product. The same functions are now in the Quant dashboard: you do not need a second account, and you do not link a project.

A site that you managed in ScriptAttest does not move to the dashboard automatically. Set up the policy in the dashboard. The first step can import the policy that the site already serves, so you do not start from an empty policy.