AU-16: Nothing stops a destructive command
Area: Permissions · Severity: medium · Catalogue version 1.104.0
Why it matters
Whoever allows commands without asking and blocks no destructive command relies on the agent never running one.
Before (example)
Example: an instruction from a web page makes the agent delete a directory, and nobody is asked.
How to fix it
Put the destructive commands under deny or ask, or set up a hook before the shell tool that checks the command. In Gemini CLI, list the shell tool under tools.confirmationRequired or set up a hook on BeforeTool.
After (example)
Before: "permissions": {"allow": ["Bash(npm test:*)"]}
After: "permissions": {"allow": ["Bash(npm test:*)"], "deny": ["Bash(rm -rf:*)", "Bash(git push --force:*)"]}
Before (Gemini CLI): "tools": {"allowed": ["run_shell_command(npm test)"]}
After (Gemini CLI): "tools": {"allowed": ["run_shell_command(npm test)"], "confirmationRequired": ["run_shell_command"]}Check it yourself
Open the settings and, if shell commands are allowed without asking, check that a deny or ask entry or a hook before the shell stands in the way of destructive commands.