fix(editor): open external SSH file links - #9908
Open
OnlyYu1996 wants to merge 1 commit into
Open
Conversation
Contributor
📝 WalkthroughWalkthroughRestored editor file loading now blocks external local files when an active runtime environment is present and authorizes external local paths only when no connection ID exists. External SSH paths bypass authorization. Tests configure the filesystem authorization mock and cover SSH loading, local-path authorization, and remote runtime blocking with the expected error and suppressed filesystem calls. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6 tasks
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
connectionIdowns the path.Closes #9743
Screenshots
No visual change.
Testing
pnpm lint(blocked by the existing non-exhaustive switch insrc/renderer/src/components/skills/skill-freshness-group.tsx:101)pnpm typecheckpnpm test(171 related tests passed)pnpm build(pnpm build:desktoppassed)The focused coverage verifies external SSH reads, local external-path authorization, remote runtime rejection, terminal file-link routing, runtime file reads, and connection ownership.
AI Review Report
Reviewed the terminal-link-to-editor path, owner hydration guard, per-file SSH connection resolution, runtime owner selection, and local authorization flow. The review verified that macOS, Linux, and Windows all use the same provider-aware renderer branch; no keyboard shortcut, label, path separator, or Electron platform behavior changed. It also confirmed that an unresolved SSH owner still fails retryably instead of falling back to a local read.
Security Audit
No dependencies, IPC messages, protocols, command execution, auth, or secret handling changed. Host-absolute paths bypass local authorization only when
getConnectionIdForFilehas resolved a concrete SSH owner; the read then goes through the existing SSH filesystem provider and connection boundary. Local paths still requirefs:authorizeExternalPath, and paired runtime paths remain constrained to the owning worktree RPC.Notes
This change intentionally does not extend paired runtime file RPCs to host-absolute paths.
ELI5
Clicking a file link to an absolute path on an SSH host failed local authorization. Editor tabs can open those SSH paths through the owning connection while local path rules stay the same.