-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
feat: Adds a Content Security Policy (CSP) check for production environments #21874
feat: Adds a Content Security Policy (CSP) check for production environments #21874
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21874 +/- ##
==========================================
- Coverage 66.93% 66.92% -0.01%
==========================================
Files 1805 1805
Lines 69066 69076 +10
Branches 7369 7369
==========================================
+ Hits 46227 46232 +5
- Misses 20932 20937 +5
Partials 1907 1907
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM. I didn't check, but is this mentioned in the docs somewhere? If not, it would be great to make this more accessible for the greater public.
@villebro I added a section to the Security docs. |
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.
Restamping this, thanks for adding these great docs!
SUMMARY
Adds a Content Security Policy (CSP) check for production environments that verifies if a policy is defined or otherwise issues a warning. For deployments that manage CSP with other software, this check can be disabled using the
CONTENT_SECURITY_POLICY_WARNING
configuration.TESTING INSTRUCTIONS
Check if the warning is correctly emitted or skipped.
ADDITIONAL INFORMATION