friendlygeorge/security-scanner-mcp-server

GitHub: friendlygeorge/security-scanner-mcp-server

封装 Trivy 与 Grype 双引擎的 MCP Server,为 AI Agent 提供容器与系统漏洞的跨引擎交叉验证扫描能力。

Stars: 0 | Forks: 0

# 安全扫描器 MCP Server [![npm](https://img.shields.io/npm/v/%40supernova123/security-scanner-mcp-server)](https://www.npmjs.com/package/@supernova123/security-scanner-mcp-server) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Glama](https://glama.ai/mcp/servers/friendlygeorge/security-scanner-mcp-server/badges/card.svg)](https://glama.ai/mcp/servers/friendlygeorge/security-scanner-mcp-server) 面向 AI agent 的多引擎容器与系统漏洞扫描工具。封装了 **Trivy** 和 **Grype**,提供跨引擎验证、SBOM 生成以及 IaC 配置错误扫描功能。 ## 为什么开发此项目 大多数安全 MCP server 只封装了一个扫描器。而本项目封装了**两个** —— Trivy (Aqua Security) 和 Grype (Anchore) —— 并对同一个目标运行它们,以呈现每个引擎单独检测到的漏洞。不同的漏洞数据库 + 不同的检测逻辑 = 更广泛的覆盖范围。 **核心优势**:没有其他 MCP server 提供多引擎交叉验证。 ## 功能 - 包含漏洞扫描、SBOM 生成、IaC 检查和数据库管理的 **15 个工具** - **跨引擎验证** —— 在同一个镜像上运行 Trivy + Grype,查看各自单独检测到的漏洞 - **MIT 许可证** —— 没有 AGPL 限制(不同于 `@aikidosec/mcp`) - **npm 原生支持** —— 通过 `npx` 安装,兼容 Claude Desktop、Cursor 及任何 MCP client - **无需云账号** —— 直接在本地针对 Docker daemon 或文件系统运行 ## 快速开始 🚀 **新用户?** 请参阅[快速入门指南](QUICKSTART.md) —— 5 分钟内即可开始扫描。 ### 前置条件 至少安装一个扫描引擎: ``` # Trivy(推荐) curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin # Grype(用于交叉验证) curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin ``` ### Claude Desktop / Cursor 将其添加到您的 MCP 配置中: ``` { "mcpServers": { "security-scanner": { "command": "npx", "args": ["-y", "@supernova123/security-scanner-mcp-server"] } } } ``` ### 独立运行 ``` npx @supernova123/security-scanner-mcp-server ``` ## 工具 | # | 工具 | 引擎 | 描述 | |---|------|--------|-------------| | 1 | `scan_image` | Trivy | 扫描 Docker 镜像中的漏洞 | | 2 | `scan_image_grype` | Grype | 通过 Grype 扫描同一目标(交叉验证) | | 3 | `vulnerability_report` | Trivy | 包含修复建议的详细报告 | | 4 | `scan_filesystem` | Trivy | 本地目录/文件漏洞及配置错误扫描 | | 5 | `scan_filesystem_grype` | Grype | 跨引擎文件系统扫描 | | 6 | `scan_repository` | Trivy | 远程 git 仓库扫描 | | 7 | `scan_remote_image` | Grype | 直接从 registry 拉取(无需 Docker daemon) | | 8 | `scan_purl` | Grype | 单个 Package URL 漏洞查询 | | 9 | `scan_sbom` | Trivy | 扫描 SBOM 文件中的漏洞 | | 10 | `generate_sbom` | Trivy | 生成 CycloneDX/SPDX SBOM | | 11 | `scan_config` | Trivy | IaC 配置错误扫描 | | 12 | `cross_validate` | 两者 | 运行两个引擎,呈现差异 | | 13 | `db_status` | Grype | 检查漏洞数据库状态 | | 14 | `update_db` | Grype | 更新漏洞数据库 | | 15 | `get_version` | 两者 | 引擎版本及可用性检查 | ## 交叉验证示例 `cross_validate` 工具会在同一个 Docker 镜像上同时运行 Trivy 和 Grype 并比较结果: ``` { "combined_summary": { "total_unique_cves": 47, "critical": 2, "high": 8, "medium": 23, "low": 14 }, "divergence": { "only_in_trivy_count": 5, "only_in_grype_count": 3, "severity_mismatches": 2, "only_in_trivy": ["CVE-2023-1234", ...], "only_in_grype": ["CVE-2023-5678", ...] }, "insight": "Cross-validation found 5 CVEs only in Trivy and 3 only in Grype. Using both engines gives broader coverage than either alone." } ``` ## 竞品分析 | 包名 | 引擎 | 许可证 | 每周下载量 | |---------|--------|---------|-----------------| | `@aikidosec/mcp` | 云 API | AGPL-3.0 | ~11,800 | | `@paretools/security` | Trivy + Semgrep | MIT | ~75 | | **`@supernova123/security-scanner-mcp-server`** | **Trivy + Grype** | **MIT** | 待定 | | `aquasecurity/trivy-mcp` | Trivy (Go 插件) | MIT | 无 (非 npm) | | `anchore/grype-mcp` | Grype (Python) | Apache-2.0 | 无 (非 npm) | ## 开发 ``` git clone https://github.com/friendlygeorge/security-scanner-mcp-server.git cd security-scanner-mcp-server npm install npm run build npm test ``` ## 许可证 MIT —— 详见 [LICENSE](LICENSE) ## 相关链接 - [npm 包](https://www.npmjs.com/package/@supernova123/security-scanner-mcp-server) - [GitHub 仓库](https://github.com/friendlygeorge/security-scanner-mcp-server) - [MCP 规范](https://modelcontextprotocol.io/)
标签:LLM防护, MCP, MITM代理, SBOM, Web截图, 容器安全, 暗色界面, 硬件无关, 自动化攻击, 请求拦截