Skip to content

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented May 28, 2024

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:

Implementation Bugs:


Preview | Diff

@lukewarlow
Copy link
Member Author

cc @otherdaniel @koto to gather Google feedback.

Mozilla Position Request: mozilla/standards-positions#1032

WebKit Position Request: WebKit/standards-positions#355

@lukewarlow lukewarlow force-pushed the script-src-trusted-eval branch from 8444566 to 824fce9 Compare June 18, 2024 12:40
@lukewarlow lukewarlow changed the title Add trusted-eval source expression for script-src Add trusted-types-eval source expression for script-src Jun 18, 2024
@lukewarlow lukewarlow force-pushed the script-src-trusted-eval branch from 824fce9 to 1ed7bc6 Compare June 18, 2024 16:07
@lukewarlow lukewarlow force-pushed the script-src-trusted-eval branch 2 times, most recently from ad31238 to 5b4509b Compare September 9, 2024 15:20
@lukewarlow lukewarlow marked this pull request as ready for review September 9, 2024 15:20
@lukewarlow
Copy link
Member Author

@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.

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.
@lukewarlow
Copy link
Member Author

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?

Copy link
Member

@mikewest mikewest left a 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?

@lukewarlow
Copy link
Member Author

Based on todays meeting I'm going to go ahead and merge this. Thanks for the reviews.

@lukewarlow lukewarlow merged commit affe7a7 into w3c:main Jan 15, 2025
1 of 2 checks passed
lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Sep 3, 2025
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 3, 2025
See w3c/webappsec-csp#665

Differential Revision: https://phabricator.services.mozilla.com/D263352

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1940493
gecko-commit: 95bc6cee58f879df3c2dfb431be9dc6dd5735cd9
gecko-reviewers: smaug
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 3, 2025
See w3c/webappsec-csp#665

Differential Revision: https://phabricator.services.mozilla.com/D263352

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1940493
gecko-commit: 95bc6cee58f879df3c2dfb431be9dc6dd5735cd9
gecko-reviewers: smaug
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Sep 8, 2025
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Sep 8, 2025
…smaug

See w3c/webappsec-csp#665

Differential Revision: https://phabricator.services.mozilla.com/D263352

UltraBlame original commit: 95bc6cee58f879df3c2dfb431be9dc6dd5735cd9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Sep 8, 2025
…smaug

See w3c/webappsec-csp#665

Differential Revision: https://phabricator.services.mozilla.com/D263352

UltraBlame original commit: 95bc6cee58f879df3c2dfb431be9dc6dd5735cd9
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Sep 8, 2025
…smaug

See w3c/webappsec-csp#665

Differential Revision: https://phabricator.services.mozilla.com/D263352

UltraBlame original commit: 95bc6cee58f879df3c2dfb431be9dc6dd5735cd9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition/proposal New features or enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants