DeepTeam is a framework to red team LLMs and AI agents.
Added frameworks
penguinebfc952eae949
diff --git a/deepteam/attacks/multi_turn/constants.py b/deepteam/attacks/multi_turn/constants.pyindex d016665d..f587b8fd 100644--- a/deepteam/attacks/multi_turn/constants.py+++ b/deepteam/attacks/multi_turn/constants.py@@ -1,4 +1,5 @@from typing import Dict+from dataclasses import dataclassfrom .base_multi_turn_attack import BaseMultiTurnAttackfrom .crescendo_jailbreaking import CrescendoJailbreaking@@ -21,3 +22,19 @@ MULTI_TURN_ATTACK_CLASSES_MAP: Dict[str, BaseMultiTurnAttack] = {MULTI_TURN_ATTACK_NAMES = sorted(v.name for v in MULTI_TURN_ATTACK_CLASSES_MAP.values())+++@dataclass+class AttackInfo:+ description: str+ exploitability: str+++# Map attack names to their description and exploitability+MULTI_TURN_ATTACK_INFO_MAP: Dict[str, AttackInfo] = {+ name: AttackInfo(+ description=attack_class.description,+ exploitability=attack_class.exploitability.value,+ )+ for name, attack_class in MULTI_TURN_ATTACK_CLASSES_MAP.items()+}diff --git a/deepteam/attacks/single_turn/constants.py b/deepteam/attacks/single_turn/constants.pyindex b7605316..69e2242d 100644--- a/deepteam/attacks/single_turn/constants.py+++ b/deepteam/attacks/single_turn/constants.py@@ -1,4 +1,5 @@from typing import Dict+from dataclasses import dataclassfrom .base_single_turn_attack import BaseSingleTurnAttackfrom .base64 import Base64@@ -45,3 +46,19 @@ SINGLE_TURN_ATTACK_CLASSES_MAP: Dict[str, BaseSingleTurnAttack] = {SINGLE_TURN_ATTACK_NAMES = sorted(v.name for v in SINGLE_TURN_ATTACK_CLASSES_MAP.values())+++@dataclass+class AttackInfo:+ description: str+ exploitability: str+++# Map attack names to their description and exploitability+SINGLE_TURN_ATTACK_INFO_MAP: Dict[str, AttackInfo] = {+ name: AttackInfo(+ description=attack_class.description,+ exploitability=attack_class.exploitability.value,+ )+ for name, attack_class in SINGLE_TURN_ATTACK_CLASSES_MAP.items()+}diff --git a/deepteam/frameworks/aegis/aegis.py b/deepteam/frameworks/aegis/aegis.pyindex d13f0c27..a35b4710 100644--- a/deepteam/frameworks/aegis/aegis.py+++ b/deepteam/frameworks/aegis/aegis.py@@ -12,16 +12,40 @@ from deepteam.test_case import RTTestCasefrom deepteam.metrics import HarmMetric"""-Aegis Content Safety Framework Mapping-======================================--This framework evaluates models using the NVIDIA Aegis (Nemotron) Content Safety Dataset,-mapping 13 safety-critical harm categories to sampled adversarial user messages.+NVIDIA Aegis AI Content Safety Dataset Framework+=================================================++The Aegis framework integrates the NVIDIA Aegis AI Content Safety Dataset — an open-source+dataset aligned with NVIDIA's Content Safety Taxonomy across 13 critical harm categories.+Aegis enables DeepTeam to perform dataset-driven red teaming using real human-labeled+safety violations to validate model robustness against harmful or unsafe user inputs.++Aegis focuses on real-world unsafe content from public conversations. This allows+evaluation of model refusal behaviors and fine-tuning of safety filters using authentic,+labeled harm categories.++The dataset covers 13 harm domains:+- sexual_content+- violence+- hate_speech+- self_harm+- misinformation+- privacy_violation+- child_exploitation+- drugs+- terrorism+- and more++How it works:+1. Loads the Aegis dataset from Hugging Face+2. Filters unsafe samples labeled under NVIDIA's harm taxonomy+3. Randomly samples num_attacks test cases+4. Evaluates how well the model identifies, refuses, or mitigates these harmful promptsEach test case includes:-- Input: Real harmful user messages from the Aegis dataset.-- Vulnerability: Labeled harm category indicating expected safety violation.-- Metric: Harm scoring using the evaluation model.+- Input: Real harmful user messages from public conversations (Aegis dataset)+- Vulnerability: Labeled harm category indicating expected safety violation+- Metric: Harm scoring using the evaluation modelReference: https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-1.0"""@@ -30,6 +54,7 @@ Reference: https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataseclass Aegis(AISafetyFramework):_DATASET = "nvidia/Aegis-AI-Content-Safety-Dataset-1.0"name = "Aegis"+ description = "A dataset-driven safety framework that uses the NVIDIA Aegis AI Content Safety Dataset — an open-source dataset aligned with NVIDIA's Content Safety Taxonomy. Tests models using real human-labeled safety violations from public conversations across 13 critical harm categories including sexual content, violence, hate speech, self-harm, misinformation, privacy violations, child exploitation, drugs, and terrorism. Enables evaluation of model refusal behaviors and fine-tuning of safety filters using authentic, labeled harm categories."def __init__(self,@@ -38,8 +63,6 @@ class Aegis(AISafetyFramework):verbose_mode: bool = False,evaluation_model: Optional[Union[str, DeepEvalBaseLLM]] = "gpt-4o",):- self.name = "Aegis"- self.description = "Nemotron Content Safety Dataset V1, formerly known as Aegis AI Content Safety Dataset, is an open-source content safety dataset (CC-BY-4.0), which adheres to Nvidia's content safety taxonomy, covering 13 critical risk categories"self.num_attacks = num_attacksself.async_mode = async_modeself.verbose_mode = verbose_mode@@ -151,4 +174,4 @@ class Aegis(AISafetyFramework):)def get_name(self):- return "Aegis"+ return self.namediff --git a/deepteam/frameworks/beavertails/beavertails.py b/deepteam/frameworks/beavertails/beavertails.pyindex b912c18e..ec10f539 100644--- a/deepteam/frameworks/beavertails/beavertails.py+++ b/deepteam/frameworks/beavertails/beavertails.py@@ -12,17 +12,44 @@ from deepteam.test_case import RTTestCasefrom deepteam.metrics import HarmMetric"""-BeaverTails Safety Framework Mapping-====================================--This framework evaluates model safety using the BeaverTails dataset, a human-labeled-collection of unsafe QA pairs across 14 harm categories. It samples harmful prompts-and maps them to corresponding vulnerability categories.+BeaverTails Dataset-Driven Safety Framework+============================================++The BeaverTails framework integrates the BeaverTails dataset — a large, human-labeled+collection of harmful and borderline prompts — to enable dataset-driven red teaming+against real-world adversarial inputs. BeaverTails is designed to surface safety failures+across a wide range of harm categories (abuse, illegal instructions, privacy violations,+self-harm, sexual content, misinformation, and more) by testing how models respond to+actual annotated malicious prompts.++BeaverTails focuses on sampling real harmful prompts from a curated dataset rather than+synthetic generation. This provides higher-fidelity signals for model behavior in the wild+and helps validate safety defenses, content filters, and ingestion pipelines.++The dataset includes 14 harm subcategories:+- animal_abuse+- child_abuse+- discrimination / hate_speech+- drug_abuse, weapons+- financial_crime+- misinformation+- privacy_violation+- self_harm+- sexually_explicit+- terrorism+- violence+- and more++How it works:+1. Loads the dataset using Hugging Face's datasets with the specified BeaverTails split+2. Filters out unsafe test cases to focus only on potentially harmful attacks+3. Randomly samples num_attacks prompts+4. Evaluates if the model appropriately refuses and handles the harmful attacks from datasetEach test case includes:-- Input: Unsafe user prompts from BeaverTails.-- Vulnerability: One or more harm categories assigned in the dataset.-- Metric: Harm scoring using the selected evaluation model.+- Input: Real unsafe user prompts from BeaverTails dataset+- Vulnerability: One or more harm categories assigned in the dataset+- Metric: Harm scoring using the selected evaluation modelReference: https://huggingface.co/datasets/PKU-Alignment/BeaverTails"""@@ -31,6 +58,7 @@ Reference: https://huggingface.co/datasets/PKU-Alignment/BeaverTailsclass BeaverTails(AISafetyFramework):_DATASET = "PKU-Alignment/BeaverTails"name = "BeaverTails"+ description = "A dataset-driven safety framework that uses the BeaverTails dataset — a large, human-labeled collection of harmful and borderline prompts. Tests models against real-world adversarial inputs across 14 harm categories including abuse, illegal instructions, privacy violations, self-harm, sexual content, and misinformation. Provides higher-fidelity signals by sampling actual annotated malicious prompts rather than synthetic generation, helping validate safety defenses and content filters."def __init__(self,@@ -40,8 +68,6 @@ class BeaverTails(AISafetyFramework):verbose_mode: bool = False,evaluation_model: Optional[Union[str, DeepEvalBaseLLM]] = "gpt-4o",):- self.name = "BeaverTails"- self.description = "BeaverTails is an AI safety-focused collection comprising a series of datasets, it contains human-labeled data consisting of question-answer (QA) pairs from 14 different harm categories."self.num_attacks = num_attacksself.async_mode = async_modeself.verbose_mode = verbose_mode@@ -156,4 +182,4 @@ class BeaverTails(AISafetyFramework):)def get_name(self):- return "BeaverTails"+ return self.namediff --git a/deepteam/frameworks/frameworks.py b/deepteam/frameworks/frameworks.pyindex 04beed14..0bf68459 100644--- a/deepteam/frameworks/frameworks.py+++ b/deepteam/frameworks/frameworks.py@@ -1,12 +1,9 @@-from pydantic import BaseModelfrom typing import List, Optional--from deepeval.models import DeepEvalBaseLLM+from dataclasses import dataclassfrom deepteam.vulnerabilities import (BaseVulnerability,)-from dataclasses import dataclassfrom deepteam.attacks import BaseAttackdiff --git a/deepteam/frameworks/mitre/mitre.py b/deepteam/frameworks/mitre/mitre.pyindex 533eda0e..280f9ea0 100644--- a/deepteam/frameworks/mitre/mitre.py+++ b/deepteam/frameworks/mitre/mitre.py@@ -3,22 +3,40 @@ from deepteam.frameworks import AISafetyFrameworkfrom deepteam.frameworks.mitre.risk_categories import MITRE_CATEGORIES"""-MITRE ATT&CK Framework Mapping for LLMs 2025-===========================================+MITRE ATLAS™ (Adversarial Threat Landscape for Artificial-Intelligence Systems)+================================================================================-This framework maps MITRE ATT&CK tactics and techniques to LLM-specific threats and vulnerabilities.-It includes red-teaming attack methods and corresponding weaknesses tied to each MITRE category.+The MITRE ATLAS™ framework provides a structured knowledge base of adversarial tactics, techniques,+and procedures (TTPs) used against AI and ML systems. It extends the principles of MITRE ATT&CK®+to the AI threat surface, identifying how adversaries can manipulate, exploit, or misuse AI models+throughout their lifecycle.++DeepTeam's MITRE ATLAS module implements these adversarial mappings to test AI and LLM applications+for security, privacy, and robustness vulnerabilities across each phase of the AI attack lifecycle.++The framework is organized into six adversarial tactics:+1. Reconnaissance (AML.TA0002): Gathering intelligence about AI systems and configurations+2. Resource Development (AML.TA0003): Acquiring resources or tools to enable future attacks+3. Initial Access (AML.TA0004): Gaining entry to the target AI system or environment+4. ML Attack Staging (AML.TA0001): Preparing, training, or adapting attacks specifically for AI models+5. Exfiltration (AML.TA0010): Stealing sensitive information, model data, or internal configurations+6. Impact (AML.TA0011): Manipulating or degrading AI systems to achieve adversarial goals++Each tactic represents a goal an adversary may have while attacking an AI system. These tactics+collectively map the "why" behind adversarial actions and correspond to different testing modules+in DeepTeam.Each category includes:-- Attacks: Techniques for exploiting, bypassing, or manipulating LLM systems.-- Vulnerabilities: Weaknesses that can be leveraged by attackers in LLM models.+- Attacks: Realistic adversarial techniques for exploiting, bypassing, or manipulating AI systems+- Vulnerabilities: AI-specific weaknesses that can be leveraged throughout the attack lifecycleReference: https://attack.mitre.org"""class MITRE(AISafetyFramework):- name = "MITRE"+ name = "MITRE ATLAS"+ description = "A structured knowledge base of adversarial tactics, techniques, and procedures (TTPs) used against AI and ML systems. Extends MITRE ATT&CK® principles to the AI threat surface, testing across six adversarial tactics: reconnaissance (information gathering), resource development (capability building), initial access (entry point exploitation), ML attack staging (model-specific preparation), exfiltration (data/model theft), and impact (manipulation/degradation)."ALLOWED_TYPES = ["reconnaissance","resource_development",@@ -48,8 +66,6 @@ class MITRE(AISafetyFramework):"impact",],):- self.name = "MITRE ATLAS"- self.description = "MITRE ATLAS mapping for LLM/ML adversarial techniques (project-specific) to understand and defend against threats specific to AI and ML systems."self.categories = categoriesself.risk_categories = []self.vulnerabilities = []@@ -62,4 +78,4 @@ class MITRE(AISafetyFramework):self.attacks.extend(risk_category.attacks)def get_name(self):- return "MITRE ATLAS"+ return self.namediff --git a/deepteam/frameworks/mitre/risk_categories.py b/deepteam/frameworks/mitre/risk_categories.pyindex 3ea34230..499475f3 100644--- a/deepteam/frameworks/mitre/risk_categories.py+++ b/deepteam/frameworks/mitre/risk_categories.py@@ -34,6 +34,8 @@ from deepteam.attacks.multi_turn import (MITRE_CATEGORIES = [RiskCategory(name="reconnaissance",+ _display_name="Reconnaissance — Information Gathering and System Profiling",+ description="The adversary is trying to gather information about the AI system they can use to plan future operations.",attacks=[Roleplay(weight=3,@@ -79,6 +81,8 @@ MITRE_CATEGORIES = [),RiskCategory(name="resource_development",+ _display_name="Resource Development — Adversarial Capability Building",+ description="The adversary is creating or acquiring resources (data, prompts, tools, accounts) to enable future AI attacks.",attacks=[Roleplay(weight=2,@@ -124,6 +128,8 @@ MITRE_CATEGORIES = [),RiskCategory(name="initial_access",+ _display_name="Initial Access — Entry Point Exploitation",+ description="The adversary is trying to gain access to the AI system.",attacks=[Roleplay(weight=2,@@ -169,6 +175,8 @@ MITRE_CATEGORIES = [),RiskCategory(name="ml_attack_staging",+ _display_name="ML Attack Staging — Model-Specific Attack Preparation",+ description="The adversary is leveraging their knowledge of and access to the target system to tailor the attack.",attacks=[PromptInjection(weight=2),Leetspeak(weight=1),@@ -201,6 +209,8 @@ MITRE_CATEGORIES = [),RiskCategory(name="exfiltration",+ _display_name="Exfiltration — Data or Model Theft",+ description="The adversary is trying to steal AI artifacts or other sensitive information.",attacks=[Roleplay(weight=2,@@ -272,6 +282,8 @@ MITRE_CATEGORIES = [),RiskCategory(name="impact",+ _display_name="Impact — Manipulation, Misuse, and Degradation",+ description="The adversary is trying to manipulate, interrupt, or degrade AI system performance or trustworthiness.",attacks=[Roleplay(weight=3,diff --git a/deepteam/frameworks/nist/nist.py b/deepteam/frameworks/nist/nist.pyindex 36a986a6..7e02c8cf 100644--- a/deepteam/frameworks/nist/nist.py+++ b/deepteam/frameworks/nist/nist.py@@ -5,22 +5,34 @@ from deepteam.attacks import BaseAttackfrom deepteam.frameworks.nist.risk_categories import NIST_CATEGORIES"""-NIST Cybersecurity Framework Mapping for LLMs 2025-==================================================+NIST AI Risk Management Framework (AI RMF) 1.0+===============================================-This framework maps NIST Cybersecurity Framework risk categories to LLM-specific threats and vulnerabilities.-It includes realistic attack techniques and weaknesses tied to each category.+The NIST AI Risk Management Framework (AI RMF) is a structured methodology from the U.S. National+Institute of Standards and Technology that guides organizations in identifying, evaluating, and+mitigating risks in artificial intelligence systems. It promotes trustworthy AI by focusing on+governance, measurement, and continuous risk tracking across the AI lifecycle.++DeepTeam's implementation focuses on the Measure function (M.1-M.4) — the part of the framework+responsible for testing, evaluation, and assurance of AI behavior and risk controls.++The framework is divided into four measurement categories:+- Measure 1 (M.1): Risk measurement and metrics - Define and apply appropriate testing and metrics for AI risk evaluation+- Measure 2 (M.2): Trustworthiness and safety evaluation - Evaluate AI systems for trustworthiness, safety, security, fairness, and misuse potential+- Measure 3 (M.3): Risk tracking and monitoring - Establish mechanisms for identifying, tracking, and managing emerging risks+- Measure 4 (M.4): Impact and transparency assessment - Measure and correlate AI risk impacts with business and performance outcomesEach category includes:-- Attacks: Techniques for exploiting or bypassing LLM security.-- Vulnerabilities: Weaknesses that can be exploited in LLM systems.+- Attacks: Techniques for testing AI system resilience and detecting vulnerabilities+- Vulnerabilities: Weaknesses that can be exploited in AI systemsReference: https://www.nist.gov/itl/ai-risk-management-framework"""class NIST(AISafetyFramework):- name = "NIST"+ name = "NIST AI Risk Management Framework (AI RMF)"+ description = "A structured methodology from NIST for identifying, evaluating, and mitigating risks in AI systems. Confident AI's implementation focuses on the Measure function - testing, evaluation, and assurance of AI behavior and risk controls across four measurement categories (M.1-M.4) covering risk metrics, trustworthiness evaluation, risk tracking, and impact assessment."ALLOWED_TYPES = ["measure_1", "measure_2", "measure_3", "measure_4"]def __init__(@@ -29,8 +41,6 @@ class NIST(AISafetyFramework):Literal["measure_1", "measure_2", "measure_3", "measure_4"]] = ["measure_1", "measure_2", "measure_3", "measure_4"],):- self.name = "NIST AI RMF"- self.description = "NIST AI Risk Management Framework (AI RMF) — Measure-focused mapping for testing and evaluation."self.categories = categoriesself.risk_categories = []self.vulnerabilities = []@@ -43,4 +53,4 @@ class NIST(AISafetyFramework):self.attacks.extend(risk_category.attacks)def get_name(self):- return "NIST AI RMF"+ return self.namediff --git a/deepteam/frameworks/nist/risk_categories.py b/deepteam/frameworks/nist/risk_categories.pyindex 45b04812..63849acf 100644--- a/deepteam/frameworks/nist/risk_categories.py+++ b/deepteam/frameworks/nist/risk_categories.py@@ -45,6 +45,8 @@ from deepteam.attacks.multi_turn import (NIST_CATEGORIES = [RiskCategory(name="measure_1",+ _display_name="Measure 1 — Risk Measurement and Metrics",+ description="Identify, apply, and continuously improve appropriate methods and metrics for assessing AI risks.",attacks=[Roleplay(weight=2,@@ -81,6 +83,8 @@ NIST_CATEGORIES = [),RiskCategory(name="measure_2",+ _display_name="Measure 2 — Trustworthiness and Safety Evaluation",+ description="Evaluate and validate AI systems for trustworthy characteristics such as safety, fairness, security, robustness, privacy, and reliability — under real-world conditions.",attacks=[PromptInjection(weight=3),CrescendoJailbreaking(weight=2),@@ -204,6 +208,8 @@ NIST_CATEGORIES = [),RiskCategory(name="measure_3",+ _display_name="Measure 3 — Risk Tracking and Monitoring",+ description="Establish continuous monitoring mechanisms to track identified, unanticipated, and emerging AI risks throughout system operation.",attacks=[PromptProbing(weight=3),PromptInjection(weight=2),@@ -241,6 +247,8 @@ NIST_CATEGORIES = [),RiskCategory(name="measure_4",+ _display_name="Measure 4 — Impact and Transparency Assessment",+ description="Connect AI risk measurements to business outcomes, stakeholder transparency, and lifecycle performance.",attacks=[BadLikertJudge(weight=2),PromptProbing(weight=2),diff --git a/deepteam/frameworks/owasp/owasp.py b/deepteam/frameworks/owasp/owasp.pyindex f8c8140f..3ac04379 100644--- a/deepteam/frameworks/owasp/owasp.py+++ b/deepteam/frameworks/owasp/owasp.py@@ -7,22 +7,41 @@ from deepteam.attacks import BaseAttackfrom deepteam.frameworks.owasp.risk_categories import OWASP_CATEGORIES"""-OWASP Top 10 for LLMs 2025 Framework Mapping-============================================+OWASP Top 10 for Large Language Models (LLMs) 2025+===================================================-This framework defines the 10 OWASP LLM risk categories as DeepTeam `RiskCategory`-objects, mapping realistic red-teaming attacks and corresponding vulnerabilities.+The OWASP Top 10 for Large Language Models is a comprehensive list of the most critical+security risks associated with LLM applications. This resource is designed to help+developers, security professionals, and organizations identify, understand, and mitigate+vulnerabilities in LLM systems, ensuring safer and more robust deployments in real-world+applications.++The 2025 edition reflects significant evolution in the LLM threat landscape, with new+risks emerging from RAG systems, autonomous AI agents, and sophisticated attack methods.++The 10 critical risks are:+1. LLM01 - Prompt Injection: Manipulating LLM inputs to override instructions+2. LLM02 - Sensitive Information Disclosure: Unintended exposure of private data+3. LLM03 - Supply Chain: Compromised third-party components, models, or plugins+4. LLM04 - Data and Model Poisoning: Manipulation of training or fine-tuning data+5. LLM05 - Improper Output Handling: Inadequate validation of LLM outputs+6. LLM06 - Excessive Agency: Too much autonomy or permissions granted to LLMs+7. LLM07 - System Prompt Leakage: Exposure of internal prompts and credentials (NEW 2025)+8. LLM08 - Vector and Embedding Weaknesses: RAG and vector database vulnerabilities (NEW 2025)+9. LLM09 - Misinformation: False information and hallucinations+10. LLM10 - Unbounded Consumption: Uncontrolled resource usageEach category includes:-- Attacks: techniques for prompting, probing, or jailbreaking.-- Vulnerabilities: typed or custom definitions capturing observable weaknesses.+- Attacks: Realistic red-teaming techniques for prompting, probing, or jailbreaking+- Vulnerabilities: Typed definitions capturing observable weaknesses and security flawsReference: https://genai.owasp.org/llm-top-10/"""class OWASPTop10(AISafetyFramework):- name: str = "OWASP"+ name = "OWASP Top 10 for LLMs 2025"+ description = "A comprehensive list of the most critical security risks associated with LLM applications. The 2025 edition includes 10 critical risks covering prompt injection, sensitive information disclosure, supply chain vulnerabilities, data poisoning, output handling, excessive agency, system prompt leakage, vector/embedding weaknesses, misinformation, and unbounded consumption. Each risk is tested using realistic attack techniques and vulnerability assessments."ALLOWED_TYPES = ["LLM_01","LLM_02",@@ -64,8 +83,6 @@ class OWASPTop10(AISafetyFramework):"LLM_10",],):- self.name = "OWASP"- self.description = "The OWASP Top 10 for LLMs 2025"self.categories = categoriesself.risk_categories = []self.vulnerabilities = []@@ -78,4 +95,4 @@ class OWASPTop10(AISafetyFramework):self.attacks.extend(risk_category.attacks)def get_name(self):- return "OWASP"+ return self.namediff --git a/deepteam/frameworks/owasp/risk_categories.py b/deepteam/frameworks/owasp/risk_categories.pyindex 0e339c45..f2f05d87 100644--- a/deepteam/frameworks/owasp/risk_categories.py+++ b/deepteam/frameworks/owasp/risk_categories.py@@ -46,6 +46,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 1. Prompt InjectionRiskCategory(name="LLM_01",+ _display_name="LLM01:2025 Prompt Injection",+ description="Attackers manipulate LLM inputs to override original instructions, extract sensitive information, or trigger unintended behaviors through direct manipulation or indirect injection via external content.",attacks=[PromptInjection(weight=3),Base64(weight=2),@@ -78,6 +80,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 2. Sensitive Information DisclosureRiskCategory(name="LLM_02",+ _display_name="LLM02:2025 Sensitive Information Disclosure",+ description="Unintended exposure of private data, credentials, API keys, or confidential information through LLM outputs, including PII leakage, system prompts, intellectual property, and authentication data.",attacks=[PromptInjection(weight=2),PromptProbing(weight=2),@@ -122,6 +126,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 3. Supply ChainRiskCategory(name="LLM_03",+ _display_name="LLM03:2025 Supply Chain",+ description="Vulnerabilities arising from compromised third-party components, models, datasets, or plugins used in LLM applications, including model dependencies, data sources, library dependencies, and plugin ecosystems.",attacks=[GrayBox(weight=2),SequentialJailbreak(weight=2),@@ -152,6 +158,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 4. Data and Model PoisoningRiskCategory(name="LLM_04",+ _display_name="LLM04:2025 Data and Model Poisoning",+ description="Manipulating training data, fine-tuning processes, or embedding data to introduce vulnerabilities, biases, or backdoors through training data poisoning, fine-tuning poisoning, RAG poisoning, or embedding poisoning.",attacks=[Roleplay(weight=2,@@ -184,6 +192,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 5. Improper Output HandlingRiskCategory(name="LLM_05",+ _display_name="LLM05:2025 Improper Output Handling",+ description="LLM outputs are not adequately validated, sanitized, or secured before being passed to downstream systems, leading to code injection, XSS attacks, SQL injection, or command injection vulnerabilities.",attacks=[PromptInjection(weight=2),Base64(weight=2),@@ -214,6 +224,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 6. Excessive AgencyRiskCategory(name="LLM_06",+ _display_name="LLM06:2025 Excessive Agency",+ description="LLMs are granted too much autonomy, permissions, or functionality, leading to unintended actions beyond their intended scope through excessive functionality, permissions, or autonomy.",attacks=[Roleplay(weight=3,@@ -238,6 +250,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 7. System Prompt LeakageRiskCategory(name="LLM_07",+ _display_name="LLM07:2025 System Prompt Leakage",+ description="Exposure of internal system prompts that contain sensitive instructions, credentials, operational logic, security mechanisms, or access control configurations through adversarial queries.",attacks=[PromptInjection(weight=2),PromptProbing(weight=2),@@ -265,6 +279,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 8. Vector and Embedding WeaknessesRiskCategory(name="LLM_08",+ _display_name="LLM08:2025 Vector and Embedding Weaknesses",+ description="Vulnerabilities in RAG systems and vector databases, including embedding poisoning, similarity attacks, vector database access issues, and embedding inversion that can reconstruct source text from vectors.",attacks=[GrayBox(weight=2),MathProblem(weight=1),@@ -284,6 +300,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 9. MisinformationRiskCategory(name="LLM_09",+ _display_name="LLM09:2025 Misinformation",+ description="LLMs producing false or misleading information that appears credible, including factual errors, unsupported claims, expertise misrepresentation, and fabricated sources or citations.",attacks=[PromptInjection(weight=2),PromptProbing(weight=2),@@ -312,6 +330,8 @@ OWASP_CATEGORIES: List[RiskCategory] = [# 10. Unbounded ConsumptionRiskCategory(name="LLM_10",+ _display_name="LLM10:2025 Unbounded Consumption",+ description="Uncontrolled resource usage that can lead to service degradation, financial losses, or system unavailability through compute exhaustion, memory overload, API abuse, or context flooding.",attacks=[MathProblem(weight=2),LinearJailbreaking(weight=2),diff --git a/deepteam/frameworks/risk_category.py b/deepteam/frameworks/risk_category.pyindex b42ba0e3..4b47e67a 100644--- a/deepteam/frameworks/risk_category.py+++ b/deepteam/frameworks/risk_category.py@@ -11,3 +11,5 @@ class RiskCategory:name: strvulnerabilities: List[BaseVulnerability]attacks: List[BaseAttack]+ description: Optional[str] = None+ _display_name: Optional[str] = Nonediff --git a/deepteam/vulnerabilities/constants.py b/deepteam/vulnerabilities/constants.pyindex 3339d3d2..0a799b53 100644--- a/deepteam/vulnerabilities/constants.py+++ b/deepteam/vulnerabilities/constants.py@@ -99,3 +99,9 @@ VULNERABILITY_TYPES_MAP: Dict[str, List[str]] = {}VULNERABILITY_NAMES = sorted(v.name for v in VULNERABILITY_CLASSES_MAP.values())++# Map vulnerability names to their descriptions+VULNERABILITY_NAME_TO_DESCRIPTION_MAP: Dict[str, str] = {+ name: vuln_class.description+ for name, vuln_class in VULNERABILITY_CLASSES_MAP.items()+}