Documentation

Security Checks Reference

MCP Security Score runs 43 security checks across your codebase. This reference documents each check, what it detects, and how to fix issues.

Overview

Our security checks are organized into 8 categories:

| Category | Checks | Description | |----------|--------|-------------| | RCE | 5 | Remote code execution vulnerabilities | | Secrets | 3 | Hardcoded credentials and keys | | Network | 3 | Network security configurations | | Filesystem | 2 | Path traversal and sensitive files | | Supply Chain | 6 | Dependency vulnerabilities | | MCP (TypeScript) | 6 | MCP-specific risks in TS/JS | | Python | 11 | Python security patterns | | MCP (Python) | 7 | MCP-specific risks in Python |

Severity Distribution

| Severity | Count | Description | |----------|-------|-------------| | Critical | 14 | Immediate security risk, fix now | | High | 16 | Significant vulnerability | | Medium | 10 | Moderate risk | | Low | 2 | Minor issue | | Info | 1 | Informational |

How Checks Work

Each security check follows this process:

  1. File Selection - Determine which files to analyze based on extensions
  2. Pattern Detection - Use regex or AST parsing to find issues
  3. Context Analysis - Filter false positives (comments, test files)
  4. Finding Generation - Create findings with location and remediation

Detection Methods

Regex-Based:

  • Fast pattern matching for known dangerous patterns
  • Used for: secrets, network patterns, simple function calls

AST-Based:

  • Parse code into Abstract Syntax Tree via Tree-sitter
  • Understand code structure and context
  • Used for: complex function detection, data flow analysis

Dependency Analysis:

  • Parse package.json, requirements.txt
  • Query OSV (Open Source Vulnerabilities) API
  • Detect typosquatting attempts

Quick Reference

Critical Checks (14)

| Check ID | Name | Category | |----------|------|----------| | rce-eval | eval() Usage | RCE | | rce-function-constructor | new Function() Constructor | RCE | | rce-child-process | child_process Usage | RCE | | secrets-api-key | Hardcoded API Key | Secrets | | secrets-password | Hardcoded Password | Secrets | | secrets-private-key | Private Key in Source | Secrets | | supply-chain-cve | Known Vulnerability (CVE) | Supply Chain | | python-rce-eval | Python eval()/exec() | Python | | python-rce-subprocess | Python subprocess | Python | | python-rce-os-system | Python os.system() | Python | | python-secrets-hardcoded | Python Hardcoded Secrets | Python | | mcp-python-subprocess-tool | Subprocess in MCP Tool | MCP Python |

High Checks (16)

| Check ID | Name | Category | |----------|------|----------| | rce-dynamic-require | Dynamic require() | RCE | | rce-dynamic-import | Dynamic import() | RCE | | network-disabled-tls | Disabled TLS Verification | Network | | fs-sensitive-path | Sensitive Path Access | Filesystem | | fs-path-traversal | Path Traversal | Filesystem | | supply-chain-typosquat | Typosquatting | Supply Chain | | supply-chain-scripts | Suspicious Scripts | Supply Chain | | mcp-dangerous-tool | Dangerous MCP Tool | MCP | | mcp-sensitive-exposure | Sensitive Data Exposure | MCP | | python-rce-pickle | Pickle Deserialization | Python | | python-rce-yaml | YAML Unsafe Load | Python | | python-rce-dynamic-import | Python Dynamic Import | Python | | python-network-ssl-disabled | SSL Disabled | Python | | python-injection-sql | SQL Injection | Python | | python-fs-path-traversal | Python Path Traversal | Python | | mcp-python-dangerous-tool | Dangerous MCP Tool (Python) | MCP Python | | mcp-python-sensitive-exposure | Sensitive Exposure (Python) | MCP Python |

Medium Checks (10)

| Check ID | Name | Category | |----------|------|----------| | network-hardcoded-ip | Hardcoded IP Address | Network | | supply-chain-excessive-deps | Excessive Dependencies | Supply Chain | | supply-chain-lockfile | Lock File Issues | Supply Chain | | mcp-excessive-tools | Excessive MCP Tools | MCP | | mcp-unbounded-operation | Unbounded Operation | MCP | | mcp-missing-validation | Missing Validation | MCP | | python-rce-marshal | Marshal Deserialization | Python | | python-fs-tempfile | Insecure Tempfile | Python | | mcp-python-excessive-tools | Excessive Tools (Python) | MCP Python | | mcp-python-missing-validation | Missing Validation (Python) | MCP Python | | mcp-python-unbounded-operation | Unbounded Operation (Python) | MCP Python |

Low/Info Checks (3)

| Check ID | Name | Category | Severity | |----------|------|----------|----------| | network-hardcoded-url | Hardcoded URL | Network | Info | | mcp-missing-description | Missing Description | MCP | Low | | mcp-python-missing-description | Missing Description (Python) | MCP Python | Low |

Category Deep Dives

For detailed documentation of each check including examples and remediation:

False Positive Handling

Our checks include logic to reduce false positives:

  • Comment detection - Skip patterns in comments
  • Test file awareness - Some checks are more lenient in test files
  • Context analysis - Understand surrounding code
  • Pattern refinement - Specific patterns reduce noise

If you believe a finding is a false positive:

  1. Review the code context
  2. Document why it's safe with comments
  3. Consider if there's a safer alternative

Contributing

Found a security pattern we should check? Have ideas for improvements?

  • Report issues at our GitHub repository
  • Suggest new checks via feature requests
  • Help improve false positive detection

Next Steps