Create initial proposal for apps declaring trusted types#378
Open
connor4312 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
Create initial proposal for apps declaring trusted types#378connor4312 wants to merge 1 commit intomodelcontextprotocol:mainfrom
connor4312 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
@modelcontextprotocol/ext-apps
@modelcontextprotocol/server-basic-react
@modelcontextprotocol/server-basic-vanillajs
@modelcontextprotocol/server-budget-allocator
@modelcontextprotocol/server-cohort-heatmap
@modelcontextprotocol/server-customer-segmentation
@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.
Motivation and Context
Currently there are a couple examples that shouldn't actually work under the CSP policies put forth in the spec (#374, #199) and only do so in the
basic-hostbecause thebasic-hostis overly permissive.This adds the ability for apps to declare trusted types which allows them to evaluate code
How Has This Been Tested?
Just tested in the basic-host.
Breaking Changes
None.
Types of changes
Checklist
Additional context
trusted-types-evalis preferred overunsafe-evalto avoid opening a hole for older browsers, but unfortunately this is only supported in Safari and Firefox nightly, and so I did not add it to this proposal so far.I adopted this in connor4312@cea1b41 to make the threejs example work, but have not included that in this PR because examples target the published
@modelcontextprotocol/ext-appspackage which does not have the new trusted type properties.Fixes #199
Refs #374 but does not fix it, because Cesium's usage of
new Function()is deep within the library and does not seem to run in trusted-type environments.