adriannoes/awesome-agentic-ai/continuous-llm-red-teaming-with-promptfoo
Claude Code and agent skill by adriannoes/awesome-agentic-ai
- community
Checking that the SKILL.md file is still in the repository.
Wire Promptfoo and DeepTeam into CI/CD for automated regression red-teaming of LLM apps against OWASP LLM Top 10 and OWASP Agentic presets, failing the build when jailbreak or injection vulnerabilities regress.
Install
npx vskill@latest install adriannoes/awesome-agentic-ai/continuous-llm-red-teaming-with-promptfooSKILL.md
Continuous LLM Red Teaming with Promptfoo
Authorized Use Only: Run these adversarial probes only against LLM applications and endpoints you own or are explicitly authorized to test. Generated attack payloads (jailbreaks, prompt injections, harmful-content elicitation) are adversarial inputs; sending them to third-party services without permission may violate terms of service.
Overview
Promptfoo is an open-source LLM evaluation and red-teaming framework (used by OpenAI and Anthropic per its README) that generates adversarial test cases, runs them against your model/agent, and grades the responses. DeepTeam (by Confident AI) is a complementary open-source framework offering 50+ ready-to-use vulnerabilities and 10+ research-backed attack methods. Together they let you treat LLM security as a regression test: every commit re-runs the same adversarial suite, and the pipeline fails when a previously-safe behavior regresses.
This matters because LLM applications change constantly — prompts, models, RAG sources, tools, and guardrails all drift. A jailbreak that was patched last sprint can silently return after a prompt edit or a model upgrade. Promptfoo maps its plugins directly onto the OWASP LLM Top 10 (owasp:llm) and OWASP Agentic (owasp:agentic) presets, and onto MITRE ATLAS, so the suite tracks recognized risk taxonomies. The core threat addressed here is AML.T0051 — LLM Prompt Injection (MITRE ATLAS): adversarial instructions that override the application's intended behavior. This skill follows the Promptfoo red-team docs (https://www.promptfoo.dev/docs/red-team/) and DeepTeam docs (https://www.trydeepteam.com/docs/getting-started), and aligns to NIST AI RMF MANAGE-4.1 (post-deployment monitoring and feedback to manage AI risk).
When to Use
- When you need continuous, automated red-teaming of an LLM app in CI/CD rather than one-off manual tests.
- When you want to enforce a security gate: block merges that introduce or reintroduce jailbreak/injection vulnerabilities.
- When mapping coverage to OWASP LLM Top 10 / OWASP Agentic / MITRE ATLAS for compliance reporting.
- When comparing the security posture of two models or prompt versions side by side.
- When tracking vulnerability regression over time across releases.
Prerequisites
- Node.js 18+ (Promptfoo is distributed via npm) and Python 3.9+ (for DeepTeam).
- Install Promptfoo and DeepTeam:
``bash npm install -g promptfoo # or: npx promptfoo@latest pip install -U deepteam ``
- API access/credentials for the target LLM endpoint (and a grader model, e.g. an OpenAI key) exposed as environment variables.
- A CI/CD platform (GitHub Actions, GitLab CI) with secret storage.
- Authorization to test the target application.
Objectives
- Scaffold a Promptfoo red-team config targeting your LLM app.
- Enable OWASP LLM Top 10 and OWASP Agentic plugin presets plus jailbreak/injection strategies.
- Run the suite locally and interpret the per-plugin pass/fail report.
- Add DeepTeam as a second engine for programmatic, research-backed attacks.
- Integrate both into CI/CD so builds fail on new vulnerabilities.
- Generate shareable HTML/PDF security reports per run.
MITRE ATT&CK Mapping
| ID | Name (MITRE ATLAS) | Tactic | |
|---|---|---|---|
| AML.T0051 | LLM Prompt Injection | Initial Access / Persistence (LLM) | |
| AML.T0051.000 | Direct (Prompt Injection) | LLM Attack | |
| AML.T0051.001 | Indirect (Prompt Injection) | LLM Attack | |
| AML.T0054 | LLM Jailbreak | Privilege Escalation / Defense Evasion (LLM) |
Workflow
1. Scaffold the red-team configuration
Initialize an interactive config; it writes promptfooconfig.yaml where targets, plugins, and strategies live.
2. Define targets, OWASP presets, and attack strategies
Edit promptfooconfig.yaml. The purpose grounds attack generation; plugins are adversarial input generators; strategies are delivery techniques (jailbreak/injection wrappers).
3. Run the suite and view the report
redteam run combines generation + evaluation; then open the interactive report.
Each row shows the plugin (mapped to OWASP/ATLAS), the strategy, the attack prompt, the model's response, and the grader's verdict. The attack success rate per plugin is your headline metric — track it per release.
4. Add DeepTeam for programmatic, research-backed attacks
Use DeepTeam to cover additional vulnerabilities/attacks and to script bespoke suites in Python.
DeepTeam can also be driven from a YAML config:
5. Gate the build in CI/CD (GitHub Actions)
Fail the pipeline when red-team assertions fail. Promptfoo returns a non-zero exit code on failures, which blocks the merge.
6. Track regressions over time
Persist results.json per run and compare attack-success-rate per plugin between releases. A rising rate for any OWASP LLM category is a regression to triage before release. Promptfoo's --filter-failing lets you re-run only previously failing cases to confirm a fix.
Tools and Resources
| Resource | Link | |
|---|---|---|
| Promptfoo red-team docs | https://www.promptfoo.dev/docs/red-team/ | |
| Promptfoo red-team configuration | https://www.promptfoo.dev/docs/red-team/configuration/ | |
| Promptfoo CI/CD integration | https://www.promptfoo.dev/docs/integrations/ci-cd/ | |
| Promptfoo MITRE ATLAS mapping | https://www.promptfoo.dev/docs/red-team/mitre-atlas/ | |
| DeepTeam (Confident AI) | https://github.com/confident-ai/deepteam | |
| DeepTeam docs | https://www.trydeepteam.com/docs/getting-started | |
| OWASP Top 10 for LLM Applications | https://genai.owasp.org/ |
Plugin / Strategy Reference
| Promptfoo item | Type | Maps to | |
|---|---|---|---|
owasp:llm | preset | OWASP LLM Top 10 suite | |
owasp:agentic | preset | OWASP Agentic threats | |
prompt-extraction | plugin | LLM07 system-prompt leakage | |
pii:direct | plugin | LLM06 sensitive-info disclosure | |
harmful | plugin | harmful content generation | |
jailbreak / jailbreak:composite | strategy | AML.T0054 LLM jailbreak | |
crescendo | strategy | multi-turn jailbreak | |
prompt-injection | strategy | AML.T0051 prompt injection |
Validation Criteria
- [ ]
promptfooconfig.yamlcreated with target,owasp:llm, andowasp:agenticplugins. - [ ] Jailbreak and prompt-injection strategies enabled.
- [ ]
promptfoo redteam runexecutes and produces a per-plugin pass/fail report. - [ ] DeepTeam suite runs against the same target via
model_callback. - [ ] CI/CD job fails the build on new red-team failures (non-zero exit).
- [ ]
results.jsonartifact archived per run for regression tracking. - [ ] Attack-success-rate per OWASP category trended across releases.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcursor-claude-codex/skills/anthropic-cybersecurity-skills/skills/continuous-llm-red-teaming-with-promptfoo/SKILL.md
Popularity
- Repository stars
- 63
- Repository forks
- 18
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/adriannoes/awesome-agentic-ai/continuous-llm-red-teaming-with-promptfoo)