opyeb/CSPForge
ToolGuideFAQ

CSPForge · About

About CSPForge

A single-purpose tool for the header that decides what a page may execute.

CSPForge is a static page. There is no backend, no database and no build step at runtime: the browser downloads one HTML document, one stylesheet, two scripts and a handful of icons. The parser, the scorer, the builder and the five exporters are plain JavaScript functions, which is also why the page keeps working after the first load with no connection at all.

It was built for the person who has just been handed a CSP ticket, and for the person who has shipped one for years and wants a second opinion before a release. Both need the same three things: what the policy actually allows, which line is the weak one, and a correct export for the platform they deploy to.

What it does not do

It does not fetch your site, it does not run your policy against a real browser session, and it does not know which scripts your application loads at runtime. A policy can be perfectly scored and still break a feature, which is what Report-Only staging is for. The score measures the policy text, not the security of the application behind it.

How the score is computed

Every rule in the audit has a fixed penalty. The policy score is 100 minus those penalties, the header score is the same over the four scored headers, and the grade is 80% policy plus 20% headers. The complete rule list is visible in the findings of any audit, and the same calculation is implemented twice (once in the page, once in a Python reference) and compared on every release scenario, so a score is reproducible rather than a rounding accident.

This site's own headers

The _headers file this site deploys is in the download and audits at 82/100 on this tool: strict apart from 'unsafe-inline', which the AdSense script needs. That is the honest trade-off of an ad-funded page, and the reason the protected sample scores 100 while this site does not.

Privacy in one line

Your paste never leaves the tab. See the privacy page for the details, including the advertising script this site loads.