Currently with wasm-unsafe-eval there is no distinction between Wasm being executed from a trusted source versus Wasm being executed from an untrusted source.
One of the primary features of CSP is being able to define trusted executions either associated with non-CDN domains that have restricted code available or via a nonce which carries the execution stamp of approval as it were.
Perhaps a wasm-src CSP option or similar could be used to distinguish Wasm execution sources on the web? Would something like that be a possibility? Even just avoiding the "unsafe" prefix helps in ensuring the right security messaging here.
I'm specifically thinking about this in regards to the ESM integration, per WebAssembly/esm-integration#56.
Currently with
wasm-unsafe-evalthere is no distinction between Wasm being executed from a trusted source versus Wasm being executed from an untrusted source.One of the primary features of CSP is being able to define trusted executions either associated with non-CDN domains that have restricted code available or via a nonce which carries the execution stamp of approval as it were.
Perhaps a
wasm-srcCSP option or similar could be used to distinguish Wasm execution sources on the web? Would something like that be a possibility? Even just avoiding the "unsafe" prefix helps in ensuring the right security messaging here.I'm specifically thinking about this in regards to the ESM integration, per WebAssembly/esm-integration#56.