fix(agent): close untrusted-context gate bypasses

This commit is contained in:
RaresKeY
2026-08-15 01:58:32 +00:00
parent 329f9d298d
commit 2295504141
16 changed files with 287 additions and 66 deletions
+5 -2
View File
@@ -8,13 +8,16 @@ import asyncio
import json
from src.agent_tools import ToolBlock, TOOL_TAGS # import first to avoid circular
from src.tool_execution import execute_tool_block
from src.tool_execution import NO_TOOL_SECURITY_CONTEXT, execute_tool_block
from src.tool_index import ALWAYS_AVAILABLE, BUILTIN_TOOL_DESCRIPTIONS
from src.tool_security import is_public_blocked_tool
def _run(content):
return asyncio.run(execute_tool_block(ToolBlock("update_plan", content)))
return asyncio.run(execute_tool_block(
ToolBlock("update_plan", content),
security_context=NO_TOOL_SECURITY_CONTEXT,
))
def test_valid_plan_returns_marker_and_counts():