RESOLVED DUPLICATE of bug 235408 Bug 197759
Support wasm-unsafe-eval
https://bugs.webkit.org/show_bug.cgi?id=197759
Summary Support wasm-unsafe-eval
Rob
Reported 2019-05-09 16:48:53 PDT
The following issue mentions Chrome, but the same applies to Safari: https://github.com/WebAssembly/content-security-policy/issues/7 It's impossible to use wasm in Safari without the `unsafe-eval` directive. This proposal describes a new directive, `wasm-unsafe-eval`, that would allow executing arbitrary wasm code without having to also allow JS eval(): https://github.com/WebAssembly/content-security-policy/blob/master/proposals/CSP.md Chrome has the following issue open to support that directive: https://bugs.chromium.org/p/chromium/issues/detail?id=948834 We would prefer to use the stream APIs with proper CSP support, but WK does not yet even have the stream functions: https://bugs.webkit.org/show_bug.cgi?id=173105 Given that and the fact that Chrome has the stream functions but not proper CSP support (https://bugs.chromium.org/p/chromium/issues/detail?id=961485), an acceptable alternative for now would be to support `wasm-unsafe-eval` in the `script-src` directive. Note that Firefox and Edge allow wasm compilation and execution without any change to the CSP whatsoever. That behavior is effectively the same as adding `wasm-unsafe-eval` automatically. We aren't advocating that position either and would prefer to see those browsers disable wasm unless `wasm-unsafe-eval` is present or an acceptable SRI hash or origin is present.
Attachments
WASM and CSP test cases (13.97 KB, application/zip)
2019-05-10 14:56 PDT, Rob
no flags
Radar WebKit Bug Importer
Comment 1 2019-05-09 19:54:18 PDT
Rob
Comment 2 2019-05-10 14:56:56 PDT
Created attachment 369601 [details] WASM and CSP test cases Here is a set of tests and a summary of major browser behavior.
Dasa Paddock
Comment 3 2021-09-29 14:59:16 PDT
It appears Chrome plans to include support for this in M96: https://groups.google.com/a/chromium.org/g/blink-dev/c/5U_SgZ3r8QI/m/pnOzK2S3BAAJ
Sergey Rubanov
Comment 4 2021-10-28 03:42:39 PDT
wasm CSP is on phase 3 now (as voted on October 26 2021 wasm CG meeting)
Kate Cheney
Comment 5 2022-03-10 11:12:08 PST
*** This bug has been marked as a duplicate of bug 235408 ***
Note You need to log in before you can comment on or make changes to this bug.