Skip to content

Guidance3 min read

What an AI penetration test should actually cover, and what it should cost you in time

Most AI security proposals are a web application test with a chapter about jailbreaks. Here is what the work actually involves, and how to tell the two apart.

Sameer

Founding Engineer

A mesh of knotted green rope forming a connected network
Photo: Clint Adair (CC0, via Wikimedia Commons)

Buyers are being sold "AI security assessments" that consist of a standard web application test plus an afternoon of asking a chatbot to say something rude. The difference between that and a real test is not technique sophistication — it is whether the architecture was mapped before the testing started, and whether the findings concern the system rather than the model.

What distinguishes an AI test from a web test

A conventional application test enumerates routes and parameters. An AI test has to enumerate the data flow and the capability surface, because that is where the security properties live.

  • Every channel by which text enters the context window — user input, retrieved documents, tool responses, memory, system integrations, ingested files, tool descriptions.
  • Every capability the model can invoke, with its parameters, its credentials and its reversibility.
  • Every boundary the retrieval layer is supposed to respect: tenant, user, role, matter, facility, department.
  • Everything that leaves the perimeter, to whom, under what contract and with what retention.
  • Every place prompts and completions are stored, and who can read them.

The scope of a credible engagement

  1. Architecture review against the actual implementation — the retrieval query, the tool definitions, the prompt as assembled at runtime — not against a diagram.
  2. Isolation testing across every boundary that is meant to hold, with seeded canaries and bidirectional probes.
  3. Prompt injection through every entry channel, reported as rates across a fixed corpus so results are comparable between retests.
  4. Tool and function authorisation testing, argument by argument, against the session.
  5. Chained-action testing for privilege assembly across multiple tools.
  6. Corpus and memory poisoning from the lowest privilege that can write.
  7. Output handling: whether model output reaches a renderer, a shell, a query or a downstream system without validation — this is where AI findings become conventional critical vulnerabilities.
  8. Denial of wallet: rate limits, spend caps, loop detection, and the cost of an adversarial session.
  9. Data governance verification: egress, contracts, training exclusion, retention and erasure propagation, tested rather than asserted.
  10. The conventional application and infrastructure test around all of it, because the vector store with no authentication is still the most likely way in.

What the report should contain

  • Rates, not verdicts, for probabilistic behaviours — "injection via retrieved documents succeeded in 34 of 120 attempts" is actionable; "the model is vulnerable to prompt injection" is not.
  • Reproduction steps that work, with the exact inputs, so your engineers can verify the fix rather than take it on trust.
  • Evidence for every claimed impact. A cross-tenant finding should show the canary.
  • Findings separated into what is fixable in the system and what is inherent to the architecture, with containment advice for the latter rather than a recommendation to fix the unfixable.
  • A retest that re-runs the same corpus, so the rate is comparable.

Questions to ask before you buy

  1. Will you read our retrieval query and our tool definitions, or test the interface only?
  2. How do you report probabilistic findings, and will a retest produce comparable numbers?
  3. Which entry channels will you inject through, and will you include tool responses and tool descriptions?
  4. How do you test tool authorisation — through the chat interface, or against the API directly?
  5. Do you test cost and quota controls?
  6. Will you verify data governance claims, or accept our documentation?
  7. Who writes the report, and is that the person who did the testing?

Frameworks worth referencing, and their limits

The OWASP Top 10 for LLM Applications is the most useful shared vocabulary available and worth mapping findings to, so your auditors and your engineers can read the same report. NIST’s AI Risk Management Framework is the right language for governance conversations. MITRE ATLAS helps when you need to describe adversary behaviour to a board. None of them is a test plan: they describe categories, not the specific query, tool and boundary in your system, and a report organised only by framework category usually means the system was never examined.

Where to start

Before commissioning anything, write down your own answers to three questions: what text can reach the context window, what can the model cause to happen, and what leaves your perimeter. If you cannot answer those from memory, the first day of any competent engagement will be spent establishing them — and you may find that exercise alone surfaces the finding you were worried about.

Questions we get asked

How long does an AI penetration test take?
For a single assistant with a handful of tools and one retrieval corpus, expect one to two weeks including the conventional application test around it. A multi-tenant platform with agentic capability and several integrations runs longer. Anything quoted at two days is testing the chat window.
Is AI red teaming the same as AI penetration testing?
Overlapping but not identical. Red teaming usually emphasises model behaviour and content safety at scale; penetration testing emphasises the system — isolation, authorisation, egress, output handling. Most buyers need the second and are being sold the first.
Do we need this if we only use a third-party AI product?
You need the vendor’s evidence and a test of your own integration — the credentials you issued it, the data you send it, the actions you let it take in your systems. The integration is yours even when the model is not.
  • AI penetration testing
  • LLM security testing methodology
  • OWASP LLM Top 10
  • AI red teaming India
  • AI security assessment scope