一旦代理能够行动 — 删除文件、运行shell命令、调用外部API、花费金钱 — 它的错误(或恶意prompt)就会产生现实世界的后果。防御方法是最小权限plus批准闸门plus隔离:只给予它需要的权限、对任何不可逆操作要求确认、在无法造成持久伤害的地方运行它。
风险
text
- DESTRUCTIVE actions → rm -rf, DROP TABLE, force-push → irreversible data loss
- ARBITRARY shell → run anything → privilege escalation, exfiltration
- EXTERNAL APIs/$$ → send emails, place orders, spend on cloud/LLM tokens
- SECRET exposure → leak API keys / .env / tokens into logs or outbound calls
- PROMPT INJECTION → untrusted input (a web page, an issue) hijacks the agent
