Skip to content

Add Content Security Policy and missing security headers - #21

Merged
veillette merged 1 commit into
mainfrom
claude/security-audit-phXcN
Feb 21, 2026
Merged

Add Content Security Policy and missing security headers#21
veillette merged 1 commit into
mainfrom
claude/security-audit-phXcN

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

Adds a shared securityHeaders object applied to both the Vite dev server
and vite preview server. Also introduces serve.json so that npm run serve
(the serve static server) sends the same headers in production.

New headers beyond the existing COOP/COEP:

  • Content-Security-Policy: locks resources to same-origin with targeted
    exceptions for WASM eval, blob workers (FFmpeg/OpenCV), blob media URLs,
    inline styles (set via JS element.style throughout the UI), and data: icons.
  • X-Content-Type-Options: nosniff — prevents MIME-type sniffing attacks.
  • X-Frame-Options: DENY — clickjacking protection (belt-and-suspenders with
    the frame-ancestors CSP directive).

https://claude.ai/code/session_016gFzZ4udLP6DGt4fwqN2wG

Adds a shared securityHeaders object applied to both the Vite dev server
and vite preview server. Also introduces serve.json so that `npm run serve`
(the `serve` static server) sends the same headers in production.

New headers beyond the existing COOP/COEP:
- Content-Security-Policy: locks resources to same-origin with targeted
  exceptions for WASM eval, blob workers (FFmpeg/OpenCV), blob media URLs,
  inline styles (set via JS element.style throughout the UI), and data: icons.
- X-Content-Type-Options: nosniff — prevents MIME-type sniffing attacks.
- X-Frame-Options: DENY — clickjacking protection (belt-and-suspenders with
  the frame-ancestors CSP directive).

https://claude.ai/code/session_016gFzZ4udLP6DGt4fwqN2wG
@veillette
veillette merged commit 487455e into main Feb 21, 2026
1 check passed
@veillette
veillette deleted the claude/security-audit-phXcN branch February 22, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants