fix: record the calling client and only schema-known names in audit entries (SEC-12, SEC-18)
This commit is contained in:
1 parent
43eebd3089
commit
fd5e4b71f3
5 files changed
+141
-10
No files matched your search
@@ -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"
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user