-
Notifications
You must be signed in to change notification settings - Fork 21
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
New trusted-types-eval
keyword for CSP script-src
#355
Comments
See #186 for the base position request on Trusted Types as a whole. |
I think my main issue with this is that it's only as trusted as the policy, which might well be crap, but that's a general problem with Trusted Types that's no longer fixable. Although given the other directives have the The other discomfort I have is that in #186 the main motivation for this feature that was brought forward was a way to avoid having to specify Modulo a more Trusted Types-aligned name it's probably okay, though I'd be curious to see more analysis of this from other people. |
@annevk with respect to the discussion about regulations, I have few comments, but first, few general thoughts on regulations:
With respect to this particular proposal:
I hope that this helps to clarify the relationship between this proposal and the eID regulations. We are looking forward to see @sysrqb and @johnwilander feedback on this issue. |
In some discussion today at Web Engines Hackfest |
@annevk it is my understanding that they are complementary to each other. |
I'm not disputing you don't want |
@annevk I might be missing something important here. I don't understand how In theory, if you have a path forward to only evaluate trusted code (via strict-dynamic), then what's the risk? In practice, that's a lot harder to achieve, because trusted code might need to do funky stuff, specially for large systems with a lot of moving parts and legacy pieces (enterprise software is full of that), and the only way to use that is by eval some string, what would you do in this case? One of the premises of TT is that it helps to pave the way to a better security posture by slowly closing more and more avenues. At least that's my understanding from the original discussions with Mike Samuels many years ago at the SES Meetings. |
This is a misunderstanding of what strict-dynamic allows. Today CSP requires 'unsafe-eval' for use of eval. |
trusted-eval
keyword for CSP script-srctrusted-types-eval
keyword for CSP script-src
@annevk circling back on this since @caridy is currently on PTO. Did the discussions with @lukewarlow around the potential misunderstanding assuage your concerns with the need for introduction of a new CSP header for trusted type support? |
The |
I'm not particularly worried about the 'cheating' aspect, as developers can simply choose not to use this new keyword if that's the concern. Moreover, CSP is generally not well suited to protecting against malicious developers or against attackers that already have the ability to execute arbitrary code via XSS or similar. It's also worth noting that there are specific scenarios where At Google, we encountered this challenge during large-scale CSP deployments. While we successfully deployed Overall, I support the new keyword because I believe its benefits outweigh the potential drawbacks, especially considering its opt-in nature. |
Thank you for the feedback @lweichselbaum. @annevk are there any other folks you would like to loop in here to weigh in on this issue? |
This was discussed at TPAC and broad support was shown for the idea, is there anything the WebKit team needs to get a position on this? |
@annevk friendly ping on this |
I recommend we mark this as "position: positive" one week from now. I would like to thank everyone who contributed to this thread! |
WebKittens
@annevk
Title of the spec
Content Security Policy
URL to the spec
https://w3c.github.io/webappsec-csp/
URL to the spec's repository
w3c/webappsec-csp@8444566
Issue Tracker URL
No response
Explainer URL
No response
TAG Design Review URL
No response
Mozilla standards-positions issue URL
mozilla/standards-positions#1032
WebKit Bugzilla URL
No response
Radar URL
No response
Description
This proposes a new keyword for the CSP script-src directive (preliminarily
trusted-eval
but can be bikesheded). The main use case for this new keyword is to allow enabling eval only in browsers that support and have Trusted Types enforced. Currently trusted types is used alongsideunsafe-eval
(when you need eval), which means that in browsers with no trusted types support eval is still allowed (completely unmitigated by the protections TT offer). This new keyword would prevent that situation.Edit: Based on feedback the name is
trusted-types-eval
The text was updated successfully, but these errors were encountered: