SuperAPI AI 工具集

dependency-scanning

智能体与模型

查看项目

更新于 10-15 21:52

技能介绍

用途:该技能通过 GitHub MCP Server 的 Dependabot 工具集和 check_dependency_vulnerabilities 工具,查找项目依赖中的已知安全漏洞,可检查现有 Dependabot 告警、查询特定包,并在合并前验证新依赖。仅在用户明确要求检查依赖或扫描漏洞时使用,不应在常规工作流中自动运行。

主要能力:检查仓库中处于 open 状态的 Dependabot 告警(list_dependabot_alerts),获取单个告警详情(get_dependabot_alert);用 check_dependency_vulnerabilities 查询指定包/版本;扫描本地分支变更中的依赖文件;对整个项目做完整依赖审计;还提供提交后安全检查(需 Dependabot CLI)。

支持生态:npm、pip、maven、nuget、composer、pub、actions、bundler、gomod、cargo、hex、swift,映射文件包括 package.json、package-lock.json、requirements.txt、pyproject.toml、go.mod、Gemfile、Cargo.toml、pom.xml、*.csproj、composer.json、pubspec.yaml、Package.swift 等。

使用方式:轻量操作(查告警、查单个包)可直接进行;重量操作(下载 Dependabot CLI、全量审计)需先向用户确认。扫描需要仓库 owner 与 repo 名称,通常从 git remote get-url origin 获取。变更扫描先用 git diff 过滤出依赖文件,若无变更则提前退出;再解析依赖并通过工具批量查询(每次最多 30 个)。提交后安全检查流程为:检测变更清单文件、用 dependabot graph 构建改动前后依赖图、比对找出新增或更新的直接依赖、查询漏洞、报告并迭代修复。需配置 mcpServers 中的 github(type http,url https://api.githubcopilot.com/mcp/;Cursor 使用 servers 键)。Dependabot CLI 可通过 go install github.com/dependabot/cli/cmd/dependabot@latest 安装,或从 GitHub releases 下载预编译二进制。

限制:仅在用户明确请求时使用;需要 GitHub MCP Server 且启用 dependabot 工具集;Dependabot 未启用时回退到单包查询;自动修复只阻断 Critical 与 High,Medium/Low 仅报告不阻断;传递依赖需更新父依赖或用 resolutions/overrides 等方式;无补丁时需提供缓解措施。报告含 GHSA 编号、严重度与摘要,应直接展示给用户并附修复建议。