A2A Check

AU-21: A command that installs a package by name is allowed without asking

Area: Permissions · Severity: medium · Catalogue version 1.104.0

Why it matters

The agent installs any package that a prompt or the model names with no one checking the name, and a name the model invented can be a package that a stranger published under it, which then runs with the rights of the agent.

Before (example)

Example: the agent is to add a helper library and installs a package whose name is almost the same.

How to fix it

Take the entry out of the allow list (Gemini CLI: tools.allowed or tools.core) and, in Claude Code, put it under ask. Before you confirm, check that the package name exists and comes from the expected publisher.

After (example)

Before: "permissions": {"allow": ["Bash(npm install:*)"]}
After: "permissions": {"ask": ["Bash(npm install:*)"]}
Before (Gemini CLI): "tools": {"allowed": ["run_shell_command(npm install)"]}
After (Gemini CLI): "tools": {"allowed": ["run_shell_command(npm test)"]}

Check it yourself

Open the settings and read the allow list for commands that install a package by name, such as npm install, pip install or npx.

All rules