仓库的 GitHub Dependabot 警报选项卡列出所有打开和关闭的 GitHub Dependabot 警报 以及对应的 GitHub Dependabot 安全更新。 您可以使用下拉菜单对警报列表进行排序,并且可以单击特定警报以获取更多详细信息。 更多信息请参阅“关于易受攻击的依赖项的警报”。
您可以为使用 GitHub Dependabot 警报 和依赖关系图的任何仓库启用自动安全更新。 更多信息请参阅“配置 GitHub Dependabot 安全更新”。
关于仓库中有漏洞的依赖项的更新
当我们检测到影响到您的仓库的漏洞时,GitHub 会发出 GitHub Dependabot 警报。 对于启用了 GitHub Dependabot 安全更新 的仓库,当 GitHub 检测到有漏洞的依赖项时,Dependabot 会创建拉取请求来修复它。 The pull request will upgrade the dependency to the minimum possible secure version needed to avoid the vulnerability.
Note: It's good practice to have automated tests and acceptance processes in place so that checks are carried out before the pull request is merged. This is particularly important if the suggested version to upgrade to contains additional functionality, or a change that breaks your project's code. For more information about continuous integration, see "About continuous integration."
查看和更新有漏洞的依赖项
- 在 GitHub 上,导航到仓库的主页面。
- 在仓库名称下,单击 Security(安全)。

- In the security sidebar, click Dependabot alerts.

- 单击您想要查看的警报。

- 查看漏洞的详细信息以及包含自动安全更新的拉取请求(如果有)。
- (可选)如果还没有针对该警报的 GitHub Dependabot 安全更新 更新,要创建拉取请求以解决该漏洞,请单击 Create Dependabot security update(创建 Dependabot 安全更新)。

- 当您准备好更新依赖项并解决漏洞时,合并拉取请求。 Dependabot 提出的每个拉取请求都包含可用于控制 Dependabot 的命令的相关信息。 更多信息请参阅“管理依赖项更新的拉取请求”。
- (可选)如果警报正在修复、不正确或位于未使用的代码中,请使用“Dismiss(忽略)”,然后单击忽略警报的原因。
