Raw scan report

Booklib Core — 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": "@booklib/core",
    "source": {
      "kind": "package",
      "origin": "@booklib/core"
    },
    "server": {
      "name": "@booklib/core"
    }
  },
  "grade": "B",
  "score": {
    "score": 87,
    "threatScore": 94,
    "grade": "B",
    "band": "B",
    "categorySubtotals": {
      "injection": 6.3,
      "exfiltration": 0,
      "permissions": 0,
      "supply-chain": 0,
      "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": "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": [
      "code-exec",
      "external-sink"
    ]
  },
  "coverage": {
    "level": "source",
    "inputs": {
      "toolSurface": true,
      "implementationSource": true,
      "packageMetadata": true,
      "liveTransport": false
    },
    "caveats": [
      "Tools were statically extracted from the published source (5 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 (bin/skills.cjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`bin/skills.cjs:457`): 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": "bin/skills.cjs"
      },
      "evidence": ", `few expectations per eval (avg ${(avgExp).toFixed(1)}, target 5+)`)); } } const refsDir = path.join(skillDir",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-001",
        "file": "bin/skills.cjs",
        "line": 457,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (bin/skills.cjs)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`bin/skills.cjs:8`): 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": "bin/skills.cjs"
      },
      "evidence": "spawnSync } = require('child_process'); const args = process.argv.slice(2); const command = args[0]; const skillsRoot",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "bin/skills.cjs",
        "line": 8,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/agent-detector.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/agent-detector.js:4`): 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/agent-detector.js"
      },
      "evidence": "{ execSync } from 'node:child_process'; /** * Detects which AI coding agents are present in the project or on $PATH.",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/agent-detector.js",
        "line": 4,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/connectors/github.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/connectors/github.js:1`): 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/connectors/github.js"
      },
      "evidence": "ecFileSync } from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; const RATE_MS = 1000;",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/connectors/github.js",
        "line": 1,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/engine/capture.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/capture.js:2`): 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/engine/capture.js"
      },
      "evidence": "spawnSync } from 'node:child_process'; import { writeFileSync, readFileSync, unlinkSync } from 'node:fs'; import { tmpd",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/engine/capture.js",
        "line": 2,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/engine/handoff.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/handoff.js:3`): 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/engine/handoff.js"
      },
      "evidence": "port { execSync } from 'child_process'; /** * Manages agent session snapshots for multi-agent handoffs. */ export cla",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/engine/handoff.js",
        "line": 3,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/engine/session-coordinator.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/session-coordinator.js:3`): 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/engine/session-coordinator.js"
      },
      "evidence": "port { execSync } from 'child_process'; /** * Coordinates handoff sessions across multiple agents. * Enables session",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/engine/session-coordinator.js",
        "line": 3,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/mcp-config-writer.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/mcp-config-writer.js:4`): 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/mcp-config-writer.js"
      },
      "evidence": "ecFileSync } from 'node:child_process'; const BOOKLIB_MCP_ENTRY = { command: 'booklib-mcp', args: [] }; export functio",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/mcp-config-writer.js",
        "line": 4,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in server code (lib/skill-fetcher.js)",
      "category": "permissions",
      "severity": "high",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/skill-fetcher.js:5`): 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/skill-fetcher.js"
      },
      "evidence": "port { execSync } from 'child_process'; import { fileURLToPath } from 'url'; import { resolveBookLibPaths } from './path",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "lib/skill-fetcher.js",
        "line": 5,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (lib/engine/capture.js)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/capture.js:65`): 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": "lib/engine/capture.js"
      },
      "evidence": "const response = await fetch('https://api.anthropic.com/v1/messages', { method: 'POST', headers: { 'Conte",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "lib/engine/capture.js",
        "line": 65,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (lib/engine/gap-resolver.js)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/gap-resolver.js:86`): 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": "lib/engine/gap-resolver.js"
      },
      "evidence": "const res = await fetch( `https://registry.npmjs.org/${encodeURIComponent(dep.name)}`, {",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "lib/engine/gap-resolver.js",
        "line": 86,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-003",
      "title": "Hardcoded egress to an external endpoint (lib/engine/reasoning-modes.js)",
      "category": "exfiltration",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/engine/reasoning-modes.js:319`): 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": "lib/engine/reasoning-modes.js"
      },
      "evidence": ") { const res = await fetch('https://api.anthropic.com/v1/messages', { method: 'POST', headers: { 'Conte",
      "owasp": "LLM02:2025 Sensitive Information Disclosure",
      "data": {
        "rule": "MTC-SRC-003",
        "file": "lib/engine/reasoning-modes.js",
        "line": 319,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-009",
      "title": "Untrusted input concatenated into a command sink (lib/skill-fetcher.js)",
      "category": "injection",
      "severity": "medium",
      "confidence": "strong",
      "description": "In the server's implementation (`lib/skill-fetcher.js:191`): 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": "lib/skill-fetcher.js"
      },
      "evidence": "const tarball = execSync(`npm pack ${packageName} --quiet`, { cwd: tmpDir }).toString().trim(); const ta",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-009",
        "file": "lib/skill-fetcher.js",
        "line": 191,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-005",
      "title": "Dynamic module load from a non-literal (hooks/posttooluse-imports.mjs)",
      "category": "permissions",
      "severity": "medium",
      "confidence": "heuristic",
      "description": "In the server's implementation (`hooks/posttooluse-imports.mjs:44`): 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": "hooks/posttooluse-imports.mjs"
      },
      "evidence": "unknown.length} unknown import(s) in ${path.basename(filePath)}:`, ]; for (const imp of result.unknown.slice(0,",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-005",
        "file": "hooks/posttooluse-imports.mjs",
        "line": 44,
        "nonRuntime": false
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (skills/clean-code-reviewer/scripts/pre-review.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`skills/clean-code-reviewer/scripts/pre-review.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": "skills/clean-code-reviewer/scripts/pre-review.py"
      },
      "evidence": "try: result = subprocess.run( [\"ruff\", \"check\", \"--output-format\", \"concise\", str(filepath)],",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "skills/clean-code-reviewer/scripts/pre-review.py",
        "line": 99,
        "nonRuntime": true
      }
    },
    {
      "ruleId": "MTC-SRC-002",
      "title": "Shell/command execution in packaging/dev tooling (skills/effective-python/scripts/lint.py)",
      "category": "permissions",
      "severity": "low",
      "confidence": "heuristic",
      "description": "In a packaging/dev/install script (shipped, but not the server runtime) (`skills/effective-python/scripts/lint.py:91`): 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": "skills/effective-python/scripts/lint.py"
      },
      "evidence": "try: result = subprocess.run(cmd, capture_output=True, text=True, timeout=60) return result.stdout, re",
      "owasp": "LLM05:2025 Improper Output Handling",
      "data": {
        "rule": "MTC-SRC-002",
        "file": "skills/effective-python/scripts/lint.py",
        "line": 91,
        "nonRuntime": true
      }
    }
  ],
  "toxicFlows": [],
  "capabilities": [
    {
      "tool": "lookup",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "review",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "remember",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "verify",
      "tags": [],
      "reasons": {}
    },
    {
      "tool": "guard",
      "tags": [],
      "reasons": {}
    }
  ],
  "surfaceDigest": "87bc29854d48864d288f500872cfb94a62b169ad019ba853e8545e6ca0ca187e",
  "stats": {
    "tools": 5,
    "prompts": 0,
    "resources": 0,
    "findingsBySeverity": {
      "critical": 0,
      "high": 9,
      "medium": 5,
      "low": 2,
      "info": 0
    }
  }
}