CC auditing-mcp-servers-for-tool-poisoning
Audit MCP servers for tool poisoning, tool shadowing, rug pulls, SSRF, and unauthenticated exposure using Invariant Labs' mcp-scan for static/runtime scanning plus manual SSRF/auth checks and description pinning. Use before adding a new MCP server to an agent stack, when reviewing an internal MCP server, detecting rug pulls, or investigating an agent's unexpected tool-driven behavior.
Audit MCP servers for tool poisoning, tool shadowing, rug pulls, SSRF, and unauthenticated exposure using Invariant Labs' mcp-scan for static/runtime scanning…
As a process C 53/100 · Has gaps — weak spots: result and completion, when it triggers, failures and branches
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The files contain invisible characters, encoded commands or comments hidden from readers but visible to the model. What you read differs from what the agent sees.
Remove invisible characters (they usually sneak in through copy-paste) and encoded strings: no catalog will pass them. Instructions for the model must be readable by a human too.
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 5
✓ No critical or high findings
Medium and low: 5
-
medium Obfuscation
uni-bidi-overridescripts/agent.py:34Bidirectional override characters (Trojan Source) (2 occurrences) (detector / deny-list definition)SMUGGLE = re.compile(r"[␀-␀␀-␀␀-\U000e0000-\U000e007f]")
detector -
low Obfuscation
uni-zero-widthscripts/agent.py:34Zero-width / invisible characters (possible hidden text) (3 occurrences) (detector / deny-list definition; a stray character, not a sequence)SMUGGLE = re.compile(r"[␀-␀␀-␀␀-\U000e0000-\U000e007f]")
detectorstray character -
low Dangerous commands
cmd-pipe-to-shell-known-hostscripts/agent.py:70Pipe-to-shell installer from a well-known host (still executes remote code) (detector / deny-list definition; string literal in code, not executed)"curl -LsSf https://astral.sh/uv/install.sh | sh"}
detectorcode literal -
low Dangerous commands
cmd-pipe-to-shell-known-hostSKILL.md:49Pipe-to-shell installer from a well-known host (still executes remote code) (documentation of a security skill)curl -LsSf https://astral.sh/uv/install.sh | sh # or: pipx install uv
security skill
A further 1 matches are quotations in this security skill's documentation and are not counted as findings.
Files scanned: 5. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- note
frontmatter-keyunknown frontmatter key "domain" - note
frontmatter-keyunknown frontmatter key "subdomain" - note
frontmatter-keyunknown frontmatter key "nist_ai_rmf" - note
frontmatter-keyunknown frontmatter key "atlas_techniques"
Process rating: all ten parameters 53/100
- 0Result and completion. Does not say what the result is
- 0Failures and branches. Linear process with no failure handling
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 1 mutating operations with no state check
- 60Tools and files. Uses tools (web, python) that frontmatter does not declare
- 70Inputs and preconditions. Inputs and preconditions are listed
- 100Steps. 24 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 2499 tokens
- 100Progress reporting. Reports progress
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- -2localhost URLs: will not work for another user
- -42 reference files, but SKILL.md never points to them: the model will not open them
- -31 of 1 scripts are never mentioned in SKILL.md
- +2Single-language instructions
- +3Description length 387: enough signal without eating the budget
- +4Structure: 18 headings
- +3Step-by-step instructions: 24 items
- +4Has examples (8 code blocks)
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 73.