Repository navigation
Let renderDocument pages run under the default oshp CSP (refs #287) - #295
Merged
Merged
Conversation
Add style nonce option and documentContentSecurityPolicy; document the interaction and record the longer-term decision. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Claude Sonnet 5 <[email protected]>
jimhoyd
force-pushed
the
fix/ui-document-strict-csp-287
branch
from
September 20, 2026 15:59
3fb01d9 to
4ae1175
Compare
jimhoyd
enabled auto-merge (squash)
September 20, 2026 15:59
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.
Refs #287 (does not close it).
Reproduction: the kit path (createKit, ui extension) already links a hashed stylesheet and sends its own nonce CSP, which wins over the oshp profile. Only renderDocument emits an un-nonced inline <style>, which oshp (default-src 'self') blocks. Confirmed from the code and the existing 'existing headers win' behavior; not exercised in a real browser.
Change: optional
style: {nonce}on renderDocument, newdocumentContentSecurityPolicy(nonce), tests, docs (packages/ui README, docs/policies/security.md, changelog). oshp is unchanged and no unsafe-inline is added. Without the option the output is identical.Open decision recorded in docs/OPEN-DECISIONS.md: whether renderDocument should eventually link a served hashed stylesheet instead.
Verification: npm ci, npm run verify (pass), npm run docs:llms, npm run check:docs.
🤖 Generated with Claude Code