Raw scan report

Thetacog — 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": "thetacog-mcp",
    "source": {
      "kind": "package",
      "origin": "thetacog-mcp"
    },
    "server": {
      "name": "thetacog-mcp"
    }
  },
  "grade": "B",
  "score": {
    "score": 80,
    "threatScore": 87,
    "grade": "B",
    "band": "B",
    "categorySubtotals": {
      "injection": 12.29,
      "exfiltration": 0,
      "permissions": 0,
      "supply-chain": 1.2,
      "network": 0,
      "hygiene": 0
    },
    "vector": [
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-009",
        "category": "injection",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 1,
        "appliedPenalty": 6.3
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-009",
        "category": "injection",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.5,
        "appliedPenalty": 3.15
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-009",
        "category": "injection",
        "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": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "kind": "threat",
        "ruleId": "MTC-SRC-009",
        "category": "injection",
        "severity": "medium",
        "confidence": "strong",
        "rawWeight": 9,
        "confidenceMult": 0.7,
        "diminishingFactor": 0.1,
        "appliedPenalty": 0.63
      },
      {
        "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": "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.13"
  },
  "capability": {
    "level": "high",
    "reasons": [
      "can send data / act on an external service",
      "can execute shell commands or code"
    ],
    "tags": [
      "external-sink",
      "code-exec"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": true,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "Tools were statically extracted from the published source (14 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-002",
      "title": "Shell/command execution in server code (dashboard.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`dashboard.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": "dashboard.js"
      },
      "evidence": "rt { spawn } from 'node:child_process'; import Database from 'better-sqlite3'; const PORT = parseInt(process.env.THETAC",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "dashboard.js",
        "line": 24,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (gmail-sync.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`gmail-sync.js:36`): 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": "gmail-sync.js"
      },
      "evidence": "port { execSync } from 'child_process'; const REPO = (() => { try { return execSync('git rev-parse --show-toplevel',",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "gmail-sync.js",
        "line": 36,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/pmu-inspect.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/pmu-inspect.js: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": "lib/pmu-inspect.js"
      },
      "evidence": "spawnSync } from 'node:child_process'; const REPO_ROOT = process.cwd(); const STATE_PATH = resolve(REPO_ROOT, 'data/pm",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/pmu-inspect.js",
        "line": 15,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (next-engine.mjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`next-engine.mjs:26`): 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": "next-engine.mjs"
      },
      "evidence": "{ execSync } from 'node:child_process'; import { homedir } from 'node:os'; import { join, dirname } from 'node:path'; im",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "next-engine.mjs",
        "line": 26,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (overview.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`overview.js:20`): 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": "overview.js"
      },
      "evidence": "port { execSync } from 'child_process'; // HTML basename -> room key (matches .thetacog/gemini-sessions.json keys) cons",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "overview.js",
        "line": 20,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (gmail-sync.js)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`gmail-sync.js:102`): 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": "gmail-sync.js"
      },
      "evidence": ") { const res = await fetch(`https://gmail.googleapis.com/gmail/v1/users/me/${pathname}`, { headers: { Authorizati",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "gmail-sync.js",
        "line": 102,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (gmail-sync.js)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`gmail-sync.js:120`): 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": "gmail-sync.js"
      },
      "evidence": "onsent + '\\n'); try { execSync(`open '${consent}'`); } catch { /* headless — paste by hand */ } const code = await n",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "gmail-sync.js",
        "line": 120,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (next-engine.mjs)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`next-engine.mjs:54`): 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": "next-engine.mjs"
      },
      "evidence": "try { const out = execSync( `git -c core.quotepath=false log --since='${days} days ago' --pretty=format:'%h%",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "next-engine.mjs",
        "line": 54,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (overview.js)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`overview.js:266`): 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": "overview.js"
      },
      "evidence": "lList]; const raw = execSync( `git -C \"${repoRoot}\" log ${args.map(a => `\"${a}\"`).join(' ')}`, { encodin",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "overview.js",
        "line": 266,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (server.js)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`server.js:213`): 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": "server.js"
      },
      "evidence": "hooks.sh'); try { execSync(`bash ${JSON.stringify(installer)} --pre-push`, { stdio: 'inherit' }); } catch (e) {",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "server.js",
        "line": 213,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (src/lib/pmu/cache-witness.mjs)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`src/lib/pmu/cache-witness.mjs:76`): 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": "src/lib/pmu/cache-witness.mjs"
      },
      "evidence": "{ out = JSON.parse(execSync(`\"${PMU_BIN}\" --sense`, { input: JSON.stringify({ claims: [doc], targets: _target",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "src/lib/pmu/cache-witness.mjs",
        "line": 76,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint in packaging/dev tooling (scripts/pmu/big-map-axes.mjs)",
      "category": "exfiltration",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu/big-map-axes.mjs:60`): 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": "scripts/pmu/big-map-axes.mjs"
      },
      "evidence": "const r = await fetch(`https://raw.githubusercontent.com/${m[1]}/HEAD/axes/${x}/${y}/${z}.dump.json`); i",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "scripts/pmu/big-map-axes.mjs",
        "line": 60,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint in packaging/dev tooling (scripts/pmu/map-crawl.mjs)",
      "category": "exfiltration",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu/map-crawl.mjs:17`): 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": "scripts/pmu/map-crawl.mjs"
      },
      "evidence": "=> { const r = await fetch('https://api.github.com' + path, { headers: { accept: 'application/vnd.github+json' } });",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "scripts/pmu/map-crawl.mjs",
        "line": 17,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint in packaging/dev tooling (scripts/pmu/verify-peer.mjs)",
      "category": "exfiltration",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu/verify-peer.mjs:29`): 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": "scripts/pmu/verify-peer.mjs"
      },
      "evidence": "e) => { const r = await fetch(`https://raw.githubusercontent.com/${repo}/HEAD/${file}`); return r.ok ? r.text() : null;",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "scripts/pmu/verify-peer.mjs",
        "line": 29,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint in packaging/dev tooling (scripts/rewrite/cli.mjs)",
      "category": "exfiltration",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/rewrite/cli.mjs:123`): 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": "scripts/rewrite/cli.mjs"
      },
      "evidence": "y { const r = await fetch(`https://api.telegram.org/bot${token}/sendPhoto`, { method: 'POST', body: form }); con",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "scripts/rewrite/cli.mjs",
        "line": 123,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (postinstall.js)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`postinstall.js: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": "postinstall.js"
      },
      "evidence": "; import { exec } from 'child_process'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirna",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "postinstall.js",
        "line": 16,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (scripts/bundle-pmu.mjs)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/bundle-pmu.mjs:19`): 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/bundle-pmu.mjs"
      },
      "evidence": "spawnSync } from 'node:child_process'; import { tmpdir } from 'node:os'; const PKG = resolve(dirname(fileURLToPath(imp",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "scripts/bundle-pmu.mjs",
        "line": 19,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (scripts/mesh/mesh-up.mjs)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/mesh/mesh-up.mjs:25`): 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/mesh/mesh-up.mjs"
      },
      "evidence": "spawnSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; import path from 'node:path'; const H",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "scripts/mesh/mesh-up.mjs",
        "line": 25,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (scripts/pmu-demo.mjs)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu-demo.mjs:39`): 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/pmu-demo.mjs"
      },
      "evidence": "spawnSync } from 'node:child_process'; import { compress } from '../lib/pmu/compress.mjs'; import { openPrimer } from",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "scripts/pmu-demo.mjs",
        "line": 39,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (scripts/pmu-report.mjs)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu-report.mjs:27`): 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/pmu-report.mjs"
      },
      "evidence": "rt { spawn } from 'node:child_process'; import { compress } from '../lib/pmu/compress.mjs'; const __dirname = dirname(",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "scripts/pmu-report.mjs",
        "line": 27,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal in packaging/dev tooling (scripts/pmu/panel-door.mjs)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`scripts/pmu/panel-door.mjs:97`): 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": "scripts/pmu/panel-door.mjs"
      },
      "evidence": "ncircledPanel } = await import(RENDERER)); } catch (e) { return { png: null, dataUri: null, meta: null, regions: [",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "scripts/pmu/panel-door.mjs",
        "line": 97,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SUP-010",
      "title": "Package runs install-time scripts (postinstall)",
      "category": "supply-chain",
      "severity": "low",
      "confidence": "heuristic",
      "description": "\"thetacog-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": "thetacog-mcp"
      },
      "evidence": "node postinstall.js",
      "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": "thetacog-detect",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-status",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-switch",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-open",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-todo",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-stream",
      "tags": [
        "external-sink"
      ],
      "reasons": {
        "external-sink": [
          "keyword \"send_message\""
        ]
      }
    },
    {
      "tool": "thetacog-export",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-terminal",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog_overview",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-pmu-inspect",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "pmu_verify",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "write_tape_intent",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "read_tape_receipt",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "thetacog-next",
      "tags": [],
      "reasons": {}
    }
  ],
  "surfaceDigest": "9ef4639eb52df39c0bd35d332c34fb429c46a5db1dbc0a2eeebeb1a6f16c551d",
  "stats": {
    "tools": 14,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 5,
      "medium": 6,
      "low": 11,
      "info": 0
    }
  }
}