Security
Testing AI features before launch
The attacks that target AI features, from prompt injection to data leaks, and how to test for them before launch rather than after.
Security · 7 min read · 10 Nov 2026
AI red teaming means attacking your own AI systems before someone else does. Here's what it covers, how it differs from a pen test, and a sensible way to begin.
AI red teaming is the practice of attacking an AI system on purpose, the way a real adversary would, to find weaknesses before someone else does. Microsoft describes it as testing generative AI systems to find safety and security weaknesses so they can be strengthened. For a company shipping an assistant or an agent, it means finding out whether the thing can be tricked into leaking data, taking actions it shouldn’t, or saying something harmful, and fixing that before customers find out first.
This guide covers what it tests, how it differs from a standard penetration test, where automation helps, and how to start without a dedicated team.
The risks fall into a few groups.
OWASP’s Top 10 for LLM applications is a useful checklist for the technical categories, and MITRE maintains ATLAS, a knowledge base of adversary tactics against AI systems.
They overlap, and a good tester does both, but the emphasis differs.
| Penetration test | AI red teaming | |
|---|---|---|
| Target | Applications, APIs, networks | The model, the prompts, and how they’re wired into the product |
| Typical flaws | Broken access control, injection, misconfiguration | Prompt injection, jailbreaks, unsafe tool use, leakage through output |
| Behaviour | Mostly deterministic: the same input gives the same result | Probabilistic: the same attack may work one time in ten |
| Success measure | A confirmed exploit | A failure rate across many attempts, plus the worst case |
The probabilistic part matters. A traditional bug either exists or it doesn’t. An AI failure that happens in 3 per cent of attempts is still a failure, so red teaming runs many variations and reports how often they work. It also means a clean result today says little about next month’s model update.
Application security still counts, since the AI feature sits inside a normal application. A VAPT covers that half, and AI red teaming covers the half classic testing wasn’t built for.
The most useful public source on this is Microsoft’s account of red teaming more than 100 generative AI products, in a January 2025 write-up and an accompanying paper. Their three headline takeaways, in summary:
We agree with the second point most, and it shapes how we’d advise you to use automated tools.
Automated attack suites are good at breadth. They can run hundreds of known injection and jailbreak patterns against every release, record the results, and show whether a fix held. Our AI Governance Scanner does this and saves the results as evidence.
They’re weaker at the creative part: a tester who understands your product, your users and your business logic will think of an attack no suite includes. We’d treat an automated scan as the regression test that runs on every release, and a human-led exercise as the periodic deep look. Being clear about that is more useful to you than a tool promising full coverage.
Our testing guide goes through building the test cases in more detail.
Deliberately attacking an AI system the way an adversary would, to find security and safety weaknesses so they can be fixed. It covers things like prompt injection, jailbreaks, data leakage and misuse of tools.
Not quite. Penetration testing targets the application and infrastructure. AI red teaming targets the model and how it’s used inside the product. Many engagements combine both.
Parts of it can, mainly running known attacks at scale and scoring results. Microsoft’s experience is that human expertise remains essential for specialist topics and for creative attacks, so we’d use both.
We don’t know of an agreed schedule. A sensible rule is whenever something significant changes (a new model, new tools or data sources), and on a regular rhythm in between. Automated regression tests can run on every release.
If your product exposes an AI feature to customers or lets it act on company data, some form of it is worth doing, scaled to the risk. A single well-scoped test of your riskiest feature is a reasonable start.
Keep reading
Security
The attacks that target AI features, from prompt injection to data leaks, and how to test for them before launch rather than after.
Security
How API keys and passwords leak into public code, how quickly attackers find them, and how to catch and rotate them before they're used.
Security
The OWASP Top 10 for LLM applications explained for developers: the ten ways AI apps get attacked, in plain language, and where to start.
Next step
Book a scoping call and talk it through with our team.