DeepTeam is a framework to red team LLMs and AI agents.
new owasp 2026 framework added
A-Vamshi32d11dbfef1a
diff --git a/deepteam/frameworks/constants.py b/deepteam/frameworks/constants.pyindex bc9c240f..c6968ef7 100644--- a/deepteam/frameworks/constants.py+++ b/deepteam/frameworks/constants.py@@ -7,13 +7,15 @@ from .owasp.owasp import OWASPTop10from .nist.nist import NISTfrom .mitre.mitre import MITREfrom .risk_category import RiskCategory+from .owasp_top_10_agentic.owasp_top_10_agentic import OWASP_ASI_2026from .owasp.risk_categories import OWASP_CATEGORIESfrom .nist.risk_categories import NIST_CATEGORIESfrom .mitre.risk_categories import MITRE_CATEGORIES+from .owasp_top_10_agentic.risk_categories import OWASP_ASI_CATEGORIESFRAMEWORKS_MAP: Dict[str, AISafetyFramework] = {- f.name: f for f in [OWASPTop10, NIST, MITRE]+ f.name: f for f in [OWASPTop10, NIST, MITRE, OWASP_ASI_2026]}DATASET_FRAMEWORKS_MAP = {f.name: f for f in [Aegis, BeaverTails]}@@ -71,4 +73,10 @@ FRAMEWORK_RISK_CATEGORY_MAPPING: Dict[str, FrameworkInfo] = {_serialize_risk_category(rc) for rc in MITRE_CATEGORIES],),+ OWASP_ASI_2026.name: FrameworkInfo(+ description=OWASP_ASI_2026.description,+ risk_categories=[+ _serialize_risk_category(rc) for rc in OWASP_ASI_CATEGORIES+ ]+ )}diff --git a/deepteam/frameworks/owasp_top_10_agentic/owasp_top_10_agentic.py b/deepteam/frameworks/owasp_top_10_agentic/owasp_top_10_agentic.pynew file mode 100644index 00000000..0ed7c805--- /dev/null+++ b/deepteam/frameworks/owasp_top_10_agentic/owasp_top_10_agentic.py@@ -0,0 +1,100 @@+from typing import List, Literal+from deepteam.frameworks import AISafetyFramework+from deepteam.frameworks.owasp_top_10_agentic.risk_categories import OWASP_ASI_CATEGORIES++"""+OWASP Top 10 for Agentic Applications (ASI) 2026+===============================================++The OWASP Top 10 for Agentic Applications identifies the most critical security risks+introduced by autonomous and semi-autonomous AI agents. Unlike traditional LLM+applications, agentic systems combine reasoning, memory, tools, and multi-step execution,+introducing new classes of vulnerabilities that extend beyond prompt-level attacks.++The 2026 edition focuses on failures arising from goal misalignment, tool misuse,+delegated trust, inter-agent communication, persistent memory, and emergent autonomous+behavior.++The 10 critical risks are:+1. ASI01 - Agent Goal Hijack: Manipulation of agent objectives or plans+2. ASI02 - Tool Misuse & Exploitation: Unsafe or excessive use of tools+3. ASI03 - Agent Identity & Privilege Abuse: Misuse of delegated authority or trust+4. ASI04 - Agentic Supply Chain Compromise: Malicious tools, agents, or metadata+5. ASI05 - Unexpected Code Execution: Unsafe execution of agent-generated code+6. ASI06 - Memory & Context Poisoning: Corruption of agent memory or contextual state+7. ASI07 - Insecure Inter-Agent Communication: Manipulated agent-to-agent messages+8. ASI08 - Cascading Agent Failures: Failure propagation across agent systems+9. ASI09 - Human-Agent Trust Exploitation: Abuse of human over-reliance on agents+10. ASI10 - Rogue Agents: Agents acting beyond intended objectives++Each category includes:+- Attacks: Prompting and interaction patterns that induce unsafe agent behavior+- Vulnerabilities: Typed behavioral weaknesses observable at the model or agent layer++This framework evaluates agentic risks at the reasoning and behavioral level and does not+claim full coverage of runtime enforcement, infrastructure security, or cryptographic+protocols.++Reference: https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/+"""+++class OWASP_ASI_2026(AISafetyFramework):+ name = "OWASP Top 10 for Agentic Applications 2026"+ description = "A comprehensive list of the most critical security risks associated with agentic AI applications. The 2026 edition focuses on failures introduced by autonomy, tool usage, delegated trust, memory persistence, inter-agent communication, and emergent behavior. Each risk category is evaluated using realistic attack techniques and typed vulnerability assessments aligned with agent reasoning and behavior."++ ALLOWED_TYPES = [+ "ASI_01",+ "ASI_02",+ "ASI_03",+ "ASI_04",+ "ASI_05",+ "ASI_06",+ "ASI_07",+ "ASI_08",+ "ASI_09",+ "ASI_10",+ ]++ def __init__(+ self,+ categories: List[+ Literal[+ "ASI_01",+ "ASI_02",+ "ASI_03",+ "ASI_04",+ "ASI_05",+ "ASI_06",+ "ASI_07",+ "ASI_08",+ "ASI_09",+ "ASI_10",+ ]+ ] = [+ "ASI_01",+ "ASI_02",+ "ASI_03",+ "ASI_04",+ "ASI_05",+ "ASI_06",+ "ASI_07",+ "ASI_08",+ "ASI_09",+ "ASI_10",+ ],+ ):+ self.categories = categories+ self.risk_categories = []+ self.vulnerabilities = []+ self.attacks = []++ for category in categories:+ for risk_category in OWASP_ASI_CATEGORIES:+ if risk_category.name == category:+ self.risk_categories.append(risk_category)+ self.vulnerabilities.extend(risk_category.vulnerabilities)+ self.attacks.extend(risk_category.attacks)++ def get_name(self):+ return self.namediff --git a/deepteam/frameworks/owasp_top_10_agentic/risk_categories.py b/deepteam/frameworks/owasp_top_10_agentic/risk_categories.pynew file mode 100644index 00000000..6d60c79b--- /dev/null+++ b/deepteam/frameworks/owasp_top_10_agentic/risk_categories.py@@ -0,0 +1,186 @@+from typing import List+from deepteam.frameworks.risk_category import RiskCategory+from deepteam.vulnerabilities import (+ Ethics,+ Misinformation,+ PromptLeakage,+ BFLA,+ BOLA,+ RBAC,+ DebugAccess,+ ShellInjection,+ SQLInjection,+ IntellectualProperty,+ GoalTheft,+ RecursiveHijacking,+ Robustness,+ ExcessiveAgency,+ IndirectInstruction,+ ToolOrchestrationAbuse,+ AgentIdentityAbuse,+ ToolMetadataPoisoning,+ UnexpectedCodeExecution,+ InsecureInterAgentCommunication,+ AutonomousAgentDrift,+)+from deepteam.attacks.single_turn import (+ Base64,+ PromptInjection,+ PromptProbing,+ Roleplay,+ ROT13,+ ContextPoisoning,+)+from deepteam.attacks.multi_turn import (+ CrescendoJailbreaking,+ LinearJailbreaking,+ TreeJailbreaking,+)+++++OWASP_ASI_CATEGORIES: List[RiskCategory] = [+ RiskCategory(+ name="ASI_01",+ _display_name="ASI01:2026 Agent Goal Hijack",+ description="Attackers manipulate agent goals, plans, or decision paths through direct or indirect instruction injection, causing agents to pursue unintended or malicious objectives.",+ attacks=[+ PromptInjection(weight=3),+ LinearJailbreaking(weight=2),+ CrescendoJailbreaking(weight=2),+ TreeJailbreaking(weight=1),+ Roleplay(weight=2, role="System planner", persona="Authorized orchestrator"),+ ],+ vulnerabilities=[+ GoalTheft(types=["escalating_probing", "cooperative_dialogue"]),+ ExcessiveAgency(types=["autonomy", "functionality"]),+ Robustness(types=["hijacking"]),+ RecursiveHijacking(types=["goal_propagation_attacks", "self_modifying_goals"]),+ IndirectInstruction(types=["cross_context_injection", "document_embedded_instructions", "rag_injection", "tool_output_injection"])+ ],+ ),+ RiskCategory(+ name="ASI_02",+ _display_name="ASI02:2026 Tool Misuse & Exploitation",+ description="Agents misuse or abuse tools through unsafe composition, recursion, or excessive execution, causing harmful side effects despite valid permissions.",+ attacks=[+ PromptInjection(weight=2),+ Roleplay(weight=2, role="Automation agent", persona="Agent orchestrator"),+ ],+ vulnerabilities=[+ ExcessiveAgency(types=["functionality", "permissions"]),+ BFLA(types=["function_bypass", "authorization_bypass"]),+ ToolOrchestrationAbuse(types=["recursive_tool_calls", "unsafe_tool_composition", "tool_budget_exhaustion", "cross_tool_state_leakage"]),+ ],+ ),+ RiskCategory(+ name="ASI_03",+ _display_name="ASI03:2026 Agent Identity & Privilege Abuse",+ description="Abuse of delegated authority, ambiguous agent identity, or trust assumptions leading to unauthorized actions.",+ attacks=[+ Roleplay(weight=3, role="Privileged agent", persona="Authorized priority agent"),+ PromptProbing(weight=2),+ ],+ vulnerabilities=[+ BOLA(types=["object_access_bypass", "unauthorized_object_manipulation"]),+ RBAC(types=["role_bypass", "unauthorized_role_assumption"]),+ PromptLeakage(types=["guard_exposure", "permissions_and_roles", "secrets_and_credentials"]),+ AgentIdentityAbuse(types=["agent_impersonation", "cross_agent_trust_abuse", "identity_inheritance"])+ ],+ ),+ RiskCategory(+ name="ASI_04",+ _display_name="ASI04:2026 Agentic Supply Chain Compromise",+ description="Compromise of external agents, tools, schemas, or prompts that agents dynamically trust or import.",+ attacks=[+ PromptInjection(weight=2),+ ],+ vulnerabilities=[+ IntellectualProperty(types=["imitation"]),+ ToolMetadataPoisoning(types=["schema_manipulation","description_deception","permission_misrepresentation","registry_poisoning"]),+ ],+ ),+ RiskCategory(+ name="ASI_05",+ _display_name="ASI05:2026 Unexpected Code Execution",+ description="Agent-generated or agent-triggered code execution without sufficient validation or isolation.",+ attacks=[+ PromptInjection(weight=2),+ Base64(weight=2),+ ROT13(weight=2),+ ],+ vulnerabilities=[+ ShellInjection(types=["command_injection", "system_command_execution"]),+ SQLInjection(types=["blind_sql_injection"]),+ DebugAccess(types=["administrative_interface_exposure", "debug_mode_bypass"]),+ UnexpectedCodeExecution(types=["unauthorized_code_execution","shell_command_execution","eval_usage"]),+ ],+ ),+ RiskCategory(+ name="ASI_06",+ _display_name="ASI06:2026 Memory & Context Poisoning",+ description="Injection or leakage of agent memory or contextual state that influences future reasoning or actions.",+ attacks=[+ PromptInjection(weight=2),+ CrescendoJailbreaking(weight=1),+ ContextPoisoning(weight=3)+ ],+ vulnerabilities=[+ Misinformation(types=["expertize_misrepresentation", "factual_errors"]),+ Robustness(types=["input_overreliance", "hijacking"]),+ ],+ ),+ RiskCategory(+ name="ASI_07",+ _display_name="ASI07:2026 Insecure Inter-Agent Communication",+ description="Manipulation of messages exchanged between agents, planners, and executors.",+ attacks=[+ Roleplay(weight=2, role="Planner", persona="Critical Thinking Agent"),+ LinearJailbreaking(weight=2),+ CrescendoJailbreaking(weight=1)+ ],+ vulnerabilities=[+ InsecureInterAgentCommunication(types=["agent_in_the_middle", "message_injection", "message_spoofing"]),+ ],+ ),+ RiskCategory(+ name="ASI_08",+ _display_name="ASI08:2026 Cascading Agent Failures",+ description="Small agent failures propagate through connected systems causing large-scale impact.",+ attacks=[+ PromptInjection(weight=2),+ LinearJailbreaking(weight=1),+ CrescendoJailbreaking(weight=1),+ ],+ vulnerabilities=[+ Robustness(types=["hijacking"]),+ ExcessiveAgency(types=["autonomy"]),+ ],+ ),+ RiskCategory(+ name="ASI_09",+ _display_name="ASI09:2026 Human-Agent Trust Exploitation",+ description="Exploitation of human over-reliance on agents through misleading explanations or authority framing.",+ attacks=[+ Roleplay(weight=3, persona="Authoritative expert", role="Human Agent"),+ ],+ vulnerabilities=[+ Ethics(types=["moral_integrity", "responsible_transparency"]),+ Misinformation(types=["expertize_misrepresentation", "unsupported_claims"]),+ ],+ ),+ RiskCategory(+ name="ASI_10",+ _display_name="ASI10:2026 Rogue Agents",+ description="Agents acting beyond intended objectives due to goal drift, collusion, or emergent behavior.",+ attacks=[+ CrescendoJailbreaking(weight=1),+ LinearJailbreaking(weight=2),+ ],+ vulnerabilities=[+ RecursiveHijacking(types=["goal_propagation_attacks", "self_modifying_goals"]),+ AutonomousAgentDrift(types=["agent_collusion","goal_drift","reward_hacking","runaway_autonomy"]),+ ],+ ),+]diff --git a/deepteam/metrics/__init__.py b/deepteam/metrics/__init__.pyindex 7fa6ea33..5117f82a 100644--- a/deepteam/metrics/__init__.py+++ b/deepteam/metrics/__init__.py@@ -24,7 +24,13 @@ from .hijacking.hijacking import HijackingMetricfrom .intellectual_property.intellectual_property import (IntellectualPropertyMetric,)-+from .indirect_instruction.indirect_instruction import IndirectInstructionMetric+from .tool_orchestration.tool_orchestration import ToolOrchestrationMetric+from .agent_identity_abuse.agent_identity_abuse import AgentIdentityAbuseMetric+from .tool_metadata_poisoning.tool_metadata_poisoning import ToolMetadataPoisoningMetric+from .unexpected_code_execution.unexpected_code_execution import UnexpectedCodeExecutionMetric+from .insecure_inter_agent_communication.insecure_inter_agent_communication import InsecureInterAgentCommunicationMetric+from .autonomous_agent_drift.autonomous_agent_drift import AutonomousAgentDriftMetric# Agentic metricsfrom .agentic.unauthorized_execution.unauthorized_execution import (diff --git a/deepteam/vulnerabilities/__init__.py b/deepteam/vulnerabilities/__init__.pyindex 92e6ee47..226f297d 100644--- a/deepteam/vulnerabilities/__init__.py+++ b/deepteam/vulnerabilities/__init__.py@@ -16,6 +16,13 @@ from .shell_injection.shell_injection import ShellInjectionfrom .sql_injection.sql_injection import SQLInjectionfrom .ssrf.ssrf import SSRFfrom .intellectual_property.intellectual_property import IntellectualProperty+from .indirect_instruction.indirect_instruction import IndirectInstruction+from .tool_orchestration_abuse.tool_orchestration_abuse import ToolOrchestrationAbuse+from .agent_identity_abuse.agent_identity_abuse import AgentIdentityAbuse+from .tool_metadata_poisoning.tool_metadata_poisoning import ToolMetadataPoisoning+from .unexpected_code_execution.unexpected_code_execution import UnexpectedCodeExecution+from .insecure_inter_agent_communication.insecure_inter_agent_communication import InsecureInterAgentCommunication+from .autonomous_agent_drift.autonomous_agent_drift import AutonomousAgentDriftfrom .competition.competition import Competitionfrom .graphic_content.graphic_content import GraphicContentfrom .personal_safety.personal_safety import PersonalSafety@@ -45,6 +52,13 @@ __all__ = ["SQLInjection","SSRF","IntellectualProperty",+ "IndirectInstruction",+ "ToolOrchestrationAbuse",+ "AgentIdentityAbuse",+ "ToolMetadataPoisoning",+ "UnexpectedCodeExecution",+ "InsecureInterAgentCommunication",+ "AutonomousAgentDrift","Competition","GraphicContent","PersonalSafety",diff --git a/deepteam/vulnerabilities/constants.py b/deepteam/vulnerabilities/constants.pyindex 45c507bc..b1d84531 100644--- a/deepteam/vulnerabilities/constants.py+++ b/deepteam/vulnerabilities/constants.py@@ -23,7 +23,13 @@ from .goal_theft.goal_theft import GoalTheftfrom .recursive_hijacking.recursive_hijacking import RecursiveHijackingfrom .robustness.robustness import Robustnessfrom .excessive_agency.excessive_agency import ExcessiveAgency-+from .indirect_instruction.indirect_instruction import IndirectInstruction+from .tool_orchestration_abuse.tool_orchestration_abuse import ToolOrchestrationAbuse+from .agent_identity_abuse.agent_identity_abuse import AgentIdentityAbuse+from .tool_metadata_poisoning.tool_metadata_poisoning import ToolMetadataPoisoning+from .unexpected_code_execution.unexpected_code_execution import UnexpectedCodeExecution+from .insecure_inter_agent_communication.insecure_inter_agent_communication import InsecureInterAgentCommunication+from .autonomous_agent_drift.autonomous_agent_drift import AutonomousAgentDrift# Import typesfrom .bias.types import BiasType@@ -47,6 +53,13 @@ from .goal_theft.types import GoalTheftTypefrom .recursive_hijacking.types import RecursiveHijackingTypefrom .robustness.types import RobustnessTypefrom .excessive_agency.types import ExcessiveAgencyType+from .indirect_instruction.indirect_instruction import IndirectInstructionType+from .tool_orchestration_abuse.tool_orchestration_abuse import ToolOrchestrationAbuseType+from .agent_identity_abuse.agent_identity_abuse import AgentIdentityAbuseType+from .tool_metadata_poisoning.tool_metadata_poisoning import ToolMetadataPoisoningType+from .unexpected_code_execution.unexpected_code_execution import UnexpectedCodeExecutionType+from .insecure_inter_agent_communication.insecure_inter_agent_communication import InsecureInterAgentCommunicationType+from .autonomous_agent_drift.autonomous_agent_drift import AutonomousAgentDriftTypeVULNERABILITY_CLASSES_MAP: Dict[str, BaseVulnerability] = {@@ -73,6 +86,13 @@ VULNERABILITY_CLASSES_MAP: Dict[str, BaseVulnerability] = {RecursiveHijacking,Robustness,ExcessiveAgency,+ IndirectInstruction,+ ToolOrchestrationAbuse,+ AgentIdentityAbuse,+ ToolMetadataPoisoning,+ UnexpectedCodeExecution,+ InsecureInterAgentCommunication,+ AutonomousAgentDrift,]}