PromptBase
PromptBase SelectGet Select
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Skill Details

Runtime
(claude-5-5-sonnet)
Example user message
[userMessage]: My site's CSP header is: script-src *; style-src 'self' 'unsafe-inline'; and I load a chart library from cdn.example.com/chart.js with no version in the URL. Is this safe?
Example agent response
No -- two real problems here. 1. `script-src *` allows a script from ANY domain to run. It doesn't just permit your chart library, it permits an attacker who finds any injection point (a comment field, a compromised ad, a malicious redirect) to load their own script and run it with full page privileges. `style-src 'unsafe-inline'` is narrower but still lets an attacker who controls any injected HTML apply arbitrary styling-based attacks (e.g. clickjacking overlays, data exfiltration via CSS). 2. Your chart library URL has no pinned version, so `cdn.example.com/chart.js` can change its contents at any time without a corresponding change in your own codebase -- if that CDN account or its upstream package is ever compromised, the new file is trusted and runs automatically, with nothing in your git history to flag it. Fix: ``` Content-Security-Policy: default-src 'none'; script-src 'self' https://cdn.example.com/chart-4.4.2.min.js; style-src 'self'; connect-src 'self'; img-src 'self' data:; ``` ```html <script src="https://cdn.example.com/chart-4.4.2.min.js" integrity="sha384-<hash-of-this-exact-file>" crossorigin="anonymous"></script> ``` Pin the exact version, add the SRI hash so a swapped file is rejected by the browser instead of silently executed, and drop `script-src *` down to only the hosts you actually use.
Claude Skill

Csp Scriptloading Security Auditor

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this skill, you agree to our terms of service
CLAUDE-5-5-SONNET
Tested icon
Guide icon
Free credits icon
Audits websites, embedded widgets, and third-party script integrations for Content-Security-Policy weaknesses and script-supply-chain risk: wildcard or unsafe-inline/unsafe-eval directives, unpinned "latest" CDN script versions, missing Subresource Integrity, and untrusted script/style hosts. Returns the exact fix -- tightened directive, pinned version plus SRI hash, or host removal -- or designs a strict CSP from scratch for a new embed.
...more
Added 50 minutes ago
Report
Browse Marketplace