Repository navigation
fix(copilot): hold sim_cli commands that perform approval-gated capabilities - #9582
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[High impact] The PR appears safe to merge; no actionable issues were found. SummaryMakes Copilot approval checks follow the command that
No actionable issues were found. Review was based on source inspection; tests were not run.
|
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…ilities The permission gate decided by catalog lookup alone, and sim_cli has no catalog entry, so no CLI command was ever held. The worker exposes deploy, promote, run and cancel only through the CLI, so those catalog approval flags guarded nothing, and the CLI's own confirmation is answered by --yes in model argv. Resolve the argv with the CLI's own parser to the command it would run and the v2 operations it declares, and hold the call when one is the capability of an approval-gated catalog tool. Both lanes ask the same predicate. Always-allow covers a CLI call only when its row names the command the parser resolves.
waleedlatif1
force-pushed
the
fix/sim-cli-approval-gate
branch
from
November 2, 2026 21:21
04f1a87 to
1f0cab1
Compare
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously 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
sim_clihas no catalog entry, so no CLI command was ever held for approval, and the CLI's own confirmation is answered by--yesin model-supplied argvsim_cli, so therequiresApprovalflags onpromote_to_live,deploy_as_*,run_workflow,cancel_workflow_run,delete_workspace_mcp_server, andcall_integration_toolguarded nothingresolveEmbeddedCliCommandtosim/embed: resolves argv with the CLI's real commander tree and parser (stopped atpreAction, nothing runs) to the dispatched command's path and the v2 operations it declares.connect/OperationClientalready refuse undeclared operations, so this bounds what the call can docliRequestRequiresApprovalholds a CLI call when any declared operation is the capability of an approval-gated catalog tool (activate + rollback, deploy/undeploy, chat publish/unpublish, MCP tool deploy/undeploy, MCP server delete, execute/resume, cancel run, tool execute). Read commands stay ungated. Argv the parser cannot follow is heldexecName) and the in-band route (withparams)sim_cli) never carries consent across commandsType of Change
Testing
prePersistClientExecutableToolCall: aworkflows activate create … --yesframe is stampedawaiting_approval; always-allow on a sibling command orsim_clidoes not cover itresolveEmbeddedCliCommandtests: global flags before/between path segments, aliases; help/unknown/usage-error/--dry-runargv resolve to no command and running each throughrunEmbeddedClimakes zero HTTP callshandlers.test.ts,router.test.ts,permission.test.ts,embed.test.ts, lint, sim-cli type-check, and the comment-hygiene/file-names/utils/explicit-any/boundaries audits locally; full suite,check:auditsand type-check in CIChecklist
test-auditauthoring gate)