Skip to content

Fix: add wasm-unsafe-eval to CSP for WebAssembly - #21

Merged
suradet-ps merged 2 commits into
mainfrom
feat/phase-7-security-hardening
Aug 5, 2026
Merged

Fix: add wasm-unsafe-eval to CSP for WebAssembly#21
suradet-ps merged 2 commits into
mainfrom
feat/phase-7-security-hardening

Conversation

@suradet-ps

Copy link
Copy Markdown
Owner

Summary

Fixes WASM compilation blocked by CSP.

WebAssembly.instantiateStreaming() requires 'wasm-unsafe-eval' in the
CSP script-src directive. This keyword is more restrictive than
'unsafe-eval' — it only permits WASM compilation, not arbitrary eval().

Changes

  • vercel.json: Added 'wasm-unsafe-eval' to script-src
  • SECURITY.md: Updated CSP documentation to explain the three script-src keywords

WebAssembly.instantiateStreaming() requires 'wasm-unsafe-eval' in
the CSP. This is more restrictive than 'unsafe-eval' — it only
permits WASM compilation, not arbitrary eval().
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codeshot Ready Ready Preview Aug 5, 2026 3:23am

grep was matching 'wasm-unsafe-eval' as a false positive. Now
sed strips 'wasm-unsafe-eval' before checking for 'unsafe-eval'.
@suradet-ps
suradet-ps merged commit 029b5f9 into main Aug 5, 2026
12 of 13 checks passed
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.

1 participant