Closed
Bug 946512
Opened 12 years ago
Closed 12 years ago
Implement Content Security Policy for Make Valet
Categories
(Webmaker Graveyard :: Make Valet, defect)
Webmaker Graveyard
Make Valet
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jon, Assigned: jon)
References
Details
Attachments
(1 file)
Time to add some CSP to the make-valet.
| Assignee | ||
Comment 1•12 years ago
|
||
:gvn, :k88hudson - Please review this patch throughly! This is the first substantial CSP patch, so I want to find as many dragons as possible now. :gvn, feel free to fail this patch on performance. We can always split this up into smaller bugs to minimize the performance impact.
:mgoodwin - In this patch, I'm using "style-src 'unsafe-inline';". What are the security implications of CSS injection? I can refactor that inline style block to be a separate file, but it does mean extra http overhead, especially for such a small file.
Attachment #8342732 -
Flags: review?(kate)
Attachment #8342732 -
Flags: review?(gavin)
Attachment #8342732 -
Flags: feedback?(mgoodwin)
Comment 2•12 years ago
|
||
Comment on attachment 8342732 [details] [review]
https://github.com/mozilla/make-valet/pull/37
I have a few questions on Github. Specifically I'm concerned about media/img/object policy. Aren't there going to be videos coming from YouTube and imgs coming from random domains?
Attachment #8342732 -
Flags: review?(gavin) → review-
| Assignee | ||
Comment 3•12 years ago
|
||
Comment on attachment 8342732 [details] [review]
https://github.com/mozilla/make-valet/pull/37
I didn't change any code, just made a note about img-src * in the PR. It shouldn't be necessary for this patch
Attachment #8342732 -
Flags: review- → review?(gavin)
Comment 4•12 years ago
|
||
Comment on attachment 8342732 [details] [review]
https://github.com/mozilla/make-valet/pull/37
R+, but if possible lets run it in report only mode for a bit.
Attachment #8342732 -
Flags: review?(gavin) → review+
Comment 5•12 years ago
|
||
Comment on attachment 8342732 [details] [review]
https://github.com/mozilla/make-valet/pull/37
This works fine for me, but those error messages are pretty ugly.
Since a -lot- of people look at the make details pages, personally, I'd rather avoid the reporting stuff until we set up a reporting url... Seems like the regular CSP header would actually be OK here since there all the content we are showing (i.e. the embed shell) is text-based or static (no user-generated assets).
If we don't really care about error messages, this is a plus.
Attachment #8342732 -
Flags: review?(kate) → review-
| Assignee | ||
Comment 7•12 years ago
|
||
:gvn - while we land the csp report, how about landing this patch? We can add the report-uri directive when the server is up and running.
Flags: needinfo?(gavin)
| Assignee | ||
Comment 8•12 years ago
|
||
Edit - to be clear, landing it in enforcement mode
Comment 9•12 years ago
|
||
Yeah, I think this should be fine. I'm getting close to having the CSP logger written...
Flags: needinfo?(gavin)
Comment 10•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/make-valet
https://github.com/mozilla/make-valet/commit/3afa949101e8ca737ed9cafdd30ec52a32d52de2
Fix bug 946512 - Implement Content Security Policy
Updated•12 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 11•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/make-valet
https://github.com/mozilla/make-valet/commit/a383215f897812568357c77dfa389b83b00243e4
Bug 946512 - Fix img-src http://www.google-analytics.com CSP violation
Comment 12•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/make-valet
https://github.com/mozilla/make-valet/commit/26e03a90ac9688e2bfaffdadee320ed8eb3da8c6
Fix bug 946512 - Fix img-src https://ssl.google-analytics.com CSP violation
Comment 13•12 years ago
|
||
(In reply to Jon Buckley [:jbuck] from comment #1)
> :mgoodwin - In this patch, I'm using "style-src 'unsafe-inline';". What are
> the security implications of CSS injection? I can refactor that inline style
> block to be a separate file, but it does mean extra http overhead,
> especially for such a small file.
Short answer, unless you're also allowing inline script, they're minimal on modern browsers.
Longer answer, take a look at the browser security handbook content on this topic: http://code.google.com/p/browsersec/wiki/Part1#Cascading_stylesheets - note that some of the issues are specific to older browsers, and some of the issues (as I mentioned above) are mitigated by CSP (unless you allow inline scripts)
Comment 14•12 years ago
|
||
Comment on attachment 8342732 [details] [review]
https://github.com/mozilla/make-valet/pull/37
I'm OK with this if you're happy with the risks as per Comment 13
Attachment #8342732 -
Flags: feedback?(mgoodwin) → feedback+
| Assignee | ||
Comment 15•12 years ago
|
||
We're definitely not allowing inline script, and we're only supporting IE9+, so I think we're good to go here. Thanks Mark!
You need to log in
before you can comment on or make changes to this bug.
Description
•