Repository navigation
feat(engine): isolate game execution in sandboxed iframe - #4400
Open
SSoggyTacoMan wants to merge 8 commits into
Open
SSoggyTacoMan wants to merge 8 commits into
SSoggyTacoMan wants to merge 8 commits into
Conversation
|
@SSoggyTacoMan is attempting to deploy a commit to the Hack Club Team on Vercel. A member of the Team first needs to authorize it. |
… dynamic extraction
…ent parsing, and log serialization
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch has not been deployed
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.
Supersedes and resolves issues in #3906.
Summary
Isolates Sprig game execution into a dedicated opaque-origin sandbox iframe (
/game-sandbox) to prevent untrusted user game code from accessing session cookies, local storage, or the main application DOM.Improvements over #3906
Access-Control-Allow-Origin: "null"+Access-Control-Allow-Credentials: "true"headers with standard wildcardAccess-Control-Allow-Origin: "*"on/_astro/*assets without invalid credential flags.crossorigin="use-credentials".extractLegendBitmapsto statically extract object properties (e.g.SPRITES.PLAYER), bitmap variable declarations, andsetLegendcalls using exact boundary matching.EXTRACT_BITMAPSsandbox protocol message so dynamic sprites (e.g. loops, spreads) can be evaluated headlessly inside the isolated sandbox frame instead of executing on the parent window.bitmaps.valuewhen static extraction returns empty.allow="autoplay"to the sandbox<iframe>and auto-resumed suspendedAudioContextinstances on user input.Cmd/Ctrl+Enter,Escape) from the sandbox frame to the parent window to keep editor hotkeys functional while the game canvas is focused.