当 Dependabot 检测到存储库中存在易受攻击的依赖项时,则会生成警报。 有关详细信息,请参阅“关于 Dependabot 警报”。
可以为以下项启用或禁用 Dependabot alerts:
- 你的个人帐户
- 你的存储库
- 你的组织
为个人帐户管理 Dependabot alerts
可以为你的个人帐户拥有的所有存储库启用或禁用 Dependabot alerts。
<a href="https://github.com/settings/security_analysis?ref_product=github&ref_type=engagement&ref_style=button" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline">
<span>转到安全设置</span> <svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-link-external" aria-label="link external icon" role="img"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg></a>
为现有存储库启用或禁用 Dependabot alerts
- 在“Advanced Security”下的 Dependabot alerts 右侧,单击“Disable all”或“Enable all”。********
- (可选)若要默认为创建的新存储库启用 Dependabot alerts,请在对话框中选择“默认为新存储库启用”。
- 点击禁用 Dependabot alerts 或启用 Dependabot alerts,可为你拥有的所有仓库禁用或启用 Dependabot alerts。
为现有存储库启用 Dependabot alerts 时,将在几分钟内看到 GitHub 上显示的任何结果。
为新存储库启用或禁用 Dependabot alerts
- 在“Advanced Security”下的 Dependabot alerts 右侧,单击“Automatically enable for new repositories”。****
为存储库管理 Dependabot alerts
可以为公共、私有或内部存储库管理 Dependabot alerts。
默认情况下,我们会通知受影响仓库中具有写入、维护或管理员权限的人有关新的 Dependabot alerts。 GitHub 永远不会公开披露任何仓库的不安全依赖项。 你也可以将 Dependabot alerts 设为对操作你拥有的或具有管理员权限的存储库的其他人或团队可见。
如果启用了安全和分析功能,GitHub 将对存储库执行只读分析。
为存储库启用或禁用 Dependabot alerts
-
在 GitHub 上,导航到存储库的主页面。
-
在仓库名称下,单击 “Settings”****。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”。

-
在边栏的“Security”部分中,单击“ Advanced Security”****。
-
在“Advanced Security”下的 Dependabot alerts 右侧,单击“Enable”以启用警报,或单击“Disable”以禁用警报。********
为组织管理 Dependabot alerts
你可以为组织中所有符合条件的仓库启用 Dependabot alerts。 有关详细信息,请参阅“关于批量启用安全功能”。
使用规则大规模管理 Dependabot alerts
此外,可以使用 Dependabot 自动分类规则 大规模管理警报,以便自动关闭或推迟警报,并指定希望 Dependabot 打开拉取请求的警报。 有关不同类型的自动会审规则以及仓库是否符合条件的信息,请参阅“关于 Dependabot 自动分类规则”。