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 ScheduleWakeup SDK built-in (#13187)
Zamil Majdy72e3995e044e
diff --git a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.pyindex 4efac1a3c9..c447bb0034 100644--- a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py+++ b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py@@ -926,6 +926,8 @@ _SDK_BUILTIN_TOOLS = [*_SDK_BUILTIN_FILE_TOOLS, *_SDK_BUILTIN_ALWAYS]# — our MCP read_file handles tool-results paths via# is_allowed_local_path() and has been the only Read available in# prod without issues.+# ScheduleWakeup: no /loop runtime in copilot turns; the handler returns+# {"scheduledFor": 0} and nothing is scheduled.SDK_DISALLOWED_TOOLS = ["Bash","WebFetch",@@ -934,6 +936,7 @@ SDK_DISALLOWED_TOOLS = ["Write","Edit","Read",+ "ScheduleWakeup",]# 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 b575ab9602..6eaee4c71a 100644--- a/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py+++ b/autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py@@ -663,6 +663,9 @@ class TestSDKDisallowedTools:"""WebFetch is disallowed due to SSRF risk."""assert "WebFetch" in SDK_DISALLOWED_TOOLS+ def test_schedule_wakeup_tool_is_disallowed(self):+ assert "ScheduleWakeup" in SDK_DISALLOWED_TOOLS+# ---------------------------------------------------------------------------# _read_file_handler — bridge_and_annotate integration