-
Notifications
You must be signed in to change notification settings - Fork 1
🛡️ MEDIUM: Add Content-Security-Policy header to deployment configs #230
Copy link
Copy link
Closed
Description
Description
Both vercel.json and netlify.toml set security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) but neither includes a Content-Security-Policy (CSP) header.
Without CSP, the application is more vulnerable to:
- Cross-site scripting (XSS) -- inline scripts or injected script tags execute without restriction
- Data exfiltration -- compromised scripts can send data to any external domain
- Clickjacking variants not covered by
X-Frame-Optionsalone
Note: PR #189 ("add CSP and security headers") was merged previously, but the current
vercel.jsonandnetlify.tomlonmaindo not contain aContent-Security-Policyheader.
Files Affected
vercel.jsonnetlify.toml
Proposed Fix
Add a CSP header to both deployment configs with key directives:
default-src 'self'script-src 'self'-- no inline scriptsstyle-src 'self' 'unsafe-inline'-- Tailwind needs inline stylesimg-src 'self' https: data:-- allow HTTPS images and data URIs for avatarsconnect-src 'self' https://api.hiro.so https://api.testnet.hiro.so https://api.coingecko.com-- allowlist APIsfont-src 'self'frame-ancestors 'none'-- redundant with X-Frame-Options but belt-and-suspenders
Severity
Medium -- Defense-in-depth gap
Labels
security, infrastructure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels