LLM security testing tools — garak, Promptfoo, and PyRIT
A practical tour of the field's most-used open-source LLM red-teaming tools and which one to reach for first, depending on the job.
LLM security testing tools — garak, Promptfoo, and PyRIT
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
What you'll learn
- garak scans a model broadly against a library of known probe categories, which makes it a good first pass for finding out what a model is already vulnerable to.
- Promptfoo is built for developers who need red-teaming wired into a normal CI pipeline, turning a security scan into a report that runs on every change like a test suite.
- PyRIT is an orchestration framework more than a fixed scanner — it gives you building blocks for composing custom, multi-step automated attack strategies.
- These tools automate the known-pattern sweep that this roadmap's automated-testing lesson describes; they are not a replacement for manual testing's depth.
Automation needs software, and the field has converged on a few
The previous lesson in this group made the case that automated testing matters because it gives you breadth and repeatability that manual testing cannot. That case only holds up if the tooling actually exists and is good. It does — AI red teaming has produced a small set of open-source tools that most practitioners reach for, each with a distinct niche. Knowing which one fits a given job is itself a practical skill, and it’s the subject of this lesson.
garak: broad vulnerability scanning
garak, maintained by NVIDIA, is built around the same basic idea as a conventional vulnerability scanner, just retargeted at language models. It organizes known attack and failure categories into “probes” — prompt injection, jailbreak patterns, data leakage, toxic output generation, and more — runs a target model through each one, and uses a “detector” to judge whether the model’s response counts as a failure for that category. The output is a report that tells you, across a wide spread of known issue categories, where a given model currently stands. This makes garak a strong default for the first question any engagement asks: before doing anything custom, what does this model already fail at that is already well understood in the field? Because its probe library is broad rather than deep on any one category, garak is better suited to a wide first pass than to exhaustively stress-testing one specific weakness.
Promptfoo: red teaming that lives in CI
Promptfoo takes a different angle, aimed squarely at developers building LLM applications who want security testing to behave like the rest of their test suite. It’s a CLI tool that can run both evaluation (does the model give good answers) and red-teaming (does the model resist known attacks) as part of a normal development workflow — install it, point it at your application’s prompts and configuration, run a scan, and get a report that’s designed to be read by a developer, not just a security specialist. Its real value is in where it sits: because it’s built to be CI-integrated, a team can catch a regression — a prompt change that reopens an old jailbreak, or a new feature that introduces a fresh injection surface — automatically on every pull request, the same way a team already catches a broken unit test. That makes Promptfoo the natural fit when the goal is ongoing, low-friction testing baked into how an application is normally built and shipped, rather than a standalone security engagement.
PyRIT: a framework for building your own attacks
PyRIT, Microsoft’s open-source Python Risk Identification Toolkit, is not a fixed scanner with a built-in probe library in the way garak is — it’s an orchestration framework that gives you composable building blocks: prompt converters (for encoding or rephrasing an attack), attack strategies (single-turn, multi-turn, iterative refinement), targets (the model or system under test), and scoring logic for judging success. The tradeoff for that flexibility is that PyRIT expects you to assemble a strategy rather than run a single command and get a report. This makes it the right tool reach for when the previous two don’t fit the job — when a red teamer wants to compose a custom, multi-step automated attack, such as an adaptive jailbreak that uses one model to iteratively refine prompts against another, or a strategy chaining several of the techniques covered earlier in this roadmap together in a way no off-the-shelf probe library anticipated.
Picking a starting point
A reasonable rule of thumb: reach for garak first when you want a broad read on known weaknesses with minimal setup, reach for Promptfoo when the goal is wiring red-teaming into a real development pipeline so regressions get caught automatically, and reach for PyRIT when the attack you actually need doesn’t exist yet in a prebuilt library and has to be composed from primitives. None of the three replaces manual testing’s capacity to find something genuinely new — they automate exactly the known-pattern sweep the previous lesson described, at different points in a team’s workflow.
Check yourself
If you want a fast, broad first read on what categories of vulnerability a model already has, which tool fits best and why?
Garak, because it is built as a vulnerability scanner that runs a model through a wide library of known probe categories and reports which ones succeed, similar in spirit to a general-purpose vulnerability scanner for a web application.
Why would a development team choose Promptfoo specifically over the other two tools?
Promptfoo is designed to fit into a normal CI pipeline, so a team can run an LLM security and eval check automatically on every change and get a readable report, rather than running a one-off manual scan.
What makes PyRIT different in kind from garak, rather than just a competing scanner?
PyRIT is an orchestration framework for composing custom automated attack strategies out of reusable building blocks, so it is suited to building a bespoke, multi-step attack rather than running one fixed, predefined set of probes the way garak does out of the box.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.