Raw scan report

Pyddock — 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": "pyddock",
    "source": {
      "kind": "package",
      "origin": "pyddock"
    },
    "server": {
      "name": "pyddock"
    }
  },
  "grade": "A",
  "score": {
    "score": 93,
    "threatScore": 100,
    "grade": "A",
    "band": "A",
    "categorySubtotals": {
      "injection": 0,
      "exfiltration": 0,
      "permissions": 0,
      "supply-chain": 0,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "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": [
      "reads sensitive or local data",
      "has a read → egress path (a data-exfiltration surface)",
      "can execute shell commands or code"
    ],
    "tags": [
      "code-exec",
      "sensitive-source"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": true,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "Tools were statically extracted from the published source (9 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-004",
      "title": "Sensitive-source and external-sink co-exist",
      "category": "exfiltration",
      "severity": "high",
      "confidence": "strong",
      "description": "Tools that read sensitive data ([fs_readfile]) and tools that can send data out ([run_shell]) are exposed together. An agent can move private data to the sink.",
      "remediation": "Keep secret-reading and egress capabilities on separate, separately-approved servers.",
      "location": {
        "kind": "flow",
        "name": "fs_readfile → run_shell"
      },
      "evidence": "sources [fs_readfile] → sinks [run_shell]",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "references": [],
      "data": {
        "sources": [
          "fs_readfile"
        ],
        "sinks": [
          "run_shell"
        ]
      }
    },
    {
      "ruleId": "MTC-CAP-001",
      "title": "Tool \"run_shell\" exposes command/code execution",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "Tool \"run_shell\" appears to run shell commands or evaluate code (keyword \"shell\" in tool name). 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": "run_shell"
      },
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "tags": [
          "code-exec"
        ]
      }
    },
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in server code (src/pyddock/ast_validator.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/ast_validator.py:247`): 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": "src/pyddock/ast_validator.py"
      },
      "evidence": "oth simple calls (e.g., eval(...)) and attribute calls (e.g., obj.eval(...)). \"\"\" if isinstan",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "src/pyddock/ast_validator.py",
        "line": 247,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in server code (src/pyddock/executor.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/executor.py:235`): 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": "src/pyddock/executor.py"
      },
      "evidence": "f\" _result = eval(compile(_last_expr, {SNIPPET_FILENAME!r}, 'eval'), _ns)\", f\" if _result is",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "src/pyddock/executor.py",
        "line": 235,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/_audit_enforcement.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/_audit_enforcement.py:132`): 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": "src/pyddock/_audit_enforcement.py"
      },
      "evidence": "tly redirected the spawn (the ``Popen([...], executable=...)`` spoof). Applies to every spawn — the proxy forw",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/_audit_enforcement.py",
        "line": 132,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/_process_utils.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/_process_utils.py:193`): 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": "src/pyddock/_process_utils.py"
      },
      "evidence": ".name == \"nt\": subprocess.run( [\"taskkill\", \"/F\", \"/T\", \"/PID\", str(proc.pid)], captu",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/_process_utils.py",
        "line": 193,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/_subprocess_patch.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/_subprocess_patch.py:6`): 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": "src/pyddock/_subprocess_patch.py"
      },
      "evidence": "ll policies, and blocks os.system(). \"\"\" from __future__ import annotations import pathlib import sys from typing",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/_subprocess_patch.py",
        "line": 6,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/executor.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/executor.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": "src/pyddock/executor.py"
      },
      "evidence": "v() proc = subprocess.Popen( [str(python_path), tmp_file.name], stdout=su",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/executor.py",
        "line": 99,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/server.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/server.py:40`): 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": "src/pyddock/server.py"
      },
      "evidence": "To pass env context to subprocess.run() calls, read from os.environ in your snippet.\", \"\", \"subproces",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/server.py",
        "line": 40,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/shell_executor.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/shell_executor.py:371`): 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": "src/pyddock/shell_executor.py"
      },
      "evidence": "captured-reference spawn (e.g. GitPython) forwards from the environment. Raises PermissionError on the first",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/shell_executor.py",
        "line": 371,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (src/pyddock/venv_manager.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`src/pyddock/venv_manager.py:207`): 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": "src/pyddock/venv_manager.py"
      },
      "evidence": ": result = subprocess.run( [str(python), \"-c\", f\"import {package_name}\"],",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "src/pyddock/venv_manager.py",
        "line": 207,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal (src/pyddock/_enforcement.py)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "In the server's implementation (`src/pyddock/_enforcement.py:159`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. 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": "src/pyddock/_enforcement.py"
      },
      "evidence": "rded_import on builtins.__import__ (fires for ALL imports) Both use the same logic: top-level module in allow",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "src/pyddock/_enforcement.py",
        "line": 159,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-CAP-005",
      "title": "Mutating tool \"run_shell\" declares no destructiveHint",
      "category": "hygiene",
      "severity": "low",
      "confidence": "heuristic",
      "description": "Tool \"run_shell\" 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": "run_shell"
      },
      "data": {
        "tags": [
          "code-exec"
        ]
      }
    },
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in packaging/dev tooling (tests/test_executor.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_executor.py:169`): 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_executor.py"
      },
      "evidence": "actual_path = eval(result.result) assert Path(actual_path).resolve() == workspace.resolve() clas",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "tests/test_executor.py",
        "line": 169,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/test_audit_hook_backstop.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_audit_hook_backstop.py:712`): 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/test_audit_hook_backstop.py"
      },
      "evidence": "y:\\n\" \" subprocess.run(['git', 'push', 'origin'])\\n\" \" print('SHOULD NOT REACH')\\n\"",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_audit_hook_backstop.py",
        "line": 712,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/test_deny_always_wins.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_deny_always_wins.py:196`): 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/test_deny_always_wins.py"
      },
      "evidence": "y:\\n\" \" subprocess.run(['git', 'fetch', 'ext::sh -c evil'])\\n\" \" print('SHOULD NOT REACH",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_deny_always_wins.py",
        "line": 196,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (tests/test_env_policy.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`tests/test_env_policy.py:348`): 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/test_env_policy.py"
      },
      "evidence": ":\\n\" f\" subprocess.run(['git', 'status'], env={poison})\\n\" \" print('OUTCOME:NOERROR')\\n\"",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_env_policy.py",
        "line": 348,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SUP-012",
      "title": "Package has no license",
      "category": "hygiene",
      "severity": "info",
      "confidence": "strong",
      "description": "\"pyddock\" has no declared license. This is a legal/reuse concern, not a security finding.",
      "location": {
        "kind": "package",
        "name": "pyddock"
      }
    }
  ],
  "toxicFlows": [
    {
      "id": "flow-1",
      "severity": "high",
      "confidence": "strong",
      "untrustedInput": [],
      "sensitiveSource": [
        "fs_readfile"
      ],
      "externalSink": [
        "run_shell"
      ],
      "selfContained": false,
      "path": [
        "fs_readfile",
        "run_shell"
      ],
      "pathWired": false,
      "description": "A sensitive-source → external-sink chain exists: fs_readfile → run_shell."
    }
  ],
  "capabilities": [
    {
      "tool": "run_python",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "run_shell",
      "tags": [
        "code-exec"
      ],
      "reasons": {
        "code-exec": [
          "keyword \"shell\" in tool name"
        ]
      }
    },
    {
      "tool": "fs_readfile",
      "tags": [
        "sensitive-source"
      ],
      "reasons": {
        "sensitive-source": [
          "keyword \"readfile\""
        ]
      }
    },
    {
      "tool": "fs_stat",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "fs_append",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "fs_delete",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "fs_str_replace",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "fs_find",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "fs_grep",
      "tags": [],
      "reasons": {}
    }
  ],
  "surfaceDigest": "ee3438ca3835792a0721a5cf8bfd0690145aed52b7b9afbae8468dc07d2bb4ee",
  "stats": {
    "tools": 9,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 11,
      "medium": 1,
      "low": 5,
      "info": 1
    }
  }
}