Read our approach
● 12 questions before buying AI● How to respond when AI fails● Why AI citations are not proof● AI agents: who signs off?● AI agent security: build a threat model before granting tools
Security8 min read · Published 2026-10-09 · Updated 2026-11-06

AI agent security: build a threat model before granting tools

When an AI system can use tools, read files or change records, prompt injection and permission mistakes become operational security issues.

By Satya PrasadSource-led, independent technology analysis. See our editorial policy.

Want to see more from Ninth Post on Google? Add us as a preferred source.

Cybersecurity analyst and AI robot inspecting a suspicious prompt-injection attempt, with unauthorized tool access blocked in a security operations center.
Illustration: identifying prompt-injection risks and blocking unauthorized AI agent actions before granting tool access.

Topic diagram

Map the path from untrusted input to real-world action

InputTreat messages and retrieved content as untrusted
AuthorityLimit tools, credentials and data scope
ActionValidate, log, approve and recover safely
Quick answer: When an AI system can use tools, read files or change records, prompt injection and permission mistakes become operational security issues.

Key takeaways

  • Model instructions are not a substitute for application-level security controls.
  • Treat retrieved pages and documents as untrusted input.
  • Constrain credentials, tools, destinations and high-impact actions.
  • Test prompt injection and unauthorized access paths regularly.

Why this question matters

An AI agent may read documents, browse websites, call APIs or update business systems. That creates a new boundary between untrusted information and privileged actions. A secure design assumes that content encountered by the agent may be misleading and that model instructions alone are not a reliable security boundary.

Map assets and trust boundaries

List the data the agent can read, the systems it can modify, the credentials it uses and the actions that create external effects. Mark which inputs are trusted, user-supplied or retrieved from the web. Define what an attacker could gain if the agent follows malicious instructions.

Treat retrieved content as untrusted

A document or webpage may contain instructions designed to change the agent's behavior. The system should not let such text grant permissions, override policy or authorize data exfiltration. Separate instructions from content and enforce critical rules outside the model wherever possible.

Apply least privilege

Give agents narrow credentials and short-lived access where possible. Separate read and write tools, constrain destinations, limit transaction amounts and require approval for irreversible or high-impact actions. Do not share a broad employee credential simply because the agent needs one task completed.

Validate tool calls outside the model

Use schemas, allowlists, authorization checks, rate limits and server-side validation. The application should verify whether the current user and workflow are allowed to perform an action. A model's statement that an action is safe is not an authorization check.

Log and recover safely

Record relevant tool calls, approvals, errors and outcomes without storing unnecessary sensitive content. Provide cancellation, rollback or disable controls. Test malicious documents, conflicting instructions, tool outages and attempts to access another user's data.

Reassess after every integration

Adding a new connector can dramatically expand what an agent can see or change. Review each tool as a new trust boundary and repeat testing after model, prompt, permission or workflow changes. Security is an ongoing operating practice, not a one-time prompt improvement.

Common questions

Can prompt instructions alone prevent prompt injection?

No. Treat retrieved content as untrusted and enforce permissions, validation and action limits in the tools and services the agent can access.

Which actions should require approval?

Consider explicit approval for actions with external impact, sensitive data exposure, irreversible changes or financial consequences. Base the rule on risk.

Exercise the response plan

Run a tabletop scenario in which an agent reads a malicious document, attempts an unauthorised action and produces an unexpected output. Confirm who detects it, who can suspend access, how affected records are identified and how users are informed. Test recovery from a provider outage and a compromised integration. Record the time needed to contain the incident and close gaps before broadening access.

Repeat the threat assessment when the agent receives new tools, permissions, data sources or autonomy. A previously safe workflow can change materially when it is allowed to act rather than recommend. Start with narrow permissions, gather evidence and expand authority only when the controls and monitoring have been tested.

Questions before an agent receives access

What data can it read, and which actions can it take? Can a malicious document influence a tool call? Are permissions enforced outside the model? Which actions require confirmation? Who can revoke credentials, inspect logs and stop the system during an incident?

Test these controls with realistic attack paths before adding broader permissions. Revisit them whenever a new integration or data source is introduced, because the agent's risk changes with its authority.

Why agentic AI is receiving regulatory attention

On 8 October 2026, the UK's Information Commissioner's Office opened a call for evidence on data protection risks from agentic AI. For product teams, the practical implication is to document what an agent can access, which actions it can take, how permissions are enforced and who responds when the system behaves unexpectedly. The announcement does not establish one universal legal rule for every agent. Read the ICO’s agentic AI call for evidence and assess the requirements relevant to your own deployment.

Example: trace a malicious instruction to a real-world action

Consider an agent that reads supplier emails and can draft purchase orders. A malicious email contains instructions telling the agent to ignore its task and send confidential records to an external address.

  1. Entry point: untrusted email content enters the model context.
  2. Potential impact: the model treats the embedded instruction as authority or requests a dangerous tool call.
  3. Preventive controls: treat email as data, restrict accessible records, validate recipients and enforce tool permissions outside the model.
  4. Detection: log the attempted action and flag sensitive-data export.
  5. Recovery: revoke the relevant credential, review affected records and test the blocked path before resuming.

This is an illustrative threat path, not a reported incident. A threat model should document assets, trust boundaries, attacker capabilities, likely impact, preventive controls and the evidence used to test those controls.

Founder analysis · AI agent security: build a threat model before granting tools - Ninth Post

In the malicious-instruction exercise, send the tool call directly to the authorisation layer with the agent identity and a disallowed action. Expect a denial even if the model output is syntactically valid. Track this alongside the OWASP prompt-injection scenarios.

Sources and further reading

Editorial note: This article is general information, not legal, security, financial or professional advice. Requirements and best practices may differ by jurisdiction and use case.

Keep reading

← Back to Ninth Post