Bind Workshop control plane to loopback#24
Closed
haasonsaas wants to merge 1 commit into
Closed
Conversation
Contributor
|
This was fixed in latest release. Thank you for the contribution and great find! |
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.
Summary
Workshop presents itself as a localhost-only daemon, but the backend listener was created with
server.listen(port), which can bind on all interfaces. The existing protection then relied onHost/Originheaders for non-ingest routes, so a non-browser LAN client could connect to the machine IP while sendingHost: localhost:<port>. Ingest routes skipped that guard entirely.This is higher impact than the earlier WebSocket origin issue because the exposed surface includes the HTTP control plane: agent chat endpoints, workspace selection, trace deletion/import/replay, status, and the local ingestion APIs. On the Codex/Claude paths, successful control-plane access can drive local agent sessions in the configured workspace.
Fix
dev:examplesdaemon to127.0.0.1.Validation
bun test tests/server-security.test.tsbun test tests/bun x tsc --noEmitbun run buildbun run lint(passes with 3 existing React hook warnings in app UI files)Related
Separate from #23, which covers same-machine browser cross-origin access to
/ws. This PR closes LAN exposure by enforcing loopback at the socket/listener boundary.