मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट35k · #7772

continuous-llm-red-teaming-with-promptfoo

यह क्या करती है

यह tool AI applications की सुरक्षा अपने आप टेस्ट करता है। यह attacks की नकल करता है ताकि कमज़ोरियाँ मिल सकें, जैसे सिस्टम को 'तोड़ने' या उसमें खतरनाक commands 'inject' करने की कोशिश। इससे application सुरक्षित बनी रहती है, यह पक्का होता है।

कब इस्तेमाल करें

  • ✓जब आप अपने continuous development system में AI application का नया version जोड़ते हैं।
  • ✓यह देखने के लिए कि हाल के बदलावों ने कोई नई security खामी तो नहीं डाल दी।
  • ✓मिली कमज़ोरियों को OWASP जैसे जाने-माने standards से जोड़ने वाली security reports बनाने के लिए।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/continuous-llm-red-teaming-with-promptfoo/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/continuous-llm-red-teaming-with-promptfoo/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे support chatbot को prompt injections और jailbreaks के खिलाफ सुरक्षा के लिए टेस्ट करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह tool Promptfoo और DeepTeam जैसे दूसरे tools का इस्तेमाल करके आपकी AI application पर attack tests बनाता और चलाता है। यह जाँचता है कि application सुरक्षित तरीके से जवाब देती है या नहीं, और कोई समस्या मिलने पर process को fail कर देता है।

तकनीकी सामग्री (मूल 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' और 'vulnerabilities' क्या हैं?

'Red teaming' का मतलब है कमज़ोरियाँ खोजने के लिए attacks की नकल करना। Vulnerabilities वही कमज़ोरियाँ हैं, जैसे application का गुप्त जानकारी दिखा देना या बिना अनुमति के commands चला देना।

'OWASP LLM Top 10' और 'MITRE ATLAS' क्या हैं?

ये reference lists हैं जिनमें AI applications पर होने वाले सबसे आम और खतरनाक attacks के प्रकार दर्ज हैं, ताकि टेस्ट सबसे ज़रूरी जोखिमों को कवर करें।

क्या इसे इस्तेमाल करने के लिए security expert होना ज़रूरी है?

नहीं, tool कई जटिल प्रक्रियाओं को अपने आप करने के लिए बनाया गया है, लेकिन application को टेस्ट करने की अनुमति होना ज़रूरी है।

जानकारी

लेखक का मूल विवरण

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.

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7772
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills