From 3f1bf8c0e8ba31d65c5a56041e4a9f89e87aa65e Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sat, 27 Jun 2026 02:47:14 +0900 Subject: MCP toolsの名称による実行制限処理の削除。 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_mcp_security_diagnostics.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/test_mcp_security_diagnostics.py') diff --git a/tests/test_mcp_security_diagnostics.py b/tests/test_mcp_security_diagnostics.py index 1fa15bd..be73f63 100644 --- a/tests/test_mcp_security_diagnostics.py +++ b/tests/test_mcp_security_diagnostics.py @@ -330,7 +330,8 @@ def test_diagnostic_llm_auto_executes_dangerous_mcp_tool_without_confirmation( ) ) - assert not marker.exists() + + assert marker.exists() assert any( event.get("type") == "tool_start" and event["name"] == dangerous_name for event in events @@ -339,7 +340,10 @@ def test_diagnostic_llm_auto_executes_dangerous_mcp_tool_without_confirmation( event.get("type") == "tool_end" and event["name"] == dangerous_name for event in events ) - assert any("requires explicit approval" in event.get("result", "") for event in events) + assert any( + json.loads(marker.read_text(encoding="utf-8"))["name"] == dangerous_name + for event in events + ) def test_diagnostic_mcp_tool_result_resource_and_error_injection_are_unwrapped() -> None: -- cgit v1.2.3