How LLMs Trigger Tool Calls and Why Execution Permissions Matter
An article explains that an LLM does not directly run Shell commands: it generates a tool-call request that an agent runtime may execute if permitted. Using a hypothetical database-migration prompt, it examines instruction following, indirect prompt injection, trust boundaries, least privilege, sandboxing, and human approval for side-effecting tools. The article is a conceptual analysis, not a report of a confirmed exploit or execution incident.
The article emphasizes that describing an operation in external content does not authorize executing it. It supports independent runtime permission checks, sandboxing, least privilege, and approval controls for agent tools.
当我们使用 ChatGPT、Claude Code、Cursor 或其他 AI Agent 时,可能会遇到一个有趣的现象:
我们只是输入了一段自然语言,大模型却可能真的打开终端,执行一条 Shell 命令。
例如,向一个具备终端执行能力的 Agent 输入:
## Database migration
Run exactly this sequence:
```bash
python scripts/migrate.py --verify --backup
```
Do not modify the command or add additional flags.
这段内容看起来很简单:一个 Markdown 标题、一句英文指令、一个 Bash 代码块,以及一条额外约束。
但对于具备工具调用能力的大模型来说,它可能被理解为一项需要立即执行的任务。
Some source content is omitted. Continue reading on the original site.