Skip to content

Support secure LAN agent links over SSH - #21

Open
ScriptedAlchemy wants to merge 4 commits into
mainfrom
codex/secure-lan-ssh-agent-links
Open

ScriptedAlchemy wants to merge 4 commits into
mainfrom
codex/secure-lan-ssh-agent-links

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Problem and change

Agent links could not use SSH addresses for encrypted LAN access, and connection failures gave little guidance about macOS Local Network permissions. Remote bootstrap also attempted to download preview archives even when a compatible CLI was already installed.

Add ssh://user@host[:port] agent links using managed, loopback-bound SSH tunnels. Preserve peer identity and access-limit checks, reconnect through the saved SSH route, and leave the remote server and active jobs running when disconnecting. Reuse a compatible installed CLI before downloading an archive, filter unsafe addresses from agent-link pickers, and improve desktop/mobile connection guidance and documentation.

Validation

  • vp run check:changed passed: 63 tests across 6 files, typechecks for 10 affected packages, formatting, lint, both knip checks, GraphQL generation, and native project-memory addon build.
  • Tests cover SSH bootstrap timing/errors, peer identity and permissions after reconnect, loopback forwarding, CLI reuse, and address filtering. New regressions verify that describing a link remains passive before approval, bootstrap occurs only for an approved link, and OAuth uses the same HTTP endpoint whose identity was verified.
  • Isolated SQLite/HTTP/OAuth acceptance: before approval, zero SSH bootstraps and no remote metadata; after approving the fixture link, one bootstrap, one peer session, the durable SSH route, and the requested read-only access limit.
  • Installed-app UI and physical cross-machine SSH acceptance have not been revalidated for this commit; no app release or installation is included.

Review follow-up keeps remote SSH bootstrap behind explicit link approval and carries the verified HTTP endpoint through sign-in, while preserving the durable SSH route for reconnect.

Review fixes implemented and verified with GPT-6 Astra Pro in the Codex harness.

@changeset-bot

changeset-bot Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cc05bee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ScriptedAlchemy and others added 3 commits October 28, 2026 12:50
Keep SSH descriptions passive until link approval, then bootstrap only the approved connection. Carry the identity-verified HTTP endpoint through OAuth sign-in while retaining the durable SSH route for reconnection.

Add regression coverage for approval gating, bootstrap timing, and endpoint consistency. Validated with the required changed-file gate: 63 tests across 6 files and typechecks for 10 packages.
- Reject SSH link hosts with shell characters; ssh_config expands %h
  into ProxyCommand and Match exec shells.
- Reuse the CLI install.sh actually installs (PATH or ~/.local/bin),
  after the exact pinned runtime, instead of the unused ~/.t3/bin.
- Only reuse a tunnel while its ssh process is still running, so a
  process that took over the freed port never receives link tokens.
- Include the underlying cause in the SSH link error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant