AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend/copilot): disallow the CLI's ListAgents and SendMessage tools (dev, from #15109) (#15117)
Reinier van der Leerf38213256069
diff --git a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.pyindex 0f25a653a0..f6e733fddf 100644--- a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py+++ b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py@@ -1135,6 +1135,8 @@ SDK_DISALLOWED_TOOLS = ["CronCreate","CronList","CronDelete",+ "ListAgents",+ "SendMessage",]# Tools that are blocked entirely in security hooks (defence-in-depth).diff --git a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.pyindex 401fe8b6a6..4f7cba1415 100644--- a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py+++ b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py@@ -769,6 +769,12 @@ class TestSDKDisallowedTools:a denylist — an unlisted tool falls through and executes."""assert tool in BLOCKED_TOOLS+ @pytest.mark.parametrize("tool", ["ListAgents", "SendMessage"])+ @pytest.mark.parametrize("use_e2b", [False, True])+ def test_cli_cross_session_tools_are_disallowed(self, tool: str, use_e2b: bool):+ assert tool in get_sdk_disallowed_tools(use_e2b=use_e2b)+ assert tool in BLOCKED_TOOLS+def test_orchestrator_block_disallows_every_known_builtin(self):# The orchestrator's model gets graph MCP tools only, so its blocklist# must cover everything the copilot blocks *and* everything the