Harden gateway: insecure-mode guard, cross-sandbox credential theft fix#5
Merged
persimmon16 merged 3 commits intofeat/apple-containerfrom Apr 1, 2026
Merged
Conversation
The previous check silently skipped authorization when the header was absent, allowing any caller to read any sandbox's credentials.
persimmon16
added a commit
that referenced
this pull request
Apr 1, 2026
… leak Three bugs from the initial SSH host-key PR (#4): 1. known_hosts wrote [sandbox]:2222 but SSH connects to "sandbox" at default port 22 — entry never matched, defeating StrictHostKeyChecking. Fixed to use bare "sandbox" hostname. 2. tempfile crate was only in [dev-dependencies] for openshell-cli, breaking release builds. Moved to [dependencies]. 3. TempDir::into_path() disabled automatic cleanup, leaking temp directories. Changed to return the TempDir guard so callers keep it alive until SSH exits, then cleanup runs on drop. Also fixes borrow-checker error in grpc.rs auth check (PR #5) where .ok_or_else() borrowed request while into_inner() tried to move it.
5 tasks
persimmon16
added a commit
that referenced
this pull request
Apr 1, 2026
* Fix SSH host key verification: hostname format, tempfile dep, TempDir leak Three bugs from the initial SSH host-key PR (#4): 1. known_hosts wrote [sandbox]:2222 but SSH connects to "sandbox" at default port 22 — entry never matched, defeating StrictHostKeyChecking. Fixed to use bare "sandbox" hostname. 2. tempfile crate was only in [dev-dependencies] for openshell-cli, breaking release builds. Moved to [dependencies]. 3. TempDir::into_path() disabled automatic cleanup, leaking temp directories. Changed to return the TempDir guard so callers keep it alive until SSH exits, then cleanup runs on drop. Also fixes borrow-checker error in grpc.rs auth check (PR #5) where .ok_or_else() borrowed request while into_inner() tried to move it. * Install Apple Container in macOS e2e workflow The macos-15 runner doesn't ship with Apple Container pre-installed. Download the signed .pkg installer from the GitHub release and install it before running container system info.
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
--disable-tlsnow requiresOPENSHELL_ALLOW_INSECURE=1environment variable to prevent accidental plaintext operationGetSandboxProviderEnvironmentRPC verifies that the caller'sx-sandbox-idheader matches the requested sandbox, preventing cross-sandbox credential theftTest plan
cargo build --release -p openshell-serversucceeds--disable-tlsexits with error unlessOPENSHELL_ALLOW_INSECURE=1is set