Content-Security-Policy analysis and bypass assessment — parsing the policy for weaknesses (unsafe-inline, unsafe-eval, wildcard/overly-broad sources, data:/blob:, missing object-src/base-uri, nonce reuse) and identifying bypass gadgets (JSONP on allowlisted hosts, AngularJS/library gadgets, base-uri hijack, dangling markup). Tier 1. Payloads: payloads/xss.md (CSP). Use when a CSP is present and XSS is in scope.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Csp Analysis?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-csp-analysis)
---
name: csp-analysis
description: "Content-Security-Policy analysis and bypass assessment — parsing the policy for weaknesses (unsafe-inline, unsafe-eval, wildcard/overly-broad sources, data:/blob:, missing object-src/base-uri, nonce reuse) and identifying bypass gadgets (JSONP on allowlisted hosts, AngularJS/library gadgets, base-uri hijack, dangling markup). Tier 1. Payloads: payloads/xss.md (CSP). Use when a CSP is present and XSS is in scope."
---
# CSP Analysis & Bypass
A CSP is only as strong as its weakest source. Parse it, then find the gadget that defeats it.
## Trigger phrases
`csp, content security policy, csp bypass, unsafe-inline, nonce, strict-dynamic, jsonp gadget`
## Weaknesses to flag
- `unsafe-inline` / `unsafe-eval` in script-src → inline/eval XSS allowed.
- Wildcard or overly-broad sources (`*`, `https:`, broad CDNs), `data:`/`blob:` in script-src.
- Missing `object-src 'none'` and `base-uri 'none'` → plugin/base-uri hijack.
- Nonce reuse/predictability; `strict-dynamic` with injectable script gadget.
- Allowlisted host hosting JSONP or a vulnerable library (AngularJS) → gadget.
## Bypass gadgets (${CLAUDE_PLUGIN_ROOT}/payloads/xss.md CSP)
- **JSONP** callback on an allowlisted origin: `<script src="https://allowed/jsonp?callback=alert">`.
- **AngularJS CSTI** on an allowlisted CDN (→ `csti`).
- **base-uri hijack** when unset; **dangling-markup** data exfil when script is fully blocked.
- **strict-dynamic + jQuery ** script gadget.
- Use evaluators (CSP Evaluator) to spot weak directives, then verify the gadget executes.
## Escalation
Turns a blocked XSS into a working one; report the exact bypass chain.
## Verification (background, before reporting)
Re-check the header/response across multiple endpoints and a clean request to avoid false positives; confirm exploitability (not just absence) before rating. Report true positives only. Backend/Burp: see `zazy-orchestrator`.
## Evidence
The policy, the weak directive, the working bypass gadget, and execution proof.