Skip to the content.

Detection rules

MCPSonar lints every tool definition it sees (dashboard, mcpsonar scan, tools, risks) for signs of tool poisoning: instructions hidden in text that the model reads but a person reviewing the tool usually doesn’t.

What a finding means. Each rule is a heuristic over the definition’s text. A finding means “a human should read this tool”, not “this server is malicious”. No finding does not mean a tool is safe. Findings never change a server’s up/degraded/down status.

Real attacks look like the positive examples below: a fake <IMPORTANT> block asking the model to read ~/.ssh/id_rsa and pass it in a sidenote parameter, without telling the user. A legitimate tool rarely triggers more than one low rule.

How each rule is described

Field Meaning
ID Stable identifier, used in reports, SARIF and --fail-on. It is never renamed.
Severity How bad it would be if the match is what it looks like: high / medium / low. risk_count and the dashboard’s “risks” count high + medium.
Confidence How often a match is what it looks like, i.e. the precision on real definitions. Low-confidence rules are hints.
OWASP The related OWASP MCP Top 10 categories: MCP01 Token Mismanagement & Secret Exposure, MCP03 Tool Poisoning, MCP06 Prompt Injection via Contextual Payloads, MCP10 Context Injection & Over-Sharing.

How the rules are measured

Found a false positive or a missed attack? Open a detection report. It becomes a corpus case.


hidden-unicode — Invisible characters

Severity high · Confidence high · OWASP MCP03, MCP06

prompt-injection — Instruction override

Severity high · Confidence medium · OWASP MCP06, MCP03

hidden-from-user — Concealment from the user

Severity high · Confidence medium · OWASP MCP03

fake-system-tag — Fake system markup

Severity high · Confidence high · OWASP MCP06, MCP03

sensitive-path — Credential or config access

Severity high · Confidence medium · OWASP MCP01, MCP03

exfiltration — Send data elsewhere

Severity medium · Confidence medium · OWASP MCP10, MCP03

tool-shadowing — Influences other tools

Severity medium · Confidence low · OWASP MCP03

hidden-precondition — Hidden side action

Severity medium · Confidence low · OWASP MCP03, MCP10

coercive-instruction — Imperative aimed at the model

Severity low · Confidence low · OWASP MCP06

encoded-blob — Encoded payload

Severity low · Confidence low · OWASP MCP03

long-description — Unusually long description

Severity low · Confidence low · OWASP MCP03

suspicious-parameter — Context-exfiltration parameter

Severity medium · Confidence medium · OWASP MCP10, MCP03

Known gaps

These are not detected today; they are candidates for future rules: