Tool Permissions for AI Agents: Reading Text Is Not Permission to Delete Records
An AI agent reading an external document must not treat every sentence as an authorized instruction. OWASP's prompt injection risk describes how untrusted data can cross the boundary into command authority. Tools should follow least privilege.
Archive retrospective · Topic year 2025
The period's question and business need
An AI agent reading an external document must not treat every sentence as an authorized instruction. OWASP's prompt injection risk describes how untrusted data can cross the boundary into command authority. For a use case such as an assistant operating on catalog records, start by stating the problem in one sentence. A technology name is not a requirement. The user outcome, limits of the source data, and acceptable freshness define the actual decision. This analysis places the technique in its historical context without pretending that all modern capabilities were already available.
Technical behavior and boundaries
Tools should follow least privilege. Retrieving sources, drafting content, publishing, and deleting permanent records should be separate API operations; giving one tool every permission increases the damage of a mistake. The easiest implementation path is not always the most reliable. In an assistant operating on catalog records, contracts, record identity, and update order must be explicit. Check that client-side controls do not replace server-side authorization or integrity constraints. Assigning responsibility to each layer makes performance and debugging easier to reason about.
Building the practical data flow
Even if a page contains text telling the agent to approve all records, that is not user authorization. Permanent actions require verified identity, exact target, and enforceable application permissions. Begin with a small fixture and then test data resembling production volume. In an assistant operating on catalog records, duplicate events and missing fields should have defined outcomes. Information lost in intermediate layers can leave durable data inconsistent even when the user interface appears correct.
Unexpected conditions and risks
A model appearing well intentioned is not a security control. Database write boundaries, unique keys, revision guards, rate limits, and audit logs must operate independently of the language model. A major implementation risk is treating one favorable test as proof. an assistant operating on catalog records behaves differently across permissions, volumes, and network conditions. Logs should support diagnosis without copying sensitive data, and response ownership should be defined before failures happen.
How to interpret test results
Place a malicious tool-call instruction inside a document in a test environment and inspect what actually happens. Success means the model cannot make unauthorized critical changes, even if it suggests them. Add boundary, failure, and recovery cases to successful examples. For an assistant operating on catalog records, track record counts, latency, and user-visible outcomes separately. Write expected results before testing; moving the target afterwards weakens the evidence. Comparing versions on equivalent data produces stronger conclusions.
The architectural lesson for today
Safety and throughput are not opposites. Automating low-risk work while placing high-impact actions behind separate authorization boundaries preserves utility and reduces irreversible failures. A durable solution is a contract that can be retested, not merely a working demonstration. List the conditions to preserve before changing an assistant operating on catalog records. Understanding why an earlier decision was taken prevents misguided optimization as the product grows. Until user-visible gains are measured, an improvement remains a hypothesis.
Reader discussion
No comments yet. Be the first to contribute.
Write a comment