-
Notifications
You must be signed in to change notification settings - Fork 957
WT-536: improve our CSP unsafe-inline config by making it tighter and more specific #16994
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -109,12 +109,12 @@ | |||||
| "www.googletagmanager.com", | ||||||
| "www.youtube.com", | ||||||
| csp.constants.UNSAFE_EVAL, | ||||||
| csp.constants.UNSAFE_INLINE, | ||||||
| # Don't allow csp.constants.UNSAFE_INLINE wholesale in the default CSP. Be more targetted with it | ||||||
|
||||||
| # Don't allow csp.constants.UNSAFE_INLINE wholesale in the default CSP. Be more targetted with it | |
| # Don't allow csp.constants.UNSAFE_INLINE wholesale in the default CSP. Be more targeted with it |
Copilot
AI
Jan 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of unsafe-inline from _csp_style_src may break styling functionality if Transcend or other components require inline styles. The PR description mentions that unsafe-inline should only be available if Transcend is enabled, but this code doesn't show conditional logic for that. Consider verifying that inline styles are properly handled either through nonces or that all inline styles have been eliminated.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[unrelated] Wondering whether to be adding UNSAFE_EVAL only
if DEV? (Is there a risk of missing any legit use when this would always be allowed in dev, incl. demos, but never in prod/stage?)