SuperAPI AI 工具集

dependency-scanning

安全与审计

查看项目

更新于 10-15 21:52

技能介绍

用途:使用 GitHub MCP Server 的 Dependabot 工具集和 check_dependency_vulnerabilities 工具,查找项目依赖中的已知漏洞(CVE)。仅在用户明确要求检查依赖或扫描漏洞时使用,不应在未提示的情况下自动运行。

主要能力:查看仓库现有 Dependabot 告警(list_dependabot_alerts、get_dependabot_alert);查询特定包/版本是否安全;扫描本地分支新增或更新的依赖;对全仓库依赖做完整审计;可选使用 Dependabot CLI 在提交后做确定性安全检查。支持 npm、pip、maven、nuget、composer、pub、actions、bundler、gomod、cargo、hex、swift 等生态。

使用方式:轻量操作(查告警、查单个包)可直接进行;重量操作(下载 Dependabot CLI、全仓库审计)需先征得用户确认。查询特定包时调用 check_dependency_vulnerabilities,传入 owner、repo 及 dependencies(name、version、ecosystem),每次最多 30 个。扫描分支变更时先用 git diff 找出变更的依赖文件,再解析并批量检查。全量审计需先发现所有依赖清单文件(最多搜索 4 层目录,排除 node_modules、.git、vendor),再解析检查。提交后安全检查需 Dependabot CLI,流程为检测变更清单、用 dependabot graph 构建前后依赖图、对比新增/更新依赖、查询 Advisory Database、报告并迭代修复。

适用场景:合并前验证新依赖、定期依赖审计、供应链安全排查、合规审计准备。

限制:需要启用 GitHub MCP Server 的 dependabot 工具集;仓库需托管在 GitHub 且启用 Dependabot 才能查告警,否则回退到单包查询;Dependabot CLI 约 50MB,需用户同意后下载;自动修复仅对 Critical 和 High 级别阻断,Medium 和 Low 仅报告;传递依赖需升级父依赖或使用 resolutions/overrides 处理。

配置示例: { "mcpServers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } } }

安装 Dependabot CLI: which dependabot 2>/dev/null && dependabot --version go install github.com/dependabot/cli/cmd/dependabot@latest

严重级别参考:Critical(9.0–10.0)立即修复;High(7.0–8.9)尽快修复;Medium(4.0–6.9)安排修复;Low(0.1–3.9)跟踪处理。