Raw scan report

Cli — the complete, unedited output of the deterministic mcptrustchecker engine v1.8.0, scanned . Every finding, capability tag and score component below is exactly what the engine produced — no AI, no post-processing.

← Back to the scan page
{
  "tool": {
    "name": "mcptrustchecker",
    "version": "1.8.0",
    "methodologyVersion": "mcptrustchecker-1.8"
  },
  "target": {
    "id": "@phren/cli",
    "source": {
      "kind": "package",
      "origin": "@phren/cli"
    },
    "server": {
      "name": "@phren/cli"
    }
  },
  "grade": "D",
  "score": {
    "score": 68,
    "threatScore": 78,
    "grade": "D",
    "band": "D",
    "categorySubtotals": {
      "injection": 6.3,
      "exfiltration": 0,
      "permissions": 15.44,
      "supply-chain": 0,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 6.3
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.5,
        "appliedPenalty": 3.15
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.25,
        "appliedPenalty": 1.58
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-009",
        "category": "injection",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 6.3
      },
      {
        "kind": "client",
        "term": "capability-exposure",
        "level": "critical",
        "label": "capability blast radius (critical) — client exposure if the model is manipulated",
        "appliedPenalty": 10
      },
      {
        "kind": "client",
        "term": "verification-discount",
        "level": "source",
        "label": "publisher verification (provenance) — cryptographic build provenance ties the artifact to its source",
        "appliedPenalty": 0
      },
      {
        "kind": "client",
        "term": "coverage-honesty",
        "level": "source",
        "label": "inspection depth (source) — how much of the target the scan could see",
        "appliedPenalty": 0
      }
    ],
    "gatesFired": [],
    "methodologyVersion": "mcptrustchecker-1.8"
  },
  "capability": {
    "level": "critical",
    "reasons": [
      "ingests untrusted external content (a prompt-injection entry point)",
      "can send data / act on an external service",
      "reads sensitive or local data",
      "has a read → egress path (a data-exfiltration surface)",
      "can execute shell commands or code",
      "untrusted-input, sensitive-source and egress co-exist across tools (toxic-flow surface)",
      "untrusted input can reach code execution"
    ],
    "tags": [
      "external-sink",
      "code-exec",
      "sensitive-source",
      "untrusted-input"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": true,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "Tools were statically extracted from the published source (59 recovered), not enumerated from a running server. Tool-poisoning, Unicode-smuggling, capability and toxic-flow analysis ran on this inferred surface, but a mis-parsed registration could be missed or mis-attributed, so tool-derived findings are capped below “confirmed”. To grade the real runtime surface, scan the running server: --command \"npx -y <package>\"."
    ]
  },
  "findings": [
    {
      "ruleId": "MTC-FLOW-002",
      "title": "Completed toxic-flow trifecta across tools",
      "category": "exfiltration",
      "severity": "critical",
      "confidence": "strong",
      "description": "This server (without client built-ins) exposes a complete data-exfiltration chain: get_memory_detail → add_custom_hook → remove_custom_hook. Untrusted input is ingested, private data is read, and it can be sent to an external sink via the agent composing the tools (→). Static analysis proves the primitive exists, not that a specific run will occur.",
      "remediation": "Remove one leg of the trifecta: isolate untrusted-input tools from secret-reading tools and from egress tools, or require human approval between them.",
      "location": {
        "kind": "flow",
        "name": "get_memory_detail → add_custom_hook → remove_custom_hook"
      },
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "references": [],
      "data": {
        "untrusted": [
          "get_memory_detail"
        ],
        "sources": [
          "add_custom_hook",
          "add_project"
        ],
        "sinks": [
          "add_custom_hook",
          "remove_custom_hook"
        ],
        "path": [
          "get_memory_detail",
          "add_custom_hook",
          "remove_custom_hook"
        ],
        "edges": [
          {
            "from": "get_memory_detail",
            "to": "add_custom_hook",
            "kind": "agent-mediated"
          },
          {
            "from": "add_custom_hook",
            "to": "remove_custom_hook",
            "kind": "agent-mediated"
          }
        ],
        "wired": false
      }
    },
    {
      "ruleId": "MTC-FLOW-003",
      "title": "Read-and-egress in one tool: \"add_custom_hook\"",
      "category": "exfiltration",
      "severity": "high",
      "confidence": "strong",
      "description": "Tool \"add_custom_hook\" can both read sensitive data and send data to an external destination. Even without an explicit untrusted-input leg, this is a single-call data-exfiltration path if the model is ever manipulated.",
      "remediation": "Separate reading from sending; require explicit user confirmation before egress of file/secret contents.",
      "location": {
        "kind": "flow",
        "name": "add_custom_hook"
      },
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "references": [],
      "data": {
        "tags": [
          "external-sink",
          "code-exec",
          "sensitive-source"
        ]
      }
    },
    {
      "ruleId": "MTC-CAP-001",
      "title": "Tool \"add_custom_hook\" exposes command/code execution",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "Tool \"add_custom_hook\" appears to run shell commands or evaluate code (parameter \"command\"). Arbitrary execution driven by model input is one of the most dangerous MCP capabilities; combined with any untrusted input it becomes RCE.",
      "remediation": "Sandbox execution, allowlist commands/arguments, and never pass model output to a shell unescaped.",
      "location": {
        "kind": "tool",
        "name": "add_custom_hook"
      },
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "tags": [
          "external-sink",
          "code-exec",
          "sensitive-source"
        ]
      }
    },
    {
      "ruleId": "MTC-CAP-001",
      "title": "Tool \"remove_custom_hook\" exposes command/code execution",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "Tool \"remove_custom_hook\" appears to run shell commands or evaluate code (parameter \"command\"). Arbitrary execution driven by model input is one of the most dangerous MCP capabilities; combined with any untrusted input it becomes RCE.",
      "remediation": "Sandbox execution, allowlist commands/arguments, and never pass model output to a shell unescaped.",
      "location": {
        "kind": "tool",
        "name": "remove_custom_hook"
      },
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "tags": [
          "code-exec"
        ]
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli-hooks-git.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli-hooks-git.js:8`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli-hooks-git.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli-hooks-git.js",
        "line": 8
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/extract.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/extract.js:13`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/extract.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/extract.js",
        "line": 13
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/govern.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/govern.js:235`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/govern.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/govern.js",
        "line": 235
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/namespaces-store.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/namespaces-store.js:3`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/namespaces-store.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/namespaces-store.js",
        "line": 3
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/namespaces-utils.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/namespaces-utils.js:3`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/namespaces-utils.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/namespaces-utils.js",
        "line": 3
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/ops.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/ops.js:3`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/ops.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/ops.js",
        "line": 3
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/session-git.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/session-git.js:5`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/session-git.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/session-git.js",
        "line": 5
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/cli/team.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/cli/team.js:7`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/cli/team.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/cli/team.js",
        "line": 7
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/content/validate.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/content/validate.js:4`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/content/validate.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/content/validate.js",
        "line": 4
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/hooks.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/hooks.js:5`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/hooks.js"
      },
      "evidence": "child_process",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/hooks.js",
        "line": 5
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (dist/embedding.js)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/embedding.js:178`): A hardcoded outbound call to a fixed external host inside server code is a classic exfiltration/telemetry channel — especially paired with reads of local data. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/embedding.js"
      },
      "evidence": "fetch(\"https://api.openai.com/v1/embeddings\"",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "dist/embedding.js",
        "line": 178
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (dist/shared/search-fallback.js)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/shared/search-fallback.js:88`): A shell/process command assembled from concatenated or interpolated values is command injection when any part is attacker-influenced — the OWASP canonical RCE flow. Verify what reaches the interpolated value. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/shared/search-fallback.js"
      },
      "evidence": "exec(`SELECT rowid, project, filename, type, content, path FROM docs WHERE ${",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "dist/shared/search-fallback.js",
        "line": 88
      }
    },
    {
      "ruleId": "MTC-CAP-006",
      "title": "Unconstrained command parameter \"command\" on \"add_custom_hook\"",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "Tool \"add_custom_hook\" takes a command-shaped parameter \"command\" with no enum/pattern constraint. Free-form, model- or attacker-controlled arguments reaching a shell is the command-injection precondition.",
      "remediation": "Constrain the parameter (enum/pattern), or build the command from a fixed template with escaped args.",
      "location": {
        "kind": "tool",
        "name": "add_custom_hook",
        "field": "inputSchema.properties.command"
      },
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "param": "command"
      }
    },
    {
      "ruleId": "MTC-CAP-006",
      "title": "Unconstrained command parameter \"command\" on \"remove_custom_hook\"",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "Tool \"remove_custom_hook\" takes a command-shaped parameter \"command\" with no enum/pattern constraint. Free-form, model- or attacker-controlled arguments reaching a shell is the command-injection precondition.",
      "remediation": "Constrain the parameter (enum/pattern), or build the command from a fixed template with escaped args.",
      "location": {
        "kind": "tool",
        "name": "remove_custom_hook",
        "field": "inputSchema.properties.command"
      },
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "param": "command"
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/data/access.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/data/access.js:114`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/data/access.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/data/access.js",
        "line": 114
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/init/setup.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/init/setup.js:45`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/init/setup.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/init/setup.js",
        "line": 45
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/link/context.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/link/context.js:28`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/link/context.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/link/context.js",
        "line": 28
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/link/link.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/link/link.js:50`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/link/link.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/link/link.js",
        "line": 50
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/link/skills.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/link/skills.js:19`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/link/skills.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/link/skills.js",
        "line": 19
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/phren-paths.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/phren-paths.js:95`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/phren-paths.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/phren-paths.js",
        "line": 95
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/profile-store.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/profile-store.js:57`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/profile-store.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/profile-store.js",
        "line": 57
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/project-config.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/project-config.js:65`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/project-config.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/project-config.js",
        "line": 65
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/shared/index.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/shared/index.js:45`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/shared/index.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/shared/index.js",
        "line": 45
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (dist/store-registry.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/store-registry.js:43`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
      "remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
      "location": {
        "kind": "server",
        "name": "dist/store-registry.js"
      },
      "evidence": "yaml.load(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "dist/store-registry.js",
        "line": 43
      }
    },
    {
      "ruleId": "MTC-CAP-005",
      "title": "Mutating tool \"add_custom_hook\" declares no destructiveHint",
      "category": "hygiene",
      "severity": "low",
      "confidence": "heuristic",
      "description": "Tool \"add_custom_hook\" can mutate/egress but declares no destructiveHint. Clients that don't default to spec-safe behavior may not prompt before running it.",
      "remediation": "Declare accurate annotations, and gate destructive tools on user confirmation regardless.",
      "location": {
        "kind": "tool",
        "name": "add_custom_hook"
      },
      "data": {
        "tags": [
          "external-sink",
          "code-exec",
          "sensitive-source"
        ]
      }
    },
    {
      "ruleId": "MTC-CAP-005",
      "title": "Mutating tool \"remove_custom_hook\" declares no destructiveHint",
      "category": "hygiene",
      "severity": "low",
      "confidence": "heuristic",
      "description": "Tool \"remove_custom_hook\" can mutate/egress but declares no destructiveHint. Clients that don't default to spec-safe behavior may not prompt before running it.",
      "remediation": "Declare accurate annotations, and gate destructive tools on user confirmation regardless.",
      "location": {
        "kind": "tool",
        "name": "remove_custom_hook"
      },
      "data": {
        "tags": [
          "code-exec"
        ]
      }
    },
    {
      "ruleId": "MTC-CAP-008",
      "title": "Unconstrained path parameter \"path\" on \"add_project\"",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "Tool \"add_project\" takes a path parameter \"path\" with no constraint. Without a canonicalize-and-contain check (not visible statically), this permits ../ traversal outside the intended root.",
      "remediation": "Resolve and verify the path stays within an allowed root; reject traversal sequences.",
      "location": {
        "kind": "tool",
        "name": "add_project",
        "field": "inputSchema.properties.path"
      },
      "data": {
        "param": "path"
      }
    }
  ],
  "toxicFlows": [
    {
      "id": "flow-1",
      "severity": "critical",
      "confidence": "strong",
      "untrustedInput": [
        "get_memory_detail"
      ],
      "sensitiveSource": [
        "add_custom_hook",
        "add_project"
      ],
      "externalSink": [
        "add_custom_hook",
        "remove_custom_hook"
      ],
      "selfContained": false,
      "path": [
        "get_memory_detail",
        "add_custom_hook",
        "remove_custom_hook"
      ],
      "pathWired": false,
      "description": "A cross-tool exfiltration chain exists: get_memory_detail → add_custom_hook → remove_custom_hook."
    },
    {
      "id": "flow-2",
      "severity": "high",
      "confidence": "strong",
      "untrustedInput": [],
      "sensitiveSource": [
        "add_custom_hook"
      ],
      "externalSink": [
        "add_custom_hook"
      ],
      "selfContained": true,
      "description": "Tool \"add_custom_hook\" both reads sensitive data and can send it externally."
    }
  ],
  "capabilities": [
    {
      "tool": "get_config",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "set_config",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "export_project",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "import_project",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "manage_project",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "auto_extract_findings",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "add_finding",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "supersede_finding",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "retract_finding",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "resolve_contradiction",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_contradictions",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "edit_finding",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "remove_finding",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "push_changes",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "search_fragments",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_related_docs",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "read_graph",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "link_findings",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "cross_project_fragments",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "list_hooks",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "toggle_hooks",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "add_custom_hook",
      "tags": [
        "external-sink",
        "code-exec",
        "sensitive-source"
      ],
      "reasons": {
        "external-sink": [
          "parameter \"webhook\""
        ],
        "code-exec": [
          "parameter \"command\""
        ],
        "sensitive-source": [
          "parameter \"secret\""
        ]
      }
    },
    {
      "tool": "remove_custom_hook",
      "tags": [
        "code-exec"
      ],
      "reasons": {
        "code-exec": [
          "parameter \"command\""
        ]
      }
    },
    {
      "tool": "pin_memory",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_truths",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "memory_feedback",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_notes",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "add_note",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "edit_note",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "remove_note",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "promote_note",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "add_project",
      "tags": [
        "sensitive-source"
      ],
      "reasons": {
        "sensitive-source": [
          "parameter \"path\""
        ]
      }
    },
    {
      "tool": "health_check",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "doctor_fix",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "list_hook_errors",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_review_queue",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "manage_review_item",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_memory_detail",
      "tags": [
        "untrusted-input"
      ],
      "reasons": {
        "untrusted-input": [
          "keyword \"fetch\""
        ]
      }
    },
    {
      "tool": "search_knowledge",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_project_summary",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "list_projects",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_findings",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "store_list",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "session_start",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "session_end",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "session_context",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "session_history",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "list_skills",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "read_skill",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "write_skill",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "remove_skill",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "toggle_skill",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_tasks",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "add_task",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "complete_task",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "remove_task",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "update_task",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "tidy_done_tasks",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "pin_task",
      "tags": [],
      "reasons": {}
    }
  ],
  "surfaceDigest": "8a90a349ec21080750b9bae0ecdf9860ed1ab9a5268ae4a6ae75ac9a2a47c32e",
  "stats": {
    "tools": 59,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 1,
      "high": 13,
      "medium": 14,
      "low": 3,
      "info": 0
    }
  }
}