An agent that can call tools is a different security problem from a chatbot. As the Frontier Model Forum puts it, the capabilities that make agents useful also create risks that existing cybersecurity frameworks were not designed for, especially misaligned actions taken outside the intended scope of a deployment (Frontier Model Forum). The dangerous combination is well documented as the lethal trifecta: access to private data, exposure to untrusted content, and the ability to communicate externally all at once (Simon Willison). An agent inside that combination can be talked into exfiltrating data by instructions hidden in content it reads.
Approval gates alone do not fix prompt injection. What they do is bound the damage: a consequential action cannot execute until a named person says yes. The OWASP cheat sheet is blunt about the mechanism. Instructions in a prompt are not a control; authorization must be enforced in the execution component, outside the agent's context, and unknown tools or missing approval requirements should fail closed (OWASP AI Agent Security Cheat Sheet).
A policy file has three practical advantages over if statements scattered through your code:
- It is reviewable. A security reviewer can read the YAML and see that
payments.transferabove 5,000 needs two approvals. They cannot audit 40 branches across 12 files. - It is testable. You can write a table of actions and expected tiers, and a failing test points at the policy, not at model behavior.
- It is one enforcement point. Every tool call goes through one wrapper, which means there is exactly one place to instrument, log and fix.
That last point matters for audit. A defensible trail needs the policy outcome recorded alongside the actor, the target and the arguments, because a policy decision you did not log is a decision you cannot explain later (Digital Applied).



