AI Agent Security Testing
ai agent security testing · authorized defensive testing
AI Agent Security Testing
Map agent capabilities, test tool and data boundaries safely, and record approval and retest evidence.
Map capabilities and identities
List model/provider, system prompt owner, retrieval sources, memory, tools, service identities, scopes, destinations, and human approval points. Draw the data path from a user request to any external change. Mark which content is trusted, which is user-controlled, and how identity is selected. A permission inventory is the foundation for realistic agent security testing.
Test tool misuse
Use a staging agent with synthetic data and mock write operations. Verify that a tool cannot read or change resources outside its intended scope, and that untrusted content cannot choose a destination or expand arguments. Capture the actual tool call and authorization decision. Do not execute a destructive test against a real account to prove the control.
Test data exfiltration paths
Check whether a user, retrieved document, or tool output can cause the agent to reveal records outside the request’s scope. Use synthetic marker records with different access levels. Validate the retrieval layer’s identity checks and logs. A refusal in the final text does not prove the protected data was never retrieved or placed in model context.
Test approval gates
Identify which actions need human review and whether the approval screen shows the actual action, recipient, and data. Verify that a prior approval cannot authorize a later unrelated step. Test denied, expired, and canceled approvals using a mock action. Keep approval logic independent from model-generated claims that consent has already been granted.
Worked test matrix
For each tool, write: name; intended purpose; service identity; allowed resources; prohibited resources; side effect; approval requirement; logging; owner; test case; and expected denial. Example: “draft reply” may read a synthetic ticket but cannot send mail. A mock send tool should record the attempted call and return a test receipt without contacting an external destination.
Report and retest
Report confirmed behavior, evidence, scope, severity rationale, and a control owner. Map to OWASP Agentic risk guidance and NIST AI RMF concepts where useful, while describing the exact local test. After a permission or approval fix, test both the originally blocked action and a safe allowed action. Reassess when provider, connector, model, tool schema, or data path changes.
Questions
Which framework should I use?
Use a framework as a reference for threat categories and governance, then adapt tests to your organization’s system boundary and risk tolerance.
Can a scanner verify tool permissions?
Only if its target integration can observe the relevant tool call and authorization behavior; confirm this before relying on its result.
Try a rule-based local check: Open the browser-local prompt injection tester
Sources
- OWASP Top 10 for Agentic Applications (2026)
- NIST AI RMF Core: Govern, Map, Measure, Manage
- NIST AI 600-1: Generative AI Profile
- MITRE ATLAS AML.T0051: LLM Prompt Injection
- OWASP LLM01 Prompt Injection
- OWASP LLM06 Excessive Agency
- Source set checked 1 October 2026; this page was updated 6 October 2026.
Questions
Which framework should I use?
Use a framework as a reference for threat categories and governance, then adapt tests to your organization’s system boundary and risk tolerance.
Can a scanner verify tool permissions?
Only if its target integration can observe the relevant tool call and authorization behavior; confirm this before relying on its result.