codescalpel
PyPI
v2.1.4
Published by 3d-tech-solutions — no publish provenance, so origin is unverified, but the source is public: the repository link below is self-declared yet readable, so you can inspect the code before adopting it.
MCP server toolkit for AI agents - surgical code analysis and modification
The grade answers one question — how safe is this server for you to adopt — so it is computed in two auditable stages. Nothing below is an opinion or an LLM's guess; every line is a real term the deterministic engine applied, and the same input always yields the same number.
1. Threat score — 100 − 9.5 = 91. What the published surface and source actually contain:
| Points | What was found | Category |
|---|---|---|
| −9.5 | Unsafe deserialization ×2 MTC-SRC-007 | permissions |
2. Client adoption risk — 91 − 7 = 84. Three small, subtract-only factors that reflect your risk in adopting it — a clean scan proves less on a powerful, unverified or barely-inspectable package, so the grade says so plainly:
| Points | Adoption-risk factor |
|---|---|
| −6 | capability blast radius (high) — client exposure if the model is manipulated |
| −1 | publisher verification (public source) — no provenance, but the source is public and inspectable |
Capability observations and info notes are shown under Findings but never scored.
Open any row's finding below for the file, line and evidence behind a deduction.
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.
Evidence: l": "Code injection via eval()", "exec": "Code injection via exec()", "compile": "Potential code
Fix: 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: server src/code_scalpel/analysis/code_analyzer.py
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.
Evidence: ity Analysis: - eval() and Function constructor detection - innerHTML/outerHTML XSS detection -
Fix: 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: server src/code_scalpel/code_parsers/javascript_parsers/javascript_parsers_esprima.py
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.
Evidence: ": [ "Avoid eval(), exec(), and compile() with user input", "Use ast.literal_eval() for parsing
Fix: 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: server src/code_scalpel/code_parsers/python_parsers/python_parsers_bandit.py
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.
Evidence: rns detected: - eval() usage - innerHTML assignment - SQL string concatenation - Hardcod
Fix: 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: server src/code_scalpel/code_parsers/typescript_parsers/analyzer.py
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.
Evidence: x\\n+def foo(x): return eval(x)' ... ) >>> result.is_safe False >>> result.reason
Fix: 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: server src/code_scalpel/generators/refactor_simulator.py
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.
Evidence: ("eval(", "Use of eval() detected - security risk"), ("exec(", "Use of exec() detected - security risk"),
Fix: 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: server src/code_scalpel/mcp/helpers/extraction_helpers.py
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.
Evidence: "javascript": "Avoid eval(). Use JSON.parse() for data parsing", "java": "Avoid ScriptEngine with user in
Fix: 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: server src/code_scalpel/mcp/helpers/security_helpers.py
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.
Evidence: rns detected: - eval() usage - innerHTML assignment - SQL string concatenation - Hardcod
Fix: 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: server src/code_scalpel/polyglot/typescript/analyzer.py
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.
Evidence: c": "Code injection via exec()", "compile": "Potential code injection via compile()", "__import_
Fix: 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: server src/code_scalpel/analysis/code_analyzer.py
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.
Evidence: clang_output = subprocess.check_output( ["clang-check", "-ast-dump=full", self.file_path],
Fix: 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: server src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Clang-Static-Analyzer.py
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.
Evidence: aths) result = subprocess.run(cmd, capture_output=True, text=True) # cppcheck writes XML to stderr
Fix: 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: server src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_Cppcheck.py
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.
Evidence: ] result = subprocess.run(cmd, capture_output=True, text=True) # clang-tidy diagnostic output i
Fix: 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: server src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_clang_tidy.py
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.
Evidence: _args) result = subprocess.run(cmd, capture_output=True, text=True) # cpplint writes to stderr r
Fix: 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: server src/code_scalpel/code_parsers/cpp_parsers/cpp_parsers_cpplint.py
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.
Evidence: try: subprocess.run( [ "dotnet", "build",
Fix: 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: server src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_Roslyn-Analyzers.py
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.
Evidence: try: subprocess.run( ["dotnet", "build", str(target), f"/p:ErrorLog={sarif_path}"],
Fix: 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: server src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_SecurityCodeScan.py
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.
Evidence: try: subprocess.run( ["dotnet", "build", str(path), f"/p:ErrorLog={out}"],
Fix: 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: server src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_StyleCop.py
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.
Evidence: try: subprocess.run( ["dotnet", "build", str(target), f"/p:ErrorLog={sarif}"],
Fix: 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: server src/code_scalpel/code_parsers/csharp_parsers/csharp_parsers_fxcop.py
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.
Evidence: list_result = subprocess.run( ["gofmt", "-l", target], capture_output=True,
Fix: 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: server src/code_scalpel/code_parsers/go_parsers/go_parsers_gofmt.py
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.
Evidence: DUNDER = "dunder" # __import__() LAZY = "lazy" # Detected but not yet resolved FRAMEWORK = "framework" # F
Fix: 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: server src/code_scalpel/ast_tools/import_resolver.py
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.
Evidence: try: module = __import__(module_name, fromlist=[tool_name]) return getattr(module, tool_name, None)
Fix: 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: server src/code_scalpel/cli_tools/tool_bridge.py
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.
Evidence: s", "F404": "future import(s) name after other statements", "F405": "name may be undefined, or defined from star
Fix: 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: server src/code_scalpel/code_parsers/python_parsers/python_parsers_flake8.py
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.
Evidence: Remove unused Optional import (CodeQL) class TSNodeType(Enum): """TypeScript/JavaScript AST node types (ESTree-co
Fix: 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: server src/code_scalpel/code_parsers/typescript_parsers/parser.py
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.
Evidence: containing the aliasing import (relative)" ) line: int | None = Field(default=None, description="Line number of
Fix: 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: server src/code_scalpel/mcp/models/graph.py
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.
Evidence: Remove unused Optional import (CodeQL) class TSNodeType(Enum): """TypeScript/JavaScript AST node types (ESTree-co
Fix: 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: server src/code_scalpel/polyglot/typescript/parser.py
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.
Evidence: 301) return pickle.load(f) # nosec B301 def _save_ast(self, cache_path: Path, ast: Any) -> None:
Fix: 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: server src/code_scalpel/cache/ast_cache.py
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.
Evidence: payload = pickle.load(f) # nosec B301 if payload.get("hash") == file_hash:
Fix: 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: server src/code_scalpel/cache/unified_cache.py
Each tool and what it can reach — statically extracted from the published source.
analyze_codeno sensitive capabilityget_capabilitiesno sensitive capabilitysimulate_refactorno sensitive capabilitysymbolic_executeno sensitive capabilityScan history per published version. The engine is deterministic — the same version always yields the same score, so a changed score means the package itself changed.
| Version | Score | Findings | Engine | Scanned |
|---|---|---|---|---|
v2.1.4 latest |
B 84/100 | 26 | 1.13.0 | 2026-08-25 |
Show this server's live Trust Score in your README, docs or website. The badge is served straight from the registry and updates automatically after every rescan — no API key needed. It links back to this page, so anyone who sees the grade can also read the findings behind it instead of taking a number on faith.
The score above is reproducible: the same package version always yields the same result. Run it locally or over the free API — no account, no LLM, fully deterministic.
npx mcptrustchecker scan codescalpel --online --registry pypi
Hotel booking MCP server — 300K+ properties, real confirmation numbers, loyalty programs. Builders monetize every booking via Stripe Connect. The first MCP server that completes real hotel reservations inside AI conversations.
Manage AdGuard Home through AI assistants
Read-only Azure DevOps for MCP clients using only your existing browser session — no PAT, no Azure CLI. Browse work items, pull requests, comments, attachments and Artifacts feeds across every project, repo and feed you can access.
MCP server for Adobe Experience Manager Assets integration development
Servidor MCP para el tiempo oficial de España (API pública OpenData de AEMET). Predicción, observación y avisos como herramientas MCP tipadas.
A standalone MCP stdio bridge for Affinity by Canva's local MCP SSE server.