You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp: prompts, resources and templates are never observed, so the fingerprint cannot see them move #187
Raised on r/mcp by a reader reviewing the concealed-character work:
One extra boundary I would make explicit: scan prompts, resources, templates, titles, and annotations too, not only the tool definitions. A client may load those before a tool call, and an attacker only needs one model-visible string that your policy forgot exists.
Verified. tools/mcp_audit_proxy.py tracks exactly two methods:
190: if method == "initialize" and rid is not None:
193: if method == "tools/list" and rid is not None:
There is no prompts/list, no resources/list and no resources/templates/list.
This is larger than the concealment check
It is not that those surfaces go unscanned for hidden characters. Nothing about them is observed at all. No fingerprint, no baseline, no per-item digest, no event. A server can ship a poisoned prompt template, keep its tool listing byte-identical forever, and every signal in mcp_schema stays silent permanently. The rug-pull detection this module exists for does not cover them.
Prompts are the sharpest case, because a prompt is model-visible by definition and a client may load it before any tool is called.
Already covered, for the avoidance of doubt
Titles and annotations inside a tool are handled. _canonical_entries drops nothing now that _VOLATILE is empty, and _walk_strings walks every string in the entry rather than a named field list. The gap is the other MCP surfaces, not the other fields.
What to build
Mirror what tools/list already gets, rather than inventing a second mechanism:
Buffer and assemble paginated prompts/list, resources/list and resources/templates/list the way ToolsListBuffer does, including the reset on error so a retry cannot append onto a stale prefix.
A fingerprint per surface, and per-item digests so a fire can name the item rather than only the server.
Run scan_concealed_text over each.
Keep the same redaction rule: digests and counts, never the text.
A failed listing must stay distinguishable from an empty one, the same as mcp_schema_unavailable already does for tools.
Scope
tools/mcp_audit_proxy.py and core/diagnostics/mcp_schema.py, both outside _RULESET_SOURCES. New event classes are additive, so schema 1.2.0 stands. Nothing under the detection freeze.
Activity