Raw scan report

Codebrain — the complete, unedited output of the deterministic mcptrustchecker engine v1.5.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.5.0",
    "methodologyVersion": "mcptrustchecker-1.4"
  },
  "target": {
    "id": "codebrain",
    "source": {
      "kind": "package",
      "origin": "codebrain"
    },
    "server": {
      "name": "codebrain"
    }
  },
  "grade": "A",
  "score": {
    "score": 92,
    "grade": "A",
    "band": "A",
    "categorySubtotals": {
      "injection": 0,
      "exfiltration": 0,
      "permissions": 6.3,
      "supply-chain": 2.1,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "ruleId": "MTC-SRC-007",
        "category": "permissions",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 6.3
      },
      {
        "ruleId": "MTC-SUP-011",
        "category": "supply-chain",
        "severity": "low",
        "confidence": "strong",
        "rawWeight": 3,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 2.1
      }
    ],
    "gatesFired": [],
    "methodologyVersion": "mcptrustchecker-1.4"
  },
  "capability": {
    "level": "high",
    "reasons": [
      "can execute shell commands or code"
    ],
    "tags": [
      "code-exec"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": false,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "No tools were enumerated, so prompt-injection, capability and toxic-flow analysis had no tool surface to inspect. To grade a package’s real runtime tools, scan the running server: --command \"npx -y <package>\"."
    ]
  },
  "findings": [
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in server code (codebrain/graph/query.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/graph/query.py:797`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. 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": "codebrain/graph/query.py"
      },
      "evidence": "eval(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "codebrain/graph/query.py",
        "line": 797
      }
    },
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in server code (tests/test_vscode_extension.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tests/test_vscode_extension.py:243`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. 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": "tests/test_vscode_extension.py"
      },
      "evidence": "eval(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "tests/test_vscode_extension.py",
        "line": 243
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/actions/reviewer.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/actions/reviewer.py:280`): 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": "codebrain/actions/reviewer.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/actions/reviewer.py",
        "line": 280
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/actions/test_gen.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/actions/test_gen.py:276`): 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": "codebrain/actions/test_gen.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/actions/test_gen.py",
        "line": 276
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/cli.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/cli.py:1495`): 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": "codebrain/cli.py"
      },
      "evidence": "subprocess.check_output(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/cli.py",
        "line": 1495
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/diff_impact.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/diff_impact.py:144`): 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": "codebrain/diff_impact.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/diff_impact.py",
        "line": 144
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/equivalence.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/equivalence.py:143`): 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": "codebrain/equivalence.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/equivalence.py",
        "line": 143
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/graph/query.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/graph/query.py:797`): 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": "codebrain/graph/query.py"
      },
      "evidence": "exec(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/graph/query.py",
        "line": 797
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/hooks.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/hooks.py:24`): 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": "codebrain/hooks.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/hooks.py",
        "line": 24
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/indexer.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/indexer.py:117`): 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": "codebrain/indexer.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/indexer.py",
        "line": 117
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/rewriter.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/rewriter.py:1483`): 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": "codebrain/rewriter.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/rewriter.py",
        "line": 1483
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (codebrain/test_runner.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/test_runner.py:255`): 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": "codebrain/test_runner.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "codebrain/test_runner.py",
        "line": 255
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (codebrain/indexer.py)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`codebrain/indexer.py:127`): 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": "codebrain/indexer.py"
      },
      "evidence": "pickle.loads(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "codebrain/indexer.py",
        "line": 127
      }
    },
    {
      "ruleId": "MTC-SUP-011",
      "title": "Package has no source repository",
      "category": "supply-chain",
      "severity": "low",
      "confidence": "strong",
      "description": "\"codebrain\" declares no repository URL, so its published artifact cannot be compared against reviewable source.",
      "remediation": "Prefer packages that link to public, reviewable source.",
      "location": {
        "kind": "package",
        "name": "codebrain"
      }
    }
  ],
  "toxicFlows": [],
  "capabilities": [],
  "surfaceDigest": "4925697310c2853774c9b26168d696dc706d8bb88597c1dec1645463b31e6b53",
  "stats": {
    "tools": 0,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 12,
      "medium": 1,
      "low": 1,
      "info": 0
    }
  }
}