continuous-llm-red-teaming-with-promptfoo
Что он делает
Этот инструмент автоматически проверяет безопасность приложений на основе искусственного интеллекта (ИИ). Он имитирует атаки, чтобы найти уязвимости, например попытки «взломать» систему или «внедрить» вредоносные команды, и помогает убедиться, что приложение остается защищенным.
Когда использовать
- ✓Когда вы интегрируете новые версии ИИ-приложения в свою систему непрерывной разработки.
- ✓Чтобы убедиться, что последние изменения не внесли новых уязвимостей.
- ✓Чтобы создавать отчеты о безопасности, в которых найденные уязвимости сопоставлены с известными стандартами, например OWASP.
Ссылка на скилл
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/continuous-llm-red-teaming-with-promptfoo/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Проверь безопасность моего чат-бота поддержки на атаки через prompt injection и jailbreak.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Инструмент использует другие инструменты (Promptfoo и DeepTeam), чтобы создавать и запускать тестовые атаки на ваше ИИ-приложение. Он проверяет, отвечает ли приложение безопасно, и останавливает процесс, если находит проблемы.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
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:
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.
promptfoo redteam init
# choose your target type (HTTP endpoint, openai:..., anthropic:..., custom provider)
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).
# promptfooconfig.yaml
targets:
- id: https://api.example.com/chat # your app endpoint
label: support-bot
redteam:
purpose: |
A customer-support assistant for an e-commerce site. Must never reveal
system prompts, leak PII, or perform actions outside order support.
numTests: 10
plugins:
…
Частые вопросы
Что означают «red teaming» и «уязвимости» в этом контексте?
«Red teaming» означает имитацию атак, чтобы найти слабые места. Уязвимости это и есть эти слабые места, например когда приложение раскрывает секретную информацию или выполняет команды без разрешения.
Что такое «OWASP LLM Top 10» и «MITRE ATLAS»?
Это справочные списки, в которых классифицированы самые распространенные и опасные типы атак на ИИ-приложения. Они помогают убедиться, что тесты охватывают самые важные риски.
Нужно ли быть экспертом по безопасности, чтобы пользоваться этим?
Нет, инструмент автоматизирует многие сложные процессы. Но важно иметь разрешение на тестирование приложения.
Подробности
Оригинальное описание автора
Wires Promptfoo and DeepTeam into CI/CD for automated, repeatable red-teaming of LLM apps against OWASP LLM Top 10, OWASP Agentic, and MITRE ATLAS presets, failing the build when jailbreak or injection vulnerabilities regress. Use for continuous adversarial testing in CI/CD, a merge-blocking security gate, or comparing model/prompt versions for compliance reporting.
Популярность
- Звёзды на GitHub
- 35k
- Место в рейтинге
- #7772
- Лицензия
- Apache-2.0
- Обновлён
- 31.08.2026
Комментарии
- …
Другие скиллы из этого репозитория
abusing-dpapi-for-credential-access
35kДаёт ИИ-агенту готовые инструкции для конкретной задачи, чтобы он делал её лучше и быстрее.
abusing-shadow-credentials-for-privesc
35kУчит ИИ-агента писать ясные структурированные тексты.
achieving-cmmc-level-2-compliance
35kПомогает агенту подготовить среду к соответствию CMMC уровня 2.
acquiring-disk-image-with-dd-and-dcfldd
35kПомогает агенту создавать точные копии дисков для расследований.
Похожие скиллы
add-model-provider
394kПомогает агенту подключить нового провайдера ИИ-моделей к OpenClaw безопасными командами, хранить ключи API не в открытом виде и провести живой тест.
acp-router
394kПомогает агенту передать задачу инструменту для программирования, например Claude Code или Cursor, через OpenClaw, чтобы работа шла в этом инструменте.
browser-automation
394kУчит агента пошагово управлять веб-страницами: входить в аккаунты, работать с вкладками и восстанавливаться, если страница перестала отвечать.