No Content-Security-Policy (CSP)
- What this is
- The site doesn’t send a CSP header — the browser’s “allow-list” for scripts and frames.
- Why it matters
- If an attacker sneaks a script into your page (XSS), the browser will run it. CSP makes that much harder — especially important for vibe-coded apps with lots of UI libraries.
- How severe
- High — serious weakness; fix before you share the link widely.
- Terms
- CSP
Exact steps
Copy-paste fix code
Pick your stack, copy the snippet, deploy, then re-scan.
next.config.ts
import type { NextConfig } from "next";
const securityHeaders = [
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "X-Frame-Options", value: "DENY" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(), interest-cohort=()",
},
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
{
key: "Content-Security-Policy",
value: [
"default-src 'self'",
"script-src 'self' 'unsafe-inline' https://va.vercel-scripts.com",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: blob: https:",
"font-src 'self' data:",
"connect-src 'self' https://va.vercel-scripts.com https://*.supabase.co",
"frame-ancestors 'none'",
"base-uri 'self'",
"form-action 'self'",
].join("; "),
},
];
const nextConfig: NextConfig = {
poweredByHeader: false,
async headers() {
return [{ source: "/:path*", headers: securityHeaders }];
},
};
export default nextConfig;Merge with your existing next.config. Add hosts you need to script-src / connect-src only.
Paste into Cursor / Lovable / Bolt / v0
Add a Content-Security-Policy HTTP header (not only a meta tag). For Next.js, use next.config headers() with default-src 'self'; script-src 'self' https://va.vercel-scripts.com; frame-ancestors 'none'. For Lovable/Bolt managed hosting, deploy dist to Vercel/Netlify or add Cloudflare response-header rules. Avoid Access-Control-Allow-Origin on HTML. Redeploy and re-scan.