Abbi Labs

2026-11-21 · Daily security tips

Does your Content-Security-Policy still allow 'unsafe-inline' scripts?

A Content-Security-Policy header tells the browser which scripts it may run. It's your backup if someone sneaks HTML into your page through a comment box or a profile name. Lots of apps add one, something breaks, and 'unsafe-inline' goes into script-src to make the error go away. That allows any inline script, including an injected one, so the header does very little.

Check: run curl -sI https://yourapp.com | grep -i content-security-policy and read script-src (or default-src if there is no script-src). Red flags: 'unsafe-inline' with no nonce or hash, 'unsafe-eval', and wildcards like * or https:.

Fix: move inline scripts into files, or give them a nonce or hash. Next.js documents how to add a nonce per request. Try the new policy as Content-Security-Policy-Report-Only first so nothing breaks.

Is your live site exposing something like this?

The free quick check looks at what your site already serves publicly: secret keys in your JavaScript, open /.env files and /.git folders, Supabase tables readable with your public key, missing security headers, CORS misconfiguration, insecure cookie flags and TLS certificate expiry. No sign-up needed.

No app handy?

No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.

Run on every deploy or use from Cursor / Claude Code via MCP →