- Add root SECURITY.md documenting the threat model (plaintext nsec / NWC in localStorage inherent to client-side Nostr), reporting channels (Nostr DM / NIP-05), in/out of scope, the CSP and its trade-offs, untrusted-data rendering rules, URL/CSS sanitization, author-scoped queries, NWC budget guidance, accepted residual risks, and an auditor file map. - netlify.toml now serves the same Content-Security-Policy as public/_headers and uses X-Frame-Options: DENY + Permissions-Policy, so the hardening holds regardless of which static host serves the web build. Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
24 lines
1.1 KiB
TOML
24 lines
1.1 KiB
TOML
[build]
|
|
command = "npm run build"
|
|
publish = "dist"
|
|
|
|
[[headers]]
|
|
for = "/*"
|
|
[headers.values]
|
|
# Keep this Content-Security-Policy in sync with public/_headers.
|
|
# Web-only hardening; the native Capacitor build is unaffected (it has no CSP).
|
|
Content-Security-Policy = "default-src 'none'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' https://unpkg.com; img-src 'self' data: blob: https:; font-src 'self' https://fonts.gstatic.com data:; connect-src 'self' https: wss:; media-src 'self' blob: https:; frame-src 'self' https:; worker-src 'self' blob:; manifest-src 'self'; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests"
|
|
X-Frame-Options = "DENY"
|
|
X-Content-Type-Options = "nosniff"
|
|
Referrer-Policy = "strict-origin-when-cross-origin"
|
|
Permissions-Policy = "geolocation=(self), camera=(self), microphone=()"
|
|
|
|
[[headers]]
|
|
for = "/assets/*"
|
|
[headers.values]
|
|
Cache-Control = "public, max-age=31536000, immutable"
|
|
|
|
[[redirects]]
|
|
from = "/*"
|
|
to = "/index.html"
|
|
status = 200
|