mcp-server-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP Server Security Review
MCP 服务器安全审查
Audit an MCP server by following the full procedure in .
plays/mcp-server-review.md按照 中的完整流程审计 MCP 服务器。
plays/mcp-server-review.mdSteps
步骤
-
Transport & Authentication — Check transport type (stdio vs HTTP/SSE), authentication on network transports, TLS enforcement, CORS policy, origin validation.
-
Tool Permission Audit — For each exposed tool: document what it claims to do vs what it actually does (read source). Classify as READ-ONLY, MUTATION, DESTRUCTIVE, NETWORK, or CREDENTIAL-ACCESS. Flag tools with broader capabilities than descriptions suggest, free-form inputs, or credential access.
-
Input Validation & Injection — For each tool parameter: check for command injection (shell interpolation), path traversal (../ in file paths), SQL injection (unparameterized queries), SSRF (user-supplied URLs hitting internal services), and template injection.
-
Data Exposure — Assess MCP resources for secrets/PII leakage, tool outputs for excessive data, error messages for internal paths/stack traces, and logging for sensitive data capture.
-
Scope & Sandboxing — Check file system restrictions, network scope (can it reach cloud metadata 169.254.169.254?), process permissions, resource limits, and dependency surface.
-
Supply Chain — Verify source trustworthiness, run SCA on dependencies, check for lockfiles and reproducible builds, assess update mechanism.
-
Client Configuration — Review MCP client config for absolute/specific server paths, minimized env var passthrough, and command injection safety in args.
-
传输与身份验证 — 检查传输类型(stdio 与 HTTP/SSE)、网络传输的身份验证、TLS 强制执行、CORS 策略和来源验证。
-
工具权限审计 — 对于每个暴露的工具:记录其声称执行的操作与实际执行的操作(阅读源代码)。将其分类为 READ-ONLY、MUTATION、DESTRUCTIVE、NETWORK 或 CREDENTIAL-ACCESS。标记那些能力范围超出描述所暗示范围、接受自由格式输入或可访问凭据的工具。
-
输入验证与注入 — 对于每个工具参数:检查命令注入(shell 插值)、路径遍历(文件路径中的 ../)、SQL 注入(未参数化查询)、SSRF(用户提供 URL 访问内部服务)以及模板注入。
-
数据暴露 — 评估 MCP 资源中的密钥/PII 泄露、工具输出中的过量数据、错误消息中的内部路径/堆栈跟踪,以及日志中的敏感数据捕获。
-
范围与沙箱 — 检查文件系统限制、网络范围(它能否访问云元数据地址 169.254.169.254?)、进程权限、资源限制和依赖面。
-
供应链 — 验证源代码可信度,对依赖运行 SCA,检查 lockfile 和可复现构建,并评估更新机制。
-
客户端配置 — 审查 MCP 客户端配置中的绝对路径/具体服务器路径、最小化的环境变量传递,以及 args 中的命令注入安全性。
Output
输出
Server overview, tool risk matrix, findings using , and specific configuration recommendations.
templates/finding.md服务器概览、工具风险矩阵、使用 生成的发现结果,以及具体的配置建议。
templates/finding.mdOWASP References
OWASP 参考
- LLM01: Prompt Injection (via tool descriptions and outputs)
- LLM02: Sensitive Information Disclosure
- LLM05: Improper Output Handling
- LLM06: Excessive Agency (overpermissioned tools)
- A01: Broken Access Control
- A03: Injection
- LLM01: Prompt Injection(通过工具描述和输出)
- LLM02: Sensitive Information Disclosure
- LLM05: Improper Output Handling
- LLM06: Excessive Agency(工具过度授权)
- A01: Broken Access Control
- A03: Injection