Raw scan report

Terrain Ai — the complete, unedited output of the deterministic mcptrustchecker engine v1.9.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.9.0",
    "methodologyVersion": "mcptrustchecker-1.9"
  },
  "target": {
    "id": "terrain-ai",
    "source": {
      "kind": "package",
      "origin": "terrain-ai"
    },
    "server": {
      "name": "terrain-ai"
    }
  },
  "grade": "C",
  "score": {
    "score": 76,
    "threatScore": 83,
    "grade": "C",
    "band": "C",
    "categorySubtotals": {
      "injection": 6.3,
      "exfiltration": 0,
      "permissions": 11.03,
      "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-009",
        "category": "injection",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 6.3
      },
      {
        "kind": "client",
        "term": "capability-exposure",
        "level": "high",
        "label": "capability blast radius (high) — client exposure if the model is manipulated",
        "appliedPenalty": 6
      },
      {
        "kind": "client",
        "term": "verification-discount",
        "level": "repo",
        "label": "publisher verification (public source) — no provenance, but the source is public and inspectable",
        "appliedPenalty": 1
      },
      {
        "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.9"
  },
  "capability": {
    "level": "high",
    "reasons": [
      "can send data / act on an external service",
      "can execute shell commands or code"
    ],
    "tags": [
      "code-exec",
      "external-sink"
    ]
  },
  "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-002",
      "title": "Shell/command execution in server code (npm-package/bin/cli.mjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`npm-package/bin/cli.mjs:15`): 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": "npm-package/bin/cli.mjs"
      },
      "evidence": ", execSync } from \"node:child_process\"; import { createInterface } from \"node:readline\"; import { existsSync, mkdirSync,",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "npm-package/bin/cli.mjs",
        "line": 15,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (terrain/entrypoints/cli/cli.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/entrypoints/cli/cli.py:2442`): 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": "terrain/entrypoints/cli/cli.py"
      },
      "evidence": "f npx: result = subprocess.run( [npx, \"terrain-ai@latest\", \"setup\"], shell=False,",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "terrain/entrypoints/cli/cli.py",
        "line": 2442,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (terrain/foundation/parsers/parser_loader.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/foundation/parsers/parser_loader.py:61`): 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": "terrain/foundation/parsers/parser_loader.py"
      },
      "evidence": "result = subprocess.run( [sys.executable, cs.SETUP_PY, cs.BUILD_EXT_CMD, cs.INPLACE_F",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "terrain/foundation/parsers/parser_loader.py",
        "line": 61,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (terrain/foundation/services/git_service.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/foundation/services/git_service.py:16`): 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": "terrain/foundation/services/git_service.py"
      },
      "evidence": "y: result = subprocess.run( [\"git\", \"rev-parse\", \"HEAD\"], cwd=repo_path,",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "terrain/foundation/services/git_service.py",
        "line": 16,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (npm-package/bin/cli.mjs)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`npm-package/bin/cli.mjs:428`): 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": "npm-package/bin/cli.mjs"
      },
      "evidence": ", \"d = json.loads(urllib.request.urlopen('https://pypi.org/pypi/terrain-ai/json', timeout=5).read())\", \"prin",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "npm-package/bin/cli.mjs",
        "line": 428,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (terrain/entrypoints/cli/cli.py)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/entrypoints/cli/cli.py:2588`): 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": "terrain/entrypoints/cli/cli.py"
      },
      "evidence": "try: with urllib.request.urlopen( \"https://pypi.org/pypi/terrain-ai/json\", timeout=10",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "terrain/entrypoints/cli/cli.py",
        "line": 2588,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (npm-package/bin/cli.mjs)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`npm-package/bin/cli.mjs:810`): 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": "npm-package/bin/cli.mjs"
      },
      "evidence": ") { try { execSync(`claude mcp remove code-graph-builder -s ${scope}`, { stdio: \"pipe\", shell: true });",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "npm-package/bin/cli.mjs",
        "line": 810,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (terrain/entrypoints/cli/cli.py)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/entrypoints/cli/cli.py:2366`): 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": "terrain/entrypoints/cli/cli.py"
      },
      "evidence": "fh: data = pickle.load(fh) if isinstance(data, dict) and \"vector_store\" in data: store",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "terrain/entrypoints/cli/cli.py",
        "line": 2366,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (terrain/entrypoints/cli/commands_cli.py)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/entrypoints/cli/commands_cli.py:124`): 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": "terrain/entrypoints/cli/commands_cli.py"
      },
      "evidence": ") as fh: data = pickle.load(fh) if isinstance(data, dict) and \"vector_store\" in data: store = data[",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "terrain/entrypoints/cli/commands_cli.py",
        "line": 124,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-007",
      "title": "Unsafe deserialization (terrain/entrypoints/mcp/pipeline.py)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`terrain/entrypoints/mcp/pipeline.py:1169`): 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": "terrain/entrypoints/mcp/pipeline.py"
      },
      "evidence": "fh: data = pickle.load(fh) records: list[VectorRecord] = data.get(\"records\", []) func_map:",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-007",
        "file": "terrain/entrypoints/mcp/pipeline.py",
        "line": 1169,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (scripts/install_global.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/install_global.py:118`): 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": "scripts/install_global.py"
      },
      "evidence": "CT_ROOT)) result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: print",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "scripts/install_global.py",
        "line": 118,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (terrain/examples/generate_wiki.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`terrain/examples/generate_wiki.py:190`): 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": "terrain/examples/generate_wiki.py"
      },
      "evidence": "y: result = subprocess.run( [MMDC_PATH, \"-i\", tmp_in, \"-o\", tmp_out], captur",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "terrain/examples/generate_wiki.py",
        "line": 190,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (terrain/examples/test_cli_demo.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`terrain/examples/test_cli_demo.py:99`): 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": "terrain/examples/test_cli_demo.py"
      },
      "evidence": "-version\") result = subprocess.run( [sys.executable, \"-m\", \"terrain.cli\", \"--version\"], capture_outp",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "terrain/examples/test_cli_demo.py",
        "line": 99,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/entrypoints/test_get_merge_diff.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/entrypoints/test_get_merge_diff.py:33`): 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": "tests/entrypoints/test_get_merge_diff.py"
      },
      "evidence": "ture branch.\"\"\" subprocess.run([\"git\", \"init\", \"--initial-branch=main\"], cwd=tmp_path, check=True, capture_outpu",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/entrypoints/test_get_merge_diff.py",
        "line": 33,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/entrypoints/test_mcp_e2e.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/entrypoints/test_mcp_e2e.py:49`): 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": "tests/entrypoints/test_mcp_e2e.py"
      },
      "evidence": "hon environment.\"\"\" subprocess.run( [sys.executable, \"-m\", \"pip\", \"install\", \"--force-reinstall\", \"--quiet\",",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/entrypoints/test_mcp_e2e.py",
        "line": 49,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/entrypoints/test_terrain_status.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/entrypoints/test_terrain_status.py:185`): 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": "tests/entrypoints/test_terrain_status.py"
      },
      "evidence": "ath: Path) -> None: subprocess.run([\"git\", \"init\", \"--initial-branch=main\"], cwd=path, check=True, capture_output=Tr",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/entrypoints/test_terrain_status.py",
        "line": 185,
        "nonRuntime": true
      }
    }
  ],
  "toxicFlows": [],
  "capabilities": [],
  "surfaceDigest": "afd0176697bacc970f8dcdb095c514d2960252370fde3f72a645e378caf547c8",
  "stats": {
    "tools": 0,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 4,
      "medium": 6,
      "low": 6,
      "info": 0
    }
  }
}