Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Block installation commands

Kilian Liereta9326ac2da25
diff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.py
index 37999709..335969e6 100644
--- a/sweagent/tools/tools.py
+++ b/sweagent/tools/tools.py
@@ -31,6 +31,7 @@ class ToolFilterConfig(BaseModel):
"less",
"tail -f",
"python -m venv",
+ "make",
]
"""Block any command that starts with one of these"""
blocklist_standalone: list[str] = [
@@ -47,6 +48,8 @@ class ToolFilterConfig(BaseModel):
"emacs",
"nano",
"su",
+ "pip install .",
+ "pip install -e .",
]
"""Block any command that matches one of these exactly"""
block_unless_regex: dict[str, str] = {