Codescalpel — 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.
{
"tool": {
"name": "mcptrustchecker",
"version": "1.13.0",
"methodologyVersion": "mcptrustchecker-1.13"
},
"target": {
"id": "codescalpel",
"source": {
"kind": "package",
"origin": "codescalpel"
},
"server": {
"name": "codescalpel"
}
},
"grade": "B",
"score": {
"score": 84,
"threatScore": 91,
"grade": "B",
"band": "B",
"categorySubtotals": {
"injection": 0,
"exfiltration": 0,
"permissions": 9.45,
"supply-chain": 0,
"network": 0,
"hygiene": 0
},
"vector": [
{
"kind": "threat",
"ruleId": "MTC-SRC-007",
"category": "permissions",
"severity": "medium",
"confidence": "strong",
"rawWeight": 9,
"confidenceMult": 0.7,
"diminishingFactor": 1,
"appliedPenalty": 6.3
},
{
"kind": "threat",
"ruleId": "MTC-SRC-007",
"category": "permissions",
"severity": "medium",
"confidence": "strong",
"rawWeight": 9,
"confidenceMult": 0.7,
"diminishingFactor": 0.5,
"appliedPenalty": 3.15
},
{
"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 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 (4 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 (src/code_scalpel/analysis/code_analyzer.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/analysis/code_analyzer.py:1181`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/analysis/code_analyzer.py"
},
"evidence": "l\": \"Code injection via eval()\", \"exec\": \"Code injection via exec()\", \"compile\": \"Potential code",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/analysis/code_analyzer.py",
"line": 1181,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/code_parsers/javascript_parsers/javascript_parsers_esprima.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/javascript_parsers/javascript_parsers_esprima.py:35`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/javascript_parsers/javascript_parsers_esprima.py"
},
"evidence": "ity Analysis: - eval() and Function constructor detection - innerHTML/outerHTML XSS detection -",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/code_parsers/javascript_parsers/javascript_parsers_esprima.py",
"line": 35,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/code_parsers/python_parsers/python_parsers_bandit.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/python_parsers/python_parsers_bandit.py:189`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/python_parsers/python_parsers_bandit.py"
},
"evidence": "\": [ \"Avoid eval(), exec(), and compile() with user input\", \"Use ast.literal_eval() for parsing",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/code_parsers/python_parsers/python_parsers_bandit.py",
"line": 189,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/code_parsers/typescript_parsers/analyzer.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/typescript_parsers/analyzer.py:207`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/typescript_parsers/analyzer.py"
},
"evidence": "rns detected: - eval() usage - innerHTML assignment - SQL string concatenation - Hardcod",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/code_parsers/typescript_parsers/analyzer.py",
"line": 207,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/generators/refactor_simulator.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/generators/refactor_simulator.py:156`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/generators/refactor_simulator.py"
},
"evidence": "x\\\\n+def foo(x): return eval(x)' ... ) >>> result.is_safe False >>> result.reason",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/generators/refactor_simulator.py",
"line": 156,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/mcp/helpers/extraction_helpers.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/mcp/helpers/extraction_helpers.py:1965`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/mcp/helpers/extraction_helpers.py"
},
"evidence": "(\"eval(\", \"Use of eval() detected - security risk\"), (\"exec(\", \"Use of exec() detected - security risk\"),",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/mcp/helpers/extraction_helpers.py",
"line": 1965,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/mcp/helpers/security_helpers.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/mcp/helpers/security_helpers.py:859`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/mcp/helpers/security_helpers.py"
},
"evidence": "\"javascript\": \"Avoid eval(). Use JSON.parse() for data parsing\", \"java\": \"Avoid ScriptEngine with user in",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/mcp/helpers/security_helpers.py",
"line": 859,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-001",
"title": "Dynamic code execution in server code (src/code_scalpel/polyglot/typescript/analyzer.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/polyglot/typescript/analyzer.py:214`): Evaluating strings as code is the most direct RCE primitive; if any tool input reaches it, the server executes attacker-chosen code. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/polyglot/typescript/analyzer.py"
},
"evidence": "rns detected: - eval() usage - innerHTML assignment - SQL string concatenation - Hardcod",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-001",
"file": "src/code_scalpel/polyglot/typescript/analyzer.py",
"line": 214,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/analysis/code_analyzer.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/analysis/code_analyzer.py:1182`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/analysis/code_analyzer.py"
},
"evidence": "c\": \"Code injection via exec()\", \"compile\": \"Potential code injection via compile()\", \"__import_",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/analysis/code_analyzer.py",
"line": 1182,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Clang-Static-Analyzer.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Clang-Static-Analyzer.py:196`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Clang-Static-Analyzer.py"
},
"evidence": "clang_output = subprocess.check_output( [\"clang-check\", \"-ast-dump=full\", self.file_path],",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Clang-Static-Analyzer.py",
"line": 196,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Cppcheck.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Cppcheck.py:255`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Cppcheck.py"
},
"evidence": "aths) result = subprocess.run(cmd, capture_output=True, text=True) # cppcheck writes XML to stderr",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Cppcheck.py",
"line": 255,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_clang_tidy.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_clang_tidy.py:170`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_clang_tidy.py"
},
"evidence": "] result = subprocess.run(cmd, capture_output=True, text=True) # clang-tidy diagnostic output i",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_clang_tidy.py",
"line": 170,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_cpplint.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_cpplint.py:175`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_cpplint.py"
},
"evidence": "_args) result = subprocess.run(cmd, capture_output=True, text=True) # cpplint writes to stderr r",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_cpplint.py",
"line": 175,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_Roslyn-Analyzers.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_Roslyn-Analyzers.py:80`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_Roslyn-Analyzers.py"
},
"evidence": "try: subprocess.run( [ \"dotnet\", \"build\",",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_Roslyn-Analyzers.py",
"line": 80,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_SecurityCodeScan.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_SecurityCodeScan.py:138`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_SecurityCodeScan.py"
},
"evidence": "try: subprocess.run( [\"dotnet\", \"build\", str(target), f\"/p:ErrorLog={sarif_path}\"],",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_SecurityCodeScan.py",
"line": 138,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_StyleCop.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_StyleCop.py:88`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_StyleCop.py"
},
"evidence": "try: subprocess.run( [\"dotnet\", \"build\", str(path), f\"/p:ErrorLog={out}\"],",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_StyleCop.py",
"line": 88,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_fxcop.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_fxcop.py:130`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_fxcop.py"
},
"evidence": "try: subprocess.run( [\"dotnet\", \"build\", str(target), f\"/p:ErrorLog={sarif}\"],",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_fxcop.py",
"line": 130,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-002",
"title": "Shell/command execution in server code (src/code_scalpel/code_parsers/go_parsers/go_parsers_gofmt.py)",
"category": "permissions",
"severity": "high",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/go_parsers/go_parsers_gofmt.py:60`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/go_parsers/go_parsers_gofmt.py"
},
"evidence": "list_result = subprocess.run( [\"gofmt\", \"-l\", target], capture_output=True,",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-002",
"file": "src/code_scalpel/code_parsers/go_parsers/go_parsers_gofmt.py",
"line": 60,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/ast_tools/import_resolver.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/ast_tools/import_resolver.py:53`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/ast_tools/import_resolver.py"
},
"evidence": "DUNDER = \"dunder\" # __import__() LAZY = \"lazy\" # Detected but not yet resolved FRAMEWORK = \"framework\" # F",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/ast_tools/import_resolver.py",
"line": 53,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/cli_tools/tool_bridge.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/cli_tools/tool_bridge.py: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": "src/code_scalpel/cli_tools/tool_bridge.py"
},
"evidence": "try: module = __import__(module_name, fromlist=[tool_name]) return getattr(module, tool_name, None)",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/cli_tools/tool_bridge.py",
"line": 132,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/code_parsers/python_parsers/python_parsers_flake8.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/python_parsers/python_parsers_flake8.py:288`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/python_parsers/python_parsers_flake8.py"
},
"evidence": "s\", \"F404\": \"future import(s) name after other statements\", \"F405\": \"name may be undefined, or defined from star",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/code_parsers/python_parsers/python_parsers_flake8.py",
"line": 288,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/code_parsers/typescript_parsers/parser.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/code_parsers/typescript_parsers/parser.py:25`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/code_parsers/typescript_parsers/parser.py"
},
"evidence": "Remove unused Optional import (CodeQL) class TSNodeType(Enum): \"\"\"TypeScript/JavaScript AST node types (ESTree-co",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/code_parsers/typescript_parsers/parser.py",
"line": 25,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/mcp/models/graph.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/mcp/models/graph.py:533`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/mcp/models/graph.py"
},
"evidence": "containing the aliasing import (relative)\" ) line: int | None = Field(default=None, description=\"Line number of",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/mcp/models/graph.py",
"line": 533,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-005",
"title": "Dynamic module load from a non-literal (src/code_scalpel/polyglot/typescript/parser.py)",
"category": "permissions",
"severity": "medium",
"confidence": "heuristic",
"description": "In the server's implementation (`src/code_scalpel/polyglot/typescript/parser.py:32`): Loading a module chosen at runtime (from a variable) can pull in and run attacker-influenced code paths. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.",
"remediation": "Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.",
"location": {
"kind": "server",
"name": "src/code_scalpel/polyglot/typescript/parser.py"
},
"evidence": "Remove unused Optional import (CodeQL) class TSNodeType(Enum): \"\"\"TypeScript/JavaScript AST node types (ESTree-co",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-005",
"file": "src/code_scalpel/polyglot/typescript/parser.py",
"line": 32,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-007",
"title": "Unsafe deserialization (src/code_scalpel/cache/ast_cache.py)",
"category": "permissions",
"severity": "medium",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/cache/ast_cache.py:260`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). 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/code_scalpel/cache/ast_cache.py"
},
"evidence": "301) return pickle.load(f) # nosec B301 def _save_ast(self, cache_path: Path, ast: Any) -> None:",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-007",
"file": "src/code_scalpel/cache/ast_cache.py",
"line": 260,
"nonRuntime": false
}
},
{
"ruleId": "MTC-SRC-007",
"title": "Unsafe deserialization (src/code_scalpel/cache/unified_cache.py)",
"category": "permissions",
"severity": "medium",
"confidence": "strong",
"description": "In the server's implementation (`src/code_scalpel/cache/unified_cache.py:347`): Deserializing untrusted data with these APIs can execute arbitrary code (a well-known RCE gadget class). 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/code_scalpel/cache/unified_cache.py"
},
"evidence": "payload = pickle.load(f) # nosec B301 if payload.get(\"hash\") == file_hash:",
"owasp": "LLM05:2025 Improper Output Handling",
"data": {
"rule": "MTC-SRC-007",
"file": "src/code_scalpel/cache/unified_cache.py",
"line": 347,
"nonRuntime": false
}
}
],
"toxicFlows": [],
"capabilities": [
{
"tool": "analyze_code",
"tags": [],
"reasons": {}
},
{
"tool": "symbolic_execute",
"tags": [],
"reasons": {}
},
{
"tool": "simulate_refactor",
"tags": [],
"reasons": {}
},
{
"tool": "get_capabilities",
"tags": [],
"reasons": {}
}
],
"surfaceDigest": "5ebbb24d6c28d25e537332bc23e37154e3554fd2309fcac477af9292e5f07542",
"stats": {
"tools": 4,
"prompts": 0,
"resources": 0,
"findingsBySeverity": {
"critical": 0,
"high": 18,
"medium": 8,
"low": 0,
"info": 0
}
}
}