fix(x): rowboat-server hardening (review follow-ups #879–882) - #887
Merged
Gagancreates merged 1 commit intoAug 24, 2026
Merged
Conversation
…n, Host guard, symlink guard, WS header auth
- the workdir lock moves into createRowboatServer itself, so the
Electron-hosted transport and the standalone entrypoint contend for
the same server.lock; EPERM on the pid probe counts as a live holder
- EADDRINUSE on the configured port now probes the occupant's /health:
another rowboat-server is a hard error, not a silent port+1 fallback
- every HTTP request and WS upgrade validates the Host header against
the machine's own names/addresses (DNS-rebinding defense-in-depth)
- GET /workspace/{path} and the app://workspace protocol realpath the
target and require containment in the workspace (symlink escape)
- @x/client sends the WS token as an Authorization header on React
Native; ?token= remains only for clients that cannot set headers
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.
First follow-up on the
arch/server-client-separationintegration branch, closing the four non-blocking findings from the #758 review:createRowboatServeritself, so the Electron-hosted transport and the standalone entrypoint contend for the sameserver.lock(EPERM on the pid probe counts as a live holder). AnEADDRINUSEon the configured port probes the occupant's/health: another rowboat-server is a hard startup error instead of a silent port+1 fallback.Authorizationheader on React Native;?token=remains only for clients that can't set headers (browser/undici).Hostagainst the machine's own names/addresses; foreign hosts get 403 (DNS-rebinding defense-in-depth).GET /workspace/{path}and theapp://workspaceprotocol realpath the target and require workspace containment, closing the symlink escape (server route and Electron handler in parity).Four new tests cover the guards (foreign Host 403, symlink 403, foreign-pid lock refusal, loud port collision); all suites green.
🤖 Generated with Claude Code