Testing a generative AI application
A generative AI application is not tested like a conventional one: its attack surface is not in the code, it is in what the model agrees to do when asked the right way.
The flaw is not in the code, it is in the instruction
A language model does not natively distinguish the developer's instruction from one arriving inside the data it is given to read. That is the very nature of prompt injection: text placed in a document, a web page, a ticket or an email becomes an instruction the moment the agent processes it. The attacker needs no access to your system — only somewhere your agent will go and read.
The risk grows with the capabilities granted. An agent that merely answers mostly exposes its context: internal instructions, document extracts, other users' data left in memory. An agent that can call tools — send an email, write to a database, trigger an action — exposes those tools themselves, with the rights it was given.
Then comes the question of guardrails. They are almost always present, and almost always bypassable: rephrasing, switching language, role-play, splitting the request. Testing them measures not whether they exist, but what it costs to cross them.
- Hidden instruction inside a document the agent processes
- Another user's data returned through the context
- The agent's tools diverted beyond their intended use
- Guardrails crossed by simple rephrasing
- The agent holding wider rights than its own user
Anything the agent reads can give it an order
How we proceed
We test the application as exposed, with the rights of an ordinary user, then work back towards what those rights make reachable.
Scoping and capabilities
An inventory of what the agent can do: sources it consults, tools it can call, data it reaches, and under whose identity. This map of capabilities defines what is genuinely at stake.
Direct and indirect injection
Attempts to hijack it through user input, then through the content the agent ingests — a document, a page, a record. The second is the graver one, because it requires no access to your application at all.
Context and separation
Hunting for what the model gives back from its context: internal instructions, document fragments, traces of other sessions. We check that a user cannot reach, through the agent, what their own rights forbid.
Tools and side effects
Testing the actions the agent can trigger: diverted use, unintended chaining, execution without confirmation. An agent that writes or sends is an agent that can be made to write or send something else.
Debrief and hardening
A prioritised report with reproducible proof, then concrete recommendations: narrower rights, separation of trusted sources, output validation, usable logging. A retest follows the fixes.
Several disciplines, a single point of contact
The test probes the application, integration frames the rights, training prepares the people building it.
- Map of the agent's capabilities and rights
- Reproducible injection scenarios
- Findings prioritised by real impact
- Hardening recommendations you can apply
- Retest once fixes are in
Frequently asked questions
What can your agent do if asked the right way?
Tell us what it consults and what it can trigger, and we will scope the test from there.