task/WI-472: Review CSP differences between service.conf.template and default.conf.template - #87
Draft
fnets wants to merge 2 commits into
Draft
task/WI-472: Review CSP differences between service.conf.template and default.conf.template#87fnets wants to merge 2 commits into
fnets wants to merge 2 commits into
Conversation
…olicy to a report url
…me instead of a placeholder I made up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Review CSP differences between service.conf.template and default.conf.template. We have three nginx templates in Camino. Two share the same permissive CSP (default.conf.template and sad.cms.template); one has a comprehensive CSP (service.conf.template).
Is service.conf.template reasonable, or is it overly aggressive (e.g. forcing every service deployment to enumerate CDN allowances)? Does default.conf.template need to change? (Same question applies to sad.cms.template since its CSP is identical.) Is the csp-map file approach working? Are there alternatives? Or better way to make this maintainable?
Related
Changes
Adding nginx configuration to report violations of content-security-policy to a report url. Adds a Content-Security-Policy in report-only mode ahead of a future enforcing rollout, plus a violation-reporting endpoint. Updates headers to include script-src, style-src, img-src, font-src, connect-src, frame-src, frame-ancestors, base-uri, object-src, and form-action. Uses the existing $cspNonce variable (already defined elsewhere in this config) on script-src/style-src.
Testing
nginx -tin the nginx container and make sure it passesNotes
We would want to deploy this to staging and then run for a week, then deploy a follow-up PR to turn off
Report-Only