Skip to the letter
SecureAgentSandbox.com

Security for AI agents that run or test other companies' software: tenant isolation, untrusted code, outbound traffic, secrets, audit logs and questionnaires.

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:

  1. The control service, which takes customers' requests, stores tasks, credentials and results, and starts runs.
  2. The run, an execution environment with the agent loop and a browser, created per task.
  3. The model, often called over the network from a model provider.
  4. The customer's app, usually a staging or preview environment, with its own users' data and its third-party scripts.
  5. 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

BoundaryWhat crosses itWhy it matters
Customer app to runPage content, scripts, downloadsThe app is untrusted input to the model
Run to runNothing, by designDifferent customers share infrastructure
Run to control serviceResults, recordings, requests for secretsA compromised run must not reach other tenants' data
Run to internet and internal networkOutbound connectionsA steered agent may try to reach internal systems
Platform to model providerPrompts with page text and task dataCustomer 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

ThreatSTRIDEExamplePrimary controls
Prompt injection from the app under testTampering, Elevation of privilegeA comment in the app tells the agent to visit another URL and paste what it seesConstrained agent design, egress allow-list, approval for high-impact actions
Leak between customersInformation disclosureA cache key without the tenant ID returns another customer's screenshotPer-run environments, tenant context on every layer, per-tenant keys
Credential theft or misuseSpoofingA stored test password is read by a run for another customer, or appears in a logPer-tenant secret scope, no secrets in logs or model context
Server-side request forgery from the agent's browserElevation of privilege, Information disclosureThe agent is steered to a metadata or internal service addressDefault-deny network, resolved-address checks at the proxy
The agent does damage beyond its testTampering, Denial of serviceThe agent deletes records or emails real users from a staging app wired to production servicesLeast-privilege test accounts, action limits, approvals
Forged or hidden resultsTampering, RepudiationPage text convinces the agent a failing test passed, or a run's logs are editedVerdicts 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".

  1. 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.
  2. Separate customers at every layer. See tenant isolation for multi-tenant agents.
  3. Hold credentials in custody, per tenant. See handling customers' test credentials.
  4. Deny outbound traffic by default. See outbound traffic control per customer.
  5. 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.
  6. Decide verdicts in code. Where a test checks state, query the state; keep the model's summary as commentary.
  7. 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

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,

Revised , 5 minutes to read