-
Notifications
You must be signed in to change notification settings - Fork 926
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
Can we tighten up our CSP? #11943
Comments
Same also applies for Pocket mode ^ |
GTM CSP guidelines for future reference: https://developers.google.com/tag-platform/security/guides/csp |
After CSP reporting is in place #14453, is there a chance to add another, more restrictive policy header, as |
Ah, @janbrasna I think you just stumbled across the one thing we need to add to django-csp before we can ask the Django project to fold it into core mozilla/django-csp#36 |
@stevejalim 🤦 gotcha, next time I need to utfg, this time I only rtfd and didn't look further;) To update the original post:
(I still can't seem to get to the bottom of the local dev webpack websockets and whether that would need adding to connect-src for dev extras… but investigating why the ws: is not covered by self in the first place…) I think the quick win in the ratings is also to disallow |
Just to add here, the latest beta release of django-csp will allow adding a report-only CSP. As @janbrasna pointed out above, we could enable that without the |
The last inlined Also disabling |
Just adding one piece of the puzzle that hasn't been mentioned before I guess — when tightening the individual policies instead of appending the defaults everywhere eventually, a reasonable set of hosts should be picked for every rule, as wildcards can basically mean stuff can get linked from addons.m.o, support.m.o and similar "user generated content": So e.g. tighten |
Description
https://observatory.mozilla.org/analyze/www.mozilla.org
We currently allow both
unsafe-inline
andunsafe-eval
inscript-src
, but I'm not 100% sure if anything we're using today is relying on those?Might we also be able to remove
unsafe-inline
fromstyle-src
?Possible things to check:
eval()
but only in dev mode. In prod mode it should not be needed.Convert is still a thing on our site for A/B testing, but has not been used for a long time?Success Criteria
Tasks
frame-ancestors
for clickjacking control #14835unsafe-eval
&unsafe-inline
fromscript-src
#14828unsafe-inline
fromstyle-src
#14840base-uri
Directive to Content Security Policy #15555form-action
#15553upgrade-insecure-requests
directive to Content Security Policy #15556The text was updated successfully, but these errors were encountered: