-
Notifications
You must be signed in to change notification settings - Fork 83
Description
trusted-script
keyword is used now for javascript:
navigations and eval
guarding. Since we've integrated with CSP logic, perhaps the keyword is now superfluous?
If a website uses eval
or javacsript:
and it uses script-src
, it needs to set appropriate unsafe-*
keywords anyhow, for browsers with no trusted-types
support.
We are close to having working downgrades. See #218 for a working downgrade-to-string for eval
; for javascript:
navigation, the default policy will simply not be created, and therefore called.
It seems like a combination of script-src ... 'unsafe-inline' 'unsafe-eval'; trusted-types ...
correctly limits the unsafe behavior to Trusted Types, with a working downgrade to string for non-supporting browsers. IOW, trusted-types
directive adds additional restrictions independent of script-src
, which seems to be not violating CSP principles, and is conceptually simpler.