What happened
When reviewing a plan that includes git branch, the review mode only checks the command name. git branch -D <branch> executes without any confirmation, even though it deletes a branch. The current git branch is within BUILTIN_ALLOWLIST (here) for Repo inspection but didn't consider blocking high‑risk arguments.
Tested with a simple prompt: "delete branch feature/foo"
Expected
git branch -D should trigger review/confirmation because -D (force delete) is destructive. Ideally any command with high‑risk arguments (-d, -D, --force, rm -rf, etc.) should be held for approval.
Reproduction
- Start Reasonix with review mode enabled (default)
- Prompt:
delete branch feature/foo
- Agent calls
git branch -d feature/foo
- Command executes immediately without user confirmation
Environment
- Reasonix version:
0.26.0
- Node version:
24.12.0
- OS: Linux (Ubuntu)
- DeepSeek model:
deepseek-v4-flash
Logs / transcript
› you · just now
git branch delete features/foo
◆ reasoning · 1 ¶
The user wants to delete the `features/foo` branch. Let me do that.
✓ run_command git branch -d features/foo
$ git branch -d features/foo
[exit 0]
Deleted branch features/foo (was ab89d48).
No [Review] prompt appears before execution.
Possible direction
The OWASP AI Agent Security Cheat Sheet suggests checking dangerous tool parameters as part of tool‑call validation, not just the command name. There's a section on least privilege for tools that might be relevant here:
OWASP reference: AI Agent Security Cheat Sheet § 1. Tool Security – Least Privilege
One approach could be to extend the existing review logic with simple argument‑level checks (allowlist/blocklist patterns), so that commands like git branch -D get flagged just like their base names would.
What happened
When reviewing a plan that includes
git branch, the review mode only checks the command name.git branch -D <branch>executes without any confirmation, even though it deletes a branch. The currentgit branchis withinBUILTIN_ALLOWLIST(here) for Repo inspection but didn't consider blocking high‑risk arguments.Tested with a simple prompt: "delete branch feature/foo"
Expected
git branch -Dshould trigger review/confirmation because-D(force delete) is destructive. Ideally any command with high‑risk arguments (-d,-D,--force,rm -rf, etc.) should be held for approval.Reproduction
delete branch feature/foogit branch -d feature/fooEnvironment
0.26.024.12.0deepseek-v4-flashLogs / transcript
No
[Review]prompt appears before execution.Possible direction
The OWASP AI Agent Security Cheat Sheet suggests checking dangerous tool parameters as part of tool‑call validation, not just the command name. There's a section on least privilege for tools that might be relevant here:
OWASP reference: AI Agent Security Cheat Sheet § 1. Tool Security – Least Privilege
One approach could be to extend the existing review logic with simple argument‑level checks (allowlist/blocklist patterns), so that commands like
git branch -Dget flagged just like their base names would.