Repository navigation
K13.9: Content-Security-Policy (enforced where safe, report-only for the rest) - #144
Merged
Merged
Conversation
…eport-only Wallets run in srcdoc sandbox frames that inherit the page's policy, and sign-in can't be tested without a real wallet, so the full policy reports violations instead of blocking until that test is done (K13.10). Closes #135
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.
Fix 8 from the pre-launch review (hardening).
Problem: no Content-Security-Policy at all.
Why not fully enforced: the wallet connector runs wallets in
srcdocsandbox frames, which inherit the page's policy. A strictscript-srccould break wallet sign-in, and that can't be tested without a real wallet.Fix:
object-src 'none'; frame-ancestors 'none'(can't affect wallet code)default-src 'self', scripts/styles self + inline (Next.js bootstraps inline), images/fonts/media self,connect-src 'self' https: wss:,frame-src 'self',base-uri/form-action 'self'Checked: production build in a clean copy, both headers served; landing, demo, overview and Add funds: no CSP violations in the console. Header test added; 151 tests.
Docs: README status, ARCHITECTURE §7, ESSENTIALS, ROADMAP (K13.9 done, K13.10 added).
Closes #135