A threat model for AI agents that test customers' web apps
In short
The main threats to an AI agent that tests customers' apps are prompt injection from the app, leaks between customers, credential misuse, the agent's browser reaching the vendor's internal network, damage beyond the test, and forged results. Model them with STRIDE.
A threat model is a written answer to four questions, which OWASP's Threat Modeling Cheat Sheet quotes from the Threat Modeling Manifesto: "What are we working on?", "What can go wrong?", "What are we going to do about it?" and "Did we do a good enough job?" (OWASP Threat Modeling Cheat Sheet, read 2026-11-26). This article answers the first three for one kind of system: a vendor's AI agent that logs into customers' web apps to test them. Use it as a starting point for your own model, not a finished one.
What are we working on?
We are working on a multi-tenant service in which an AI agent receives a task, opens a browser in an isolated run, logs into a customer's app with credentials the customer provided, acts on the app, and reports a result. The parts that matter for security are:
- The control service, which takes customers' requests, stores tasks, credentials and results, and starts runs.
- The run, an execution environment with the agent loop and a browser, created per task.
- The model, often called over the network from a model provider.
- The customer's app, usually a staging or preview environment, with its own users' data and its third-party scripts.
- The data stores: secrets, recordings, logs, reports.
Where are the trust boundaries?
The trust boundaries are the lines where data or control passes between parties that trust each other differently. OWASP's sheet notes that data flow diagrams should give "a clear view of trust boundaries, data flows, data stores", and that these "often represent possible attack points" (OWASP Threat Modeling Cheat Sheet, read 2026-11-26).
Table: Trust boundaries in an AI testing agent platform
| Boundary | What crosses it | Why it matters |
|---|---|---|
| Customer app to run | Page content, scripts, downloads | The app is untrusted input to the model |
| Run to run | Nothing, by design | Different customers share infrastructure |
| Run to control service | Results, recordings, requests for secrets | A compromised run must not reach other tenants' data |
| Run to internet and internal network | Outbound connections | A steered agent may try to reach internal systems |
| Platform to model provider | Prompts with page text and task data | Customer data leaves your boundary |
What can go wrong?
Six threats stand out. The table pairs each with its STRIDE category, using the property OWASP's STRIDE table says each category violates: Spoofing violates authentication, Tampering integrity, Repudiation accounting, Information disclosure confidentiality, Denial of service availability, and Elevation of privileges authorization.
Table: Main threats to an AI agent that tests customers' apps
| Threat | STRIDE | Example | Primary controls |
|---|---|---|---|
| Prompt injection from the app under test | Tampering, Elevation of privilege | A comment in the app tells the agent to visit another URL and paste what it sees | Constrained agent design, egress allow-list, approval for high-impact actions |
| Leak between customers | Information disclosure | A cache key without the tenant ID returns another customer's screenshot | Per-run environments, tenant context on every layer, per-tenant keys |
| Credential theft or misuse | Spoofing | A stored test password is read by a run for another customer, or appears in a log | Per-tenant secret scope, no secrets in logs or model context |
| Server-side request forgery from the agent's browser | Elevation of privilege, Information disclosure | The agent is steered to a metadata or internal service address | Default-deny network, resolved-address checks at the proxy |
| The agent does damage beyond its test | Tampering, Denial of service | The agent deletes records or emails real users from a staging app wired to production services | Least-privilege test accounts, action limits, approvals |
| Forged or hidden results | Tampering, Repudiation | Page text convinces the agent a failing test passed, or a run's logs are edited | Verdicts from code checks, append-only audit log |
The prompt injection row is the root of several others. OWASP defines Excessive Agency, LLM06:2025, as "the vulnerability that enables damaging actions to be performed in response to unexpected, ambiguous or manipulated outputs from an LLM", with three root causes: "excessive functionality", "excessive permissions" and "excessive autonomy" (OWASP LLM06:2025 Excessive Agency, read 2026-11-26). An agent with less agency gives an injection less to work with.
What are we going to do about it?
Assign each threat a control that does not depend on the model behaving well. The UK NCSC's advice for prompt injection is to "focus more on deterministic (non-LLM) safeguards that constrain the actions of the system" (NCSC, read 2026-11-26), and OWASP's LLM06 asks you to "Implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not".
- Constrain what injected text can cause. Plan the test before reading the app, limit the tools to what the test needs, and require approval for high-impact actions. Our article on prompt injection from the app under test goes through the design patterns.
- Separate customers at every layer. See tenant isolation for multi-tenant agents.
- Hold credentials in custody, per tenant. See handling customers' test credentials.
- Deny outbound traffic by default. See outbound traffic control per customer.
- Ask for least-privilege test accounts. OWASP LLM06's "Minimize extension permissions" applies to the accounts the agent uses as much as to its tools.
- Decide verdicts in code. Where a test checks state, query the state; keep the model's summary as commentary.
- Keep an append-only record. See audit logs for agent actions.
Did we do a good enough job?
You know the model is good enough when each threat has a test that tries it and fails. Write one per row: an injected page, a cross-tenant fetch, a secret search in logs, a request to a metadata address, a destructive action without approval, a page that claims success. Run them on every release. Published test suites help with the first row: AgentDojo populates its environment "with 97 realistic tasks" and 629 security test cases (AgentDojo, arXiv 2406.13352, read 2026-11-26).
What we read for this article
- OWASP Threat Modeling Cheat Sheet, read 2026-11-26
- OWASP LLM06:2025 Excessive Agency, read 2026-11-26
- NCSC: Prompt injection is not SQL injection (it may be worse), read 2026-11-26
- AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents (arXiv 2406.13352), read 2026-11-26
Questions readers ask
What is a threat model?
A structured answer to four questions from the Threat Modeling Manifesto, as quoted by OWASP. What are we working on? What can go wrong? What are we going to do about it? Did we do a good enough job?
What is the biggest threat to an AI testing agent?
Prompt injection from the app under test, because every page the agent reads is input it cannot fully trust, and the agent holds credentials and can act. Most other threats in this model become reachable through it.
What is STRIDE?
A checklist of six threat categories, each paired with the property it violates in OWASP's table. Spoofing breaks authentication, Tampering integrity, Repudiation accounting, Information disclosure confidentiality, Denial of service availability, and Elevation of privilege authorization.
Can the app under test make the agent report a false result?
Yes, if the model's own words decide pass or fail. Text on a page can tell the agent the test passed. Decide verdicts with checks in code against the app's state where you can, and treat the model's summary as a note.
Yours,
SecureAgentSandbox editors
Revised , 5 minutes to read