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

Add trusted-types-eval source expression for script-src #665

Merged
merged 1 commit into from
Jan 15, 2025

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

index.bs Outdated Show resolved Hide resolved
@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
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