w3c / webappsec-csp

WebAppSec Content Security Policy
https://w3c.github.io/webappsec-csp/
Other
210 stars 78 forks source link

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

Open lukewarlow opened 5 months ago

lukewarlow commented 5 months ago

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:


Preview | Diff

lukewarlow commented 5 months ago

cc @otherdaniel @koto to gather Google feedback.

Mozilla Position Request: https://github.com/mozilla/standards-positions/issues/1032

WebKit Position Request: https://github.com/WebKit/standards-positions/issues/355

lukewarlow commented 2 months ago

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