MCP Snitch - The MCP Security Tool You Probably Need
好,我需要帮用户总结这篇文章的内容,控制在100字以内。首先,文章讨论了GitHub MCP漏洞的问题,特别是提示注入利用过度授权的令牌窃取私有仓库数据。作者介绍了他们通过代理的方法来解决MCP安全问题。 核心问题在于MCP工具通常使用全权限令牌,比如GitHub的PAT和AWS的AdminAccess凭证,而且没有运行时边界。这就像预沙盒的JavaScript拥有文件系统访问权限,一个恶意提示或被攻陷的服务器就能访问所有内容。 当前的身份验证机制存在缺陷:读取一个GitHub问题需要全仓库访问权限;OAuth 2.1的RAR虽然能解决问题但未被采用;API提供商也没有动力去实施细粒度和临时的权限范围。 作者提出了MCP Snitch,这是一个开源的安全代理,弥补了MCP缺乏的中介层。它包括基于白名单的访问控制、运行时权限请求、API密钥检测与阻止以及全面的操作日志记录。 不过,这种方法并不能解决供应链攻击、持久化机制和绕过代理的操作等问题。作者指出,浏览器安全模型花了25年时间才从“JavaScript可以删除文件”发展到现在的沙盒进程和细粒度权限。MCP也需要类似的演进,但由于风险迫在眉睫,在IDE实现适当沙盒和MCP获得协议级安全原语之前,基于代理的安全措施是实际可行的防御手段。 总结一下:文章探讨了MCP工具的安全漏洞及其原因,并提出了一种开源代理方案来缓解这些问题。 </think> 文章探讨了GitHub MCP工具的安全漏洞问题,指出其过度授权令牌和缺乏运行时边界的风险,并提出了一种开源代理方案(MCP Snitch)来缓解这些问题。该方案通过白名单访问控制、实时权限请求、API密钥检测及全面日志记录等措施提升安全性。 2025-10-14 20:33:50 Author: www.reddit.com(查看原文) 阅读量:0 收藏

With the recent GitHub MCP vulnerability demonstrating how prompt injection can leverage overprivileged tokens to exfiltrate private repository data, I wanted to share our approach to MCP security through proxying.

The Core Problem: MCP tools often run with full access tokens (GitHub PATs with repo-wide access, AWS creds with AdminAccess, etc.) and no runtime boundaries. It's essentially pre-sandbox JavaScript with filesystem access. A single malicious prompt or compromised server can access everything.

Why Current Auth is Broken:

  • Want to read one GitHub issue? Your token needs full repo access to ALL repositories

  • OAuth 2.1 RAR could fix this but has zero adoption

  • API providers have no economic incentive to implement granular, temporal scoping

MCP Snitch: An open source security proxy that implements the mediation layer MCP lacks:

  • Whitelist-based access control (default deny, explicitly allow operations)

  • Runtime permission requests with UI visibility

  • API key detection and blocking

  • Comprehensive logging of all operations

What It Doesn't Solve:

  • Supply chain attacks (compromised npm/pip packages)

  • Persistence mechanisms (SSH keys, cron jobs)

  • Out-of-band operations (direct network calls from MCP servers)

The browser security model took 25 years to evolve from "JavaScript can delete your file" to today's sandboxed processes with granular permissions. MCP needs the same evolution but the risks are immediate. Until IDEs implement proper sandboxing and MCP gets protocol-level security primitives, proxy-based security is the practical defense.

GitHub: github.com/Adversis/mcp-snitch


文章来源: https://www.reddit.com/r/netsec/comments/1o6qxcf/mcp_snitch_the_mcp_security_tool_you_probably_need/
如有侵权请联系:admin#unsafe.sh