-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add trusted-types-eval
source expression for script-src
#665
Conversation
3a0f58d
to
8444566
Compare
cc @otherdaniel @koto to gather Google feedback. Mozilla Position Request: mozilla/standards-positions#1032 WebKit Position Request: WebKit/standards-positions#355 |
8444566
to
824fce9
Compare
trusted-eval
source expression for script-src
trusted-types-eval
source expression for script-src
824fce9
to
1ed7bc6
Compare
ad31238
to
5b4509b
Compare
@mikewest if you've got time it'd be brilliant to get an editorial review of this too. Still waiting on some browser positions so won't merge yet. |
5b4509b
to
b6e3a19
Compare
This new keyword allows enabling eval only when trusted types are enforced. Such that in browsers that don't support trusted types no eval is allowed.
b6e3a19
to
29f6b70
Compare
Failing pipeline here seems to be related to a change already merged, rather than this PR. For now I'll leave it "broken" but happy to address if that's desired. Made a WebKit PR at WebKit/WebKit#38741 so would be good to get this PR merged. Given the above standards positions is there a process for requesting review and approval like whatwg has? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're working on defining the process for updating this spec, and I do hope we'll land on something similar to WHATWG's.
That said, we discussed this specific item at TPAC (https://github.com/w3c/webappsec/blob/main/meetings/2024/2024-09-26-TPAC-minutes.md#trusted-types-eval), there are positive signals from WebKit (WebKit/standards-positions#355), and Mozilla (mozilla/standards-positions#1032). I think whatever process we end up with would accept that as Good Enough™.
With that in mind, I'm comfortable landing this prior to solidifying a new process. @dveditz, WDYT?
Based on todays meeting I'm going to go ahead and merge this. Thanks for the reviews. |
This new keyword allows enabling eval only when trusted types are enforced. Such that in browsers that don't support trusted types no eval is allowed, unlike with
unsafe-eval
. This concept was brought up at previous WebAppSec WG meetings.Implementor Interest:
Mozilla (see New
trusted-types-eval
keyword for CSP script-src mozilla/standards-positions#1032)WebKit (see New
trusted-types-eval
keyword for CSP script-src WebKit/standards-positions#355)Chromium - Not sure how best to get an official Google position but Lukas is supportive per New
trusted-types-eval
keyword for CSP script-src WebKit/standards-positions#355 (comment)Implementation Bugs:
Preview | Diff