feat(gateway): allow ssh stdio transports - #476
Draft
elibosley wants to merge 1 commit into
Draft
Conversation
Collaborator
|
Adding Can you add SSH-specific validation that rejects |
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
Labby now accepts SSH as a direct stdio transport, so remote MCP services do not need the
envwrapper workaround.Why This Exists
The stdio spawn guard rejected
/usr/bin/sshbecausesshwas not in the built-in command list. Users had to hide SSH behind an allowlistedenvcommand, which made the transport unclear and broader than necessary.Resolution
Add
sshto the built-in stdio command allowlist. The existing basename check accepts bothsshand absolute paths such as/usr/bin/ssh. Keep the current argument and environment validation in place.Reviewer Considerations
env-wrapped configurations remain compatible.Behavior Changes
/usr/bin/sshandsshpass the stdio command guard.Implementation Summary
sshtoALLOWED_RUNTIME_HINTS.Verification
cargo fmt --all -- --checkgit diff --checkcargo test -p labby-gateway security::spawn_guard::tests— 36 passed, 0 failed.Risk
Low; the change reuses the existing admin-gated stdio path and keeps the current command, argument, and environment checks.