Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

A CSP audit for every release

Check before each release that the theme still works under a strict Content Security Policy - report-only mode on a test siteaccess, the browser console, a grep for inline code, and external resources.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/lifecycle/csp-audit-per-release.md

On this page

A CSP audit for every release

This page is for designers maintaining a theme that runs, or should run, under a Content Security Policy. Once a theme is free of inline code (Removing inline scripts and styles), each release must keep it that way.

The routine

  1. Policy on, report-only, for the test siteaccess (site.ini [ContentSecurityPolicy] Mode=report-only in that siteaccess's settings; see Content Security Policy).

  2. Walk the page list with the browser console open. Expected: no CSP reports. Use ReportURI to collect reports from a longer session.

  3. Grep the diff of the release for inline code:

    git diff "$(git describe --tags --abbrev=0)"..HEAD -- design | grep -n -E "^\+.*(<script[^>]*>[^<]|on[a-z]+=|javascript:|style=\")"

    Expected: no output.

  4. External resources: anything not served from the site itself (fonts, scripts, images) needs a policy entry and a reason; prefer self-hosting (External resources and CDNs).

  5. Interactive parts (menus, galleries, forms, maps) work with the policy enforced on the test siteaccess.

Record

Write the result in the release notes ("Works under a Content Security Policy without 'unsafe-inline'"), only when it is true.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x