diff --git a/agents/s09_agent_teams.py b/agents/s09_agent_teams.py index 90f6760df..bd666552a 100644 --- a/agents/s09_agent_teams.py +++ b/agents/s09_agent_teams.py @@ -260,7 +260,7 @@ def _safe_path(p: str) -> Path: def _run_bash(command: str) -> str: - dangerous = ["rm -rf /", "sudo", "shutdown", "reboot"] + dangerous = ["rm -rf /", "sudo", "shutdown", "reboot", "> /dev/"] if any(d in command for d in dangerous): return "Error: Dangerous command blocked" try: diff --git a/agents/s10_team_protocols.py b/agents/s10_team_protocols.py index d5475359c..3f9923da2 100644 --- a/agents/s10_team_protocols.py +++ b/agents/s10_team_protocols.py @@ -301,7 +301,7 @@ def _safe_path(p: str) -> Path: def _run_bash(command: str) -> str: - dangerous = ["rm -rf /", "sudo", "shutdown", "reboot"] + dangerous = ["rm -rf /", "sudo", "shutdown", "reboot", "> /dev/"] if any(d in command for d in dangerous): return "Error: Dangerous command blocked" try: diff --git a/agents/s11_autonomous_agents.py b/agents/s11_autonomous_agents.py index 3aec416b8..c3a62cdaa 100644 --- a/agents/s11_autonomous_agents.py +++ b/agents/s11_autonomous_agents.py @@ -389,7 +389,7 @@ def _safe_path(p: str) -> Path: def _run_bash(command: str) -> str: - dangerous = ["rm -rf /", "sudo", "shutdown", "reboot"] + dangerous = ["rm -rf /", "sudo", "shutdown", "reboot", "> /dev/"] if any(d in command for d in dangerous): return "Error: Dangerous command blocked" try: