Skip to content

DeepTeam is a framework to red team LLMs and AI agents.

updated vulnerabilities

A-Vamshieece992f528d
diff --git a/deepteam/vulnerabilities/debug_access/debug_access.py b/deepteam/vulnerabilities/debug_access/debug_access.py
index 1cdfb05b..425b62a9 100644
--- a/deepteam/vulnerabilities/debug_access/debug_access.py
+++ b/deepteam/vulnerabilities/debug_access/debug_access.py
@@ -28,6 +28,7 @@ DebugAccessLiteral = Literal[
class DebugAccess(BaseVulnerability):
def __init__(
self,
+ purpose: str,
async_mode: bool = True,
verbose_mode: bool = False,
simulator_model: Optional[
@@ -41,6 +42,7 @@ class DebugAccess(BaseVulnerability):
enum_types = validate_vulnerability_types(
self.get_name(), types=types, allowed_type=DebugAccessType
)
+ self.purpose = purpose
self.async_mode = async_mode
self.verbose_mode = verbose_mode
self.simulator_model = simulator_model
@@ -183,7 +185,7 @@ class DebugAccess(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
DebugAccessTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)
@@ -234,7 +236,7 @@ class DebugAccess(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
DebugAccessTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)
diff --git a/deepteam/vulnerabilities/shell_injection/shell_injection.py b/deepteam/vulnerabilities/shell_injection/shell_injection.py
index c14d3d4a..25a7c164 100644
--- a/deepteam/vulnerabilities/shell_injection/shell_injection.py
+++ b/deepteam/vulnerabilities/shell_injection/shell_injection.py
@@ -28,6 +28,7 @@ ShellInjectionLiteral = Literal[
class ShellInjection(BaseVulnerability):
def __init__(
self,
+ purpose: str,
async_mode: bool = True,
verbose_mode: bool = False,
simulator_model: Optional[
@@ -41,6 +42,7 @@ class ShellInjection(BaseVulnerability):
enum_types = validate_vulnerability_types(
self.get_name(), types=types, allowed_type=ShellInjectionType
)
+ self.purpose = purpose
self.async_mode = async_mode
self.verbose_mode = verbose_mode
self.simulator_model = simulator_model
@@ -183,7 +185,7 @@ class ShellInjection(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
ShellInjectionTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)
@@ -234,7 +236,7 @@ class ShellInjection(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
ShellInjectionTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)
diff --git a/deepteam/vulnerabilities/sql_injection/sql_injection.py b/deepteam/vulnerabilities/sql_injection/sql_injection.py
index abdd56f6..abeaa04f 100644
--- a/deepteam/vulnerabilities/sql_injection/sql_injection.py
+++ b/deepteam/vulnerabilities/sql_injection/sql_injection.py
@@ -28,6 +28,7 @@ SQLInjectionLiteral = Literal[
class SQLInjection(BaseVulnerability):
def __init__(
self,
+ purpose: str,
async_mode: bool = True,
verbose_mode: bool = False,
simulator_model: Optional[
@@ -41,6 +42,7 @@ class SQLInjection(BaseVulnerability):
enum_types = validate_vulnerability_types(
self.get_name(), types=types, allowed_type=SQLInjectionType
)
+ self.purpose = purpose
self.async_mode = async_mode
self.verbose_mode = verbose_mode
self.simulator_model = simulator_model
@@ -183,7 +185,7 @@ class SQLInjection(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
SQLInjectionTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)
@@ -234,7 +236,7 @@ class SQLInjection(BaseVulnerability):
templates[type] = templates.get(type, [])
templates[type].append(
SQLInjectionTemplate.generate_baseline_attacks(
- type, attacks_per_vulnerability_type
+ type, attacks_per_vulnerability_type, self.purpose
)
)