Secretless brokered CLI execution - #396
Merged
Merged
Conversation
Brokered CLI credentials in the non-legacy cutover modes were still injected into the conversation's general sandbox environment in direct messages, where any executed command can read them, and the shared-room owner-auth path interpolated vended values into shell function text that session records then persist. Non-legacy brokered services are now reachable only through a credential_exec tool that takes a service enum plus literal argv — the model never supplies a command string or binary path. Each invocation vends credentials on demand, runs the deployment-declared binary once in a fresh scratch box that is destroyed afterward, and masks stdout/stderr with the vended values (including encoded variants) before anything reaches the model or durable records. Ephemeral-only mode denies direct binary execution with a deterministic pointer to the tool, the eager per-turn credential vend is gone, credential_exec consumes command approvals exactly like execute, and legacy mode is unchanged for rollback.
ReganBell
added a commit
that referenced
this pull request
Aug 13, 2026
Brokered CLI credentials in the non-legacy cutover modes were still injected into the conversation's general sandbox environment in direct messages, where any executed command can read them, and the shared-room owner-auth path interpolated vended values into shell function text that session records then persist. Non-legacy brokered services are now reachable only through a credential_exec tool that takes a service enum plus literal argv — the model never supplies a command string or binary path. Each invocation vends credentials on demand, runs the deployment-declared binary once in a fresh scratch box that is destroyed afterward, and masks stdout/stderr with the vended values (including encoded variants) before anything reaches the model or durable records. Ephemeral-only mode denies direct binary execution with a deterministic pointer to the tool, the eager per-turn credential vend is gone, credential_exec consumes command approvals exactly like execute, and legacy mode is unchanged for rollback. **Deployment notes** New credentialexec tool + orchestrator brokering only surfaces when the deployment layer _ g y py y marks tools as broker/ephemeral_only — stock upstream (no such layer) sees no new tool and no behavior change Behavior flip for layers already using ephemeral_only: direct execution of those commands is now denied (prepended to the scope policy so a scope-level allow can't outrank it) — the intended contract, but a layer relying on direct runs would notice Harness interface gains a member — out-of-tree harness implementations need a one-line update; no DB, no env, approval-grant flow reuses the existing execute path <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/396"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789237863&installation_model_id=19911&pr_number=396&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F396&signature=2116baa3792227e3dd0820b79c4feb727d31bb795004a12542ac1be72f78a90b"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
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.
Brokered CLI credentials in the non-legacy cutover modes were still injected into the conversation's general sandbox environment in direct messages, where any executed command can read them, and the shared-room owner-auth path interpolated vended values into shell function text that session records then persist. Non-legacy brokered services are now reachable only through a credential_exec tool that takes a service enum plus literal argv — the model never supplies a command string or binary path. Each invocation vends credentials on demand, runs the deployment-declared binary once in a fresh scratch box that is destroyed afterward, and masks stdout/stderr with the vended values (including encoded variants) before anything reaches the model or durable records. Ephemeral-only mode denies direct binary execution with a deterministic pointer to the tool, the eager per-turn credential vend is gone, credential_exec consumes command approvals exactly like execute, and legacy mode is unchanged for rollback.
Deployment notes
New credentialexec tool + orchestrator brokering only surfaces when the deployment layer
_ g y py y
marks tools as broker/ephemeral_only — stock upstream (no such layer) sees no new tool and no
behavior change
Behavior flip for layers already using ephemeral_only: direct execution of those commands is now
denied (prepended to the scope policy so a scope-level allow can't outrank it) — the intended
contract, but a layer relying on direct runs would notice
Harness interface gains a member — out-of-tree harness implementations need a one-line
update; no DB, no env, approval-grant flow reuses the existing execute path
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.