Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(CSP) add compat data for 'wasm-unsafe-eval' source expression #17947

Merged
merged 13 commits into from Oct 29, 2022

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented Oct 6, 2022

This PR adds the wasm-unsafe-eval source expression as a child of script-src.

Content-Security-Policy: script-src 'wasm-unsafe-eval';

Open question:

Although 'wasm-unsafe-eval' can only be used with script-src, it's one of many sources that can be used for the script-src directive. Should 'wasm-unsafe-eval' live under script-src or should sources have a separate list? This would be something like:

sources
├── <host-source> (including <scheme-source>?)
├── 'self'
├── 'unsafe-eval'
├── 'wasm-unsafe-eval'
├── 'unsafe-hashes'
├── 'unsafe-inline'
├── 'none'
├── 'nonce-<base64-value>'
├── '<hash-algorithm>-<base64-value>'
├── 'strict-dynamic'
└── 'report-sample'

The compat table for this would probably live on the sources page on MDN.

Browser support details

Related issues and pull requests

@github-actions github-actions bot added the data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP label Oct 6, 2022
@bsmth
Copy link
Member Author

bsmth commented Oct 10, 2022

CI's failing on this one and I'm not sure how to fix it. I'll need some help on this one 🤔

I was using Safari Technology Preview number (141) instead of the release channel version (16)

@bsmth
Copy link
Member Author

bsmth commented Oct 13, 2022

All looks good now @queengooborg if you can have a look 🙏🏻

@bsmth bsmth requested a review from teoli2003 October 18, 2022 11:09
Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Edge and Opera are Chrome-based, I think we can safely mirror the data from Chrome to them.

http/headers/Content-Security-Policy.json Show resolved Hide resolved
http/headers/Content-Security-Policy.json Outdated Show resolved Hide resolved
@bsmth
Copy link
Member Author

bsmth commented Oct 24, 2022

Since Edge and Opera are Chrome-based, I think we can safely mirror the data from Chrome to them.

Seems to be breaking some tests with:

    Consistency - 1 problem (1 error, 0 warnings):
 ✖ http.headers.Content-Security-Policy.script-src - Error → Unknown support in parent for opera_android, but support is declared in the following sub-feature(s):
        → http.headers.Content-Security-Policy.script-src.wasm-unsafe-eval: 

I've reverted in 6eb7fe1

Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a lot of Opera Android is set to null in this file, sorry. I'll submit a PR to fix it all up. To keep this PR unblocked, I'll go ahead and merge this and then make the corrections to Opera later!

@queengooborg queengooborg merged commit 4ad0edc into mdn:main Oct 29, 2022
@bsmth bsmth deleted the 17619-wasm-unsafe-eval branch May 9, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants