Content Security Policy parser
A Content Security Policy parser that implements the entirety of the CSP spec, used to verify the structure and validity of CSP directives. Planned follow-up tooling analyzes CSP abstract syntax trees to identify policy anti-patterns, report on capabilities a policy grants to a domain/resource, and let tools like OPA and SemGrep define and enforce rules on a policy.
What it addresses
There are a handful of CSP parsers around the web, but none that implement the entirety of the CSP spec; one was needed to verify the structure and validity of CSP directives.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Content Security Policy parser
A Content Security Policy parser that implements the entirety of the CSP spec, used to verify the structure and validity of CSP directives. Planned follow-up tooling analyzes CSP abstract syntax trees to identify policy anti-patterns, report on capabilities a policy grants to a domain/resource, and let tools like OPA and SemGrep define and enforce rules on a policy.
Problem: There are a handful of CSP parsers around the web, but none that implement the entirety of the CSP spec; one was needed to verify the structure and validity of CSP directives.
Posted by @d4mi3n · Original source ↗
Source text · @d4mi3n · · Source ↗
I’m working on a Content Security Policy parser. There are a handful of them around the web, but I couldn’t find one that implemented the entirety of the CSP spec and I wanted something I could use to verify structure and validity of CSP directives.