Raw scan report

Affinity Sdk — 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": "affinity-sdk",
    "source": {
      "kind": "package",
      "origin": "affinity-sdk"
    },
    "server": {
      "name": "affinity-sdk"
    }
  },
  "grade": "F",
  "score": {
    "score": 54,
    "threatScore": 61,
    "grade": "F",
    "band": "F",
    "gateCap": "C",
    "categorySubtotals": {
      "injection": 15.4,
      "exfiltration": 22,
      "permissions": 0,
      "supply-chain": 2.1,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-008",
        "category": "exfiltration",
        "severity": "high",
        "confidence": "confirmed",
        "rawWeight": 22,
        "confidenceMult": 1,
        "diminishingFactor": 1,
        "appliedPenalty": 22
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-010",
        "category": "injection",
        "severity": "high",
        "confidence": "strong",
        "rawWeight": 22,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 15.4
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SUP-011",
        "category": "supply-chain",
        "severity": "low",
        "confidence": "strong",
        "rawWeight": 3,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 2.1
      },
      {
        "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": [
      "1 confirmed high finding → grade capped at C"
    ],
    "methodologyVersion": "mcptrustchecker-1.6"
  },
  "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-008",
      "title": "Hardcoded JSON Web Token in server code (tests/mcp/test_query_cursor.py)",
      "category": "exfiltration",
      "severity": "high",
      "confidence": "confirmed",
      "description": "A live-looking JSON Web Token is hardcoded in `tests/mcp/test_query_cursor.py:425`. Secrets in source ship to everyone who installs the package and are a direct credential leak.",
      "remediation": "Remove the secret, rotate it, and load credentials from the environment or a secret store.",
      "location": {
        "kind": "server",
        "name": "tests/mcp/test_query_cursor.py"
      },
      "evidence": "JSON Web Token: eyJh…(redacted)",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "secretType": "jwt",
        "file": "tests/mcp/test_query_cursor.py",
        "line": 425
      }
    },
    {
      "ruleId": "MTC-SRC-010",
      "title": "Dynamic evaluation of a non-literal value (affinity/cli/commands/completion_cmd.py)",
      "category": "injection",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`affinity/cli/commands/completion_cmd.py:24`): Evaluating a runtime value as code (rather than a fixed literal) executes whatever reaches it — a direct RCE primitive, and almost never necessary in legitimate 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": "affinity/cli/commands/completion_cmd.py"
      },
      "evidence": "eval (",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-010",
        "file": "affinity/cli/commands/completion_cmd.py",
        "line": 24
      }
    },
    {
      "ruleId": "MTC-SRC-001",
      "title": "Dynamic code execution in server code (affinity/cli/commands/completion_cmd.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`affinity/cli/commands/completion_cmd.py:24`): 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": "affinity/cli/commands/completion_cmd.py"
      },
      "evidence": "eval (",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "affinity/cli/commands/completion_cmd.py",
        "line": 24
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (affinity/_internal/keyfile.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`affinity/_internal/keyfile.py:81`): 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": "affinity/_internal/keyfile.py"
      },
      "evidence": "shell=True",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "affinity/_internal/keyfile.py",
        "line": 81
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (affinity/cli/update_check.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`affinity/cli/update_check.py:250`): 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": "affinity/cli/update_check.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "affinity/cli/update_check.py",
        "line": 250
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (tests/test_cli_pre_xaffinity_hook.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tests/test_cli_pre_xaffinity_hook.py:43`): 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_cli_pre_xaffinity_hook.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_cli_pre_xaffinity_hook.py",
        "line": 43
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (tests/test_cli_session_setup_hook.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tests/test_cli_session_setup_hook.py:29`): 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_cli_session_setup_hook.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_cli_session_setup_hook.py",
        "line": 29
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (tests/test_cli_update_check.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tests/test_cli_update_check.py:532`): 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_cli_update_check.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tests/test_cli_update_check.py",
        "line": 532
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (tools/generate_mcp_command_registry.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tools/generate_mcp_command_registry.py:53`): 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": "tools/generate_mcp_command_registry.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tools/generate_mcp_command_registry.py",
        "line": 53
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (tools/sync_mcp_registry.py)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`tools/sync_mcp_registry.py:42`): 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": "tools/sync_mcp_registry.py"
      },
      "evidence": "subprocess.run(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "tools/sync_mcp_registry.py",
        "line": 42
      }
    },
    {
      "ruleId": "MTC-SUP-011",
      "title": "Package has no source repository",
      "category": "supply-chain",
      "severity": "low",
      "confidence": "strong",
      "description": "\"affinity-sdk\" 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": "affinity-sdk"
      }
    },
    {
      "ruleId": "MTC-SUP-012",
      "title": "Package has no license",
      "category": "hygiene",
      "severity": "info",
      "confidence": "strong",
      "description": "\"affinity-sdk\" has no declared license. This is a legal/reuse concern, not a security finding.",
      "location": {
        "kind": "package",
        "name": "affinity-sdk"
      }
    }
  ],
  "toxicFlows": [],
  "capabilities": [],
  "surfaceDigest": "24626005ff4aedd1e7c145c9871269e54d498e20d6a7e01dd9323c8dc4b5354a",
  "stats": {
    "tools": 0,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 10,
      "medium": 0,
      "low": 1,
      "info": 1
    }
  }
}