Add a strict script-src CSP to browser.xhtml
Categories
(Core :: DOM: Security, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox139 | --- | fixed |
People
(Reporter: tschuster, Assigned: tschuster)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
We currently use the policy script-src-attr 'none' for browser.xhtml's CSP, we should upgrade this to script-src chrome: resource:. The most important aspect is that this would disallow inline scripts in addition to inline event handlers.
| Assignee | ||
Comment 1•9 months ago
|
||
I think I am going to have to add 'unsafe-eval' to the allowed sources. We already block eval in the parent-process and system principals (bug 1582229). However we still have quite a lot of tests that depend on the pref security.allow_eval_with_system_principal to opt-out of the eval restriction. So instead of fixing all of these eval uses, I believe we can rely on that restriction instead.
| Assignee | ||
Comment 2•9 months ago
|
||
Updated•9 months ago
|
Comment 3•9 months ago
|
||
There are some unknown instances of eval that we never fully got rid of after https://bugzilla.mozilla.org/show_bug.cgi?id=1582229. We should definitely look at those, but maybe as a follow-up
| Assignee | ||
Comment 4•9 months ago
|
||
It seems like the remaining eval uses don't happen in the context of browser.xhtml, so they don't block this work. We should still try to get rid of them of course.
| Assignee | ||
Comment 5•9 months ago
|
||
| Assignee | ||
Updated•8 months ago
|
Comment 7•8 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•8 months ago
|
Comment 9•8 months ago
|
||
| bugherder | ||
Updated•7 months ago
|
Description
•