Raw scan report

Token Optimizer — the complete, unedited output of the deterministic mcptrustchecker engine v1.13.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.13.0",
    "methodologyVersion": "mcptrustchecker-1.13"
  },
  "target": {
    "id": "@ooples/token-optimizer-mcp",
    "source": {
      "kind": "package",
      "origin": "@ooples/token-optimizer-mcp"
    },
    "server": {
      "name": "@ooples/token-optimizer-mcp"
    }
  },
  "grade": "A",
  "score": {
    "score": 93,
    "threatScore": 99,
    "grade": "A",
    "band": "A",
    "categorySubtotals": {
      "injection": 0,
      "exfiltration": 0,
      "permissions": 0,
      "supply-chain": 1.2,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "kind": "threat",
        "ruleId": "MTC-SUP-010",
        "category": "supply-chain",
        "severity": "low",
        "confidence": "heuristic",
        "rawWeight": 3,
        "confidenceMult": 0.4,
        "diminishingFactor": 1,
        "appliedPenalty": 1.2
      },
      {
        "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": "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.13"
  },
  "capability": {
    "level": "high",
    "reasons": [
      "can execute shell commands or code"
    ],
    "tags": [
      "code-exec"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": true,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "Tools were statically extracted from the published source (11 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-SRC-001",
      "title": "Dynamic code execution in server code (dist/tools/code-analysis/smart-security.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/code-analysis/smart-security.js:190`): 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": "dist/tools/code-analysis/smart-security.js"
      },
      "evidence": ", name: 'Unsafe eval()', category: 'unsafe-eval', severity: 'critical', pattern: /\\beval",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "dist/tools/code-analysis/smart-security.js",
        "line": 190,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (cli-wrapper.mjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`cli-wrapper.mjs:17`): 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": "cli-wrapper.mjs"
      },
      "evidence": "import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; impor",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "cli-wrapper.mjs",
        "line": 17,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/server/daemon.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/server/daemon.js: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": "dist/server/daemon.js"
      },
      "evidence": "import { spawn } from 'child_process'; import { fileURLToPath } from 'url'; const DAEMON_VERSION = '1.0.0'; const PLATF",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/server/daemon.js",
        "line": 24,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/tools/build-systems/run-node-bin.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/build-systems/run-node-bin.js:21`): 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/tools/build-systems/run-node-bin.js"
      },
      "evidence": "import { spawn, } from 'child_process'; import { existsSync, readFileSync } from 'fs'; import { join, dirname, resolve }",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/tools/build-systems/run-node-bin.js",
        "line": 21,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/tools/build-systems/smart-docker.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/build-systems/smart-docker.js:10`): 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/tools/build-systems/smart-docker.js"
      },
      "evidence": "import { spawn } from 'child_process'; import { CacheEngine } from '../../core/cache-engine.js'; import { createHash }",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/tools/build-systems/smart-docker.js",
        "line": 10,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/tools/build-systems/smart-network.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/build-systems/smart-network.js:11`): 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/tools/build-systems/smart-network.js"
      },
      "evidence": "import { spawn } from 'child_process'; import { assertSafeArg } from '../../utils/safe-exec.js'; import { CacheEngine }",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/tools/build-systems/smart-network.js",
        "line": 11,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/tools/build-systems/smart-system-metrics.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/build-systems/smart-system-metrics.js:10`): 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/tools/build-systems/smart-system-metrics.js"
      },
      "evidence": "import { spawn } from 'child_process'; import { assertSafePathArg } from '../../utils/safe-exec.js'; import { parseWind",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/tools/build-systems/smart-system-metrics.js",
        "line": 10,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/tools/system-operations/smart-process.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/tools/system-operations/smart-process.js:14`): 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/tools/system-operations/smart-process.js"
      },
      "evidence": "import { spawn } from 'child_process'; import { execFileSafe, assertSafeArg } from '../../utils/safe-exec.js'; import {",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/tools/system-operations/smart-process.js",
        "line": 14,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (dist/utils/safe-exec.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dist/utils/safe-exec.js:21`): 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/utils/safe-exec.js"
      },
      "evidence": "FileSync, spawn } from 'child_process'; import { promisify } from 'util'; const execFileAsyncImpl = promisify(execFile);",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dist/utils/safe-exec.js",
        "line": 21,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (hooks-core/doctor.mjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`hooks-core/doctor.mjs:21`): 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": "hooks-core/doctor.mjs"
      },
      "evidence": "ync, spawn } from 'node:child_process'; import { randomBytes } from 'node:crypto'; import { existsSync, statSync, readFi",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "hooks-core/doctor.mjs",
        "line": 21,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (integrations/cline/hooks/token-optimizer/lib/doctor.mjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`integrations/cline/hooks/token-optimizer/lib/doctor.mjs:23`): 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": "integrations/cline/hooks/token-optimizer/lib/doctor.mjs"
      },
      "evidence": "ync, spawn } from 'node:child_process'; import { randomBytes } from 'node:crypto'; import { existsSync, statSync, readFi",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "integrations/cline/hooks/token-optimizer/lib/doctor.mjs",
        "line": 23,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal (dist/tools/advanced-caching/smart-cache.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "In the server's implementation (`dist/tools/advanced-caching/smart-cache.js:132`): 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": "dist/tools/advanced-caching/smart-cache.js"
      },
      "evidence": "data = await this.import(options); break; default: throw n",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "dist/tools/advanced-caching/smart-cache.js",
        "line": 132,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal (dist/tools/code-analysis/smart-imports.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "In the server's implementation (`dist/tools/code-analysis/smart-imports.js:391`): 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": "dist/tools/code-analysis/smart-imports.js"
      },
      "evidence": "dImports.length} unused import(s) from '${imp.module}': ${imp.unusedImports.join(', ')}`, suggestion",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "dist/tools/code-analysis/smart-imports.js",
        "line": 391,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal (dist/tools/intelligence/hooks-core-loader.js)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "In the server's implementation (`dist/tools/intelligence/hooks-core-loader.js:163`): 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": "dist/tools/intelligence/hooks-core-loader.js"
      },
      "evidence": "{ return (await import(bundled)); } catch (bundledError) { const fallback = fallbackDir();",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "dist/tools/intelligence/hooks-core-loader.js",
        "line": 163,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SUP-010",
      "title": "Package runs install-time scripts (postinstall)",
      "category": "supply-chain",
      "severity": "low",
      "confidence": "heuristic",
      "description": "\"@ooples/token-optimizer-mcp\" executes postinstall script(s) at install time. An install hook runs at install time; most are routine build/setup, but review what it does before trusting it.",
      "remediation": "Review the scripts; install with --ignore-scripts where possible and vet what they do.",
      "location": {
        "kind": "package",
        "name": "@ooples/token-optimizer-mcp"
      },
      "evidence": "node scripts/postinstall.cjs",
      "owasp": "LLM03:2025 Supply Chain",
      "references": [
        "https://github.com/ossf/package-analysis",
        "https://owasp.org/www-project-top-10-ci-cd-security-risks/"
      ],
      "data": {
        "scripts": [
          "postinstall"
        ]
      }
    }
  ],
  "toxicFlows": [],
  "capabilities": [
    {
      "tool": "optimize_text",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_cached",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "count_tokens",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "compress_text",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "decompress_text",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_cache_stats",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "clear_cache",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "analyze_optimization",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "get_session_stats",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "optimize_session",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "analyze_project_tokens",
      "tags": [],
      "reasons": {}
    }
  ],
  "surfaceDigest": "d357447b8ce68f2f3615ed57f3ca9d45df9ee9753a41283f7a2519fa76284a28",
  "stats": {
    "tools": 11,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 11,
      "medium": 3,
      "low": 1,
      "info": 0
    }
  }
}