一个强大的 MCP(模型上下文协议)服务器,用于审计 npm 包依赖项中的安全漏洞。内置远程 npm 注册表集成,支持实时安全检查。
要通过 Smithery 自动为 Claude Desktop 安装安全审计工具:
npx -y @smithery/cli install @qianniuspace/mcp-security-audit --client claude
{
"mcpServers": {
"mcp-security-audit": {
"command": "npx",
"args": ["-y", "mcp-security-audit"]
}
}
}

git clone https://github.com/qianniuspace/mcp-security-audit.git
cd mcp-security-audit

npm install npm run build
{
"mcpServers": {
"mcp-security-audit": {
"command": "npx",
"args": ["-y", "/path/to/mcp-security-audit/build/index.js"]
}
}
}

该工具提供详细的漏洞信息,包括严重级别、修复建议、CVSS 评分和 CVE 参考。
{
"content": [{
"vulnerability": {
"packageName": "lodash",
"version": "4.17.15",
"severity": "high",
"description": "lodash 中的原型污染",
"cve": "CVE-2020-8203",
"githubAdvisoryId": "GHSA-p6mc-m468-83gw",
"recommendation": "升级到 4.17.19 或更高版本",
"fixAvailable": true,
"fixedVersion": "4.17.19",
"cvss": {
"score": 7.4,
"vector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
},
"cwe": ["CWE-1321"],
"url": "https://github.com/advisories/GHSA-p6mc-m468-83gw"
},
"metadata": {
"timestamp": "2024-04-23T10:00:00.000Z",
"packageManager": "npm"
}
}]
}

{
"content": [{
"vulnerability": null,
"metadata": {
"timestamp": "2024-04-23T10:00:00.000Z",
"packageManager": "npm",
"message": "未发现已知漏洞"
}
}]
}

有关开发参考,请查看 public
目录中的示例响应文件:
注意:上述示例响应是从原始的 npm audit API 响应转换而来,以提供更结构化的格式。原始的 npm audit API 响应包含额外的元数据,并且可能具有不同的结构。
欢迎贡献!请阅读我们的 贡献指南,了解我们的行为准则和提交拉取请求的流程。
本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。
ESX (qianniuspace@gmail.com)