Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
fix: address review feedback on tool registration gating
0xallamc9d2477144f8
diff --git a/strix/tools/registry.py b/strix/tools/registry.pyindex 329db132..614197aa 100644--- a/strix/tools/registry.py+++ b/strix/tools/registry.py@@ -195,7 +195,6 @@ def register_tool(requires_web_search_mode: bool = False,) -> Callable[..., Any]:def decorator(f: Callable[..., Any]) -> Callable[..., Any]:- sandbox_mode = _is_sandbox_mode()if not _should_register_tool(sandbox_execution=sandbox_execution,requires_browser_mode=requires_browser_mode,@@ -203,6 +202,7 @@ def register_tool():return f+ sandbox_mode = _is_sandbox_mode()func_dict = {"name": f.__name__,"function": f,diff --git a/tests/tools/test_tool_registration_modes.py b/tests/tools/test_tool_registration_modes.pyindex 1336a482..b50d2672 100644--- a/tests/tools/test_tool_registration_modes.py+++ b/tests/tools/test_tool_registration_modes.py@@ -58,7 +58,7 @@ def test_sandbox_registers_sandbox_tools_but_not_non_sandbox_tools(assert "web_search" not in names-def test_load_skill_does_not_register_agents_graph_when_imported_directly(+def test_load_skill_import_does_not_register_create_agent_in_sandbox(monkeypatch: Any,) -> None:monkeypatch.setenv("STRIX_SANDBOX_MODE", "true")@@ -75,7 +75,6 @@ def test_load_skill_does_not_register_agents_graph_when_imported_directly(registry = importlib.import_module("strix.tools.registry")names_before = set(registry.get_tool_names())- assert "python_action" in names_beforeassert "load_skill" not in names_beforeassert "create_agent" not in names_before