千牛安全审计

@qianniuspace/mcp-security-audit
Hosted
4 Stars 1.0k 次浏览 qianniuspace 更新于 2026-08-23

审计 npm 包依赖项以查找安全漏洞,提供详细的报告和修复建议,并集成 MCP。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "mcp-security-audit": {
      "args": [
        "-y",
        "mcp-security-audit"
      ],
      "command": "npx"
    }
  }
}

可用工具 (1 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

audit_nodejs_dependencies 1 个参数 需填 1 项

Audit specific dependencies for vulnerabilities

必填参数:dependencies

服务介绍

安全审计工具

smithery 徽章
NPM 版本

这是一个强大的 MCP(模型上下文协议)服务器,用于审计 npm 包依赖项的安全漏洞。通过与远程 npm 注册表集成,支持实时安全检查。

功能

  • 🔍 实时安全漏洞扫描
  • 🚀 远程 npm 注册表集成
  • 📊 详细的带有严重性级别的漏洞报告
  • 🛡️ 支持多个严重性级别(危急、高、中、低)
  • 📦 兼容 npm/pnpm/yarn 包管理器
  • 🔄 自动修复建议
  • 📋 CVSS 评分和 CVE 参考

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装安全审计工具:

npx -y @smithery/cli install @qianniuspace/mcp-security-audit --client claude

MCP 集成

选项 1:使用 NPX(推荐)

  1. 将 MCP 配置添加到 Cursor:
{
  "Name": "mcp-security-audit",
  "Type": "command",
  "Command": "npx -y mcp-security-audit"
}
  1. 将 MCP 配置添加到 Cline:
{
  "mcpServers": {
    "mcp-security-audit": {
      "command": "npx",
      "args": ["-y", "mcp-security-audit"]
    }
  }
}

选项 2:下载源代码并手动配置

  1. 克隆仓库:
git clone https://github.com/qianniuspace/mcp-security-audit.git
cd mcp-security-audit
  1. 安装依赖并构建:
npm install
npm run build
  1. 将 MCP 配置添加到 Cursor:
{
  "Name": "mcp-security-audit",
  "Type": "command",
  "Command": "node /path/to/mcp-security-audit/build/index.js"
}
  1. 将 MCP 配置添加到 Cline:
{
  "mcpServers": {
    "mcp-security-audit": {
      "command": "npx",
      "args": ["-y", "/path/to/mcp-security-audit/build/index.js"]
    }
  }
}

配置截图

Cursor 配置

Cursor 配置

Cline 配置

Cline 配置

API 响应格式

该工具提供了详细的漏洞信息,包括严重性级别、修复建议、CVSS 评分和 CVE 参考。

响应示例

1. 发现漏洞时 (Severity-response.json)

{
  "content": [{
    "vulnerability": {
      "packageName": "lodash",
      "version": "4.17.15",
      "severity": "high",
      "description": "Prototype Pollution in lodash",
      "cve": "CVE-2020-8203",
      "githubAdvisoryId": "GHSA-p6mc-m468-83gw",
      "recommendation": "Upgrade to version 4.17.19 or later",
      "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"
    }
  }]
}

2. 未发现漏洞时 (no-Severity-response.json)

{
  "content": [{
    "vulnerability": null,
    "metadata": {
      "timestamp": "2024-04-23T10:00:00.000Z",
      "packageManager": "npm",
      "message": "No known vulnerabilities found"
    }
  }]
}

开发

有关开发参考,请查看 public 目录中的示例响应文件:

注意:上述示例响应是从原始的 npm audit API 响应转换而来的,以提供更结构化的格式。原始的 npm audit API 响应包含额外的元数据,并且可能具有不同的结构。

贡献

欢迎贡献!请阅读我们的 贡献指南,了解我们的行为准则以及提交拉取请求的过程。

许可证

该项目根据 MIT 许可证授权 - 详情请参阅 LICENSE 文件。

作者

ESX (qianniuspace@gmail.com)

链接

相关 MCP 服务