Synchronize object-src 'none' with default-src 'none'#715
Merged
Conversation
Contributor
Author
|
Not sure who the best person to look at this is, but maybe @ochafik can give it a quick peek? |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the draft specification’s “restrictive default” CSP example explicitly include object-src 'none' so it matches the verbosity used elsewhere in the document, even though default-src 'none' already implies the same restriction.
Changes:
- Add
object-src 'none'to the “Restrictive Default” CSP shown under “§Host Behavior” whenui.cspis omitted.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
@modelcontextprotocol/ext-apps
@modelcontextprotocol/server-basic-preact
@modelcontextprotocol/server-basic-react
@modelcontextprotocol/server-basic-solid
@modelcontextprotocol/server-basic-svelte
@modelcontextprotocol/server-basic-vanillajs
@modelcontextprotocol/server-basic-vue
@modelcontextprotocol/server-budget-allocator
@modelcontextprotocol/server-cohort-heatmap
@modelcontextprotocol/server-customer-segmentation
@modelcontextprotocol/server-debug
@modelcontextprotocol/server-lazy-auth
@modelcontextprotocol/server-map
@modelcontextprotocol/server-pdf
@modelcontextprotocol/server-scenario-modeler
@modelcontextprotocol/server-shadertoy
@modelcontextprotocol/server-sheet-music
@modelcontextprotocol/server-system-monitor
@modelcontextprotocol/server-threejs
@modelcontextprotocol/server-transcript
@modelcontextprotocol/server-video-resource
@modelcontextprotocol/server-wiki-explorer
commit: |
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.
This change is purely editorial.
Section §4. Content Security Policy Enforcement describes how hosts MUST construct CSP headers from resource metadata. It includes
object-src 'none'anddefault-src 'none'which is technically redundant sinceobject-srcusesdefault-srcas a fallback, per https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/object-src. Despite the redundancy, I think it's good to be verbose here.Related, the §Host Behavior describes a restrictive default CSP that Hosts MUST use if
ui.cspis missing. This includesdefault-src 'none'which implicitly protects us from<object>and<embed>elements, but does not includeobject-src 'none'explicitly. This is technically fine, but we should synchronize these two sections, so this PR simply addsobject-src 'none'to the restrictive default, for completeness, even though it has no observable effect on app content or even CSP violation reports (becausedefault-src 'none'is already specified).