Repository navigation
Conversation
The Plan agent could run shell commands (e.g. a script written around the edit deny) that make destructive changes without being prompted (issue anomalyco#53955). Pin the Plan agent's shell permission to ask, mirroring how read-only is enforced everywhere else (issue anomalyco#53955).
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Contributor
|
Thanks for the fix, @potoior! I think this duplicates #54165, which also fixes #53955 by adding the same |
3 tasks done
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.
Issue for this PR
Closes #53955
Type of change
What does this PR do?
On v2 the
planagent runs shell commands without confirmation, soopencode plancan execute shell commands the user never approved.packages/core/src/plugin/plan.ts: the plan tool's item now carries a{ action: "shell", resource: "*", effect: "ask" }permission so the plan agent asks before running shell commands.packages/core/test/plugin/plan.test.ts: addsrequires confirmation before the plan agent runs shell commands.How did you verify your code works?
bun typecheckclean inpackages/core.packages/core/test/plugin/plan.test.ts: 13/13 pass (including the new confirmation test).Screenshots / recordings
N/A (core logic + test).
Checklist