fix: record the calling client and only schema-known names in audit entries (SEC-12, SEC-18)

This commit is contained in:
Latte committed 2026-10-14 17:14:13 +02:00
1 parent 43eebd3089
commit fd5e4b71f3
5 files changed
+141 -10

No files matched your search

+2 -2
View File
@@ -354,9 +354,9 @@ async def test_unknown_tool_is_a_protocol_error_and_is_audited() -> None:
await client.call_tool("gitea_does_not_exist", {"a": 1})
assert caught.value.code == -32602
assert "gitea_does_not_exist" in caught.value.message
assert "gitea_does_not_exist" not in caught.value.message
entry = audit_entries()[-1]
assert entry["tool_name"] == "gitea_does_not_exist"
assert entry["tool_name"] == "(unknown tool, 20 chars)"
assert entry["outcome"] == "unknown_tool"