Repository navigation
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-5613.docs.buildwithfern.com/openshell |
krishicks
force-pushed
the
feat/2911-name-exec-ssh-resources/krishicks
branch
from
November 16, 2026 18:51
4e259ba to
225cad7
Compare
Base automatically changed from
feat/2911-name-provider-config-resources/krishicks
to
main
November 19, 2026 00:45
Exec, ForwardTcp, and SSH session records named no resources, so a reader could not tie a record to the sandbox, relay channel, or session it acted on, or tell which revoke ended a session. Name the sandbox and the relay channel each exec or forward opens; an exec's channel matches the channel_id in the gateway's sandbox logs. Record a TCP forward's target host and port, and name SSH sessions, and the SSH forwards that use them, by their generated name. A repeated revoke records no_op:already_absent. Add [openshell.gateway.audit] capture_exec_command to record exec command arguments. Environment variables, standard input, and session tokens are never recorded. Signed-off-by: Kris Hicks <khicks@nvidia.com>
krishicks
force-pushed
the
feat/2911-name-exec-ssh-resources/krishicks
branch
from
November 19, 2026 01:00
225cad7 to
3a7c3be
Compare
krishicks
marked this pull request as ready for review
November 19, 2026 01:00
This branch has not been deployed
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
Exec,
ForwardTcp, and SSH session records name no resources, so a reader cannot tie a record to the sandbox, relay channel, or session it acted on, or tell their own execs from someone else's. These records now name the sandbox, the relay channel each exec or forward opens, and the SSH session by its generated name. A new opt-in setting records exec command arguments. Environment variables, standard input, and session tokens never appear.Stacked on #5612; review only the last commit until the PRs below it merge.
Related Issue
Part of #2911
Changes
ExecSandbox,ExecSandboxInteractive, andForwardTcprecord the workspace and sandbox, then, once the relay opens, anexecorforwardresource whoseuidis the relay channel ID. An exec's channel ID matches thechannel_idon itscommand startedline in the gateway's sandbox logs.data. An SSH forward names the session it used.CreateSshSessionandRevokeSshSessionname the session by its generated name, never by its token. Revoking an already revoked session recordsno_op:already_absent.[openshell.gateway.audit] capture_exec_command(defaultfalse) records the first 32 command arguments and how many were left out. The docs warn that arguments can contain secrets the caller passes.Before / after
Real OCSF output from the gateway handlers, called by the test user on a ready sandbox
agent-01with a registered supervisor session. The exec's environment variable and stdin were canary strings, and the SSH token appears in no record.ExecSandbox agent-01 python train.pywithHF_TOKENand stdin → stream ends OKworkspace:default,sandbox:agent-01with its ID,execwith the relay channel IDCreateSshSession agent-01→ OKworkspace:default,sandbox:agent-01with its ID,ssh_session:btirwnForwardTcpSSH target with the session token → stream ends OKworkspace:default,sandbox:agent-01with its ID,ssh_session:btirwn,forwardwith the relay channel IDRevokeSshSessionwith the session token → OKworkspace:default,sandboxby ID,ssh_session:btirwnRelease Notes
Gateway audit records for exec, port forwarding, and SSH sessions now name the sandbox, the relay channel, and the session. An exec's channel ID matches its sandbox log lines. Set
capture_exec_command = trueunder[openshell.gateway.audit]to also record exec command arguments.Testing
Checklist