关于 GitHub Enterprise Server 上易受攻击的依赖项的警报
To identify vulnerable dependencies in your repository and receive alerts about vulnerabilities, you need to enable two security features:
- The dependency graph
- Dependabot 警报
For more information, see "About the dependency graph" and "About alerts for vulnerable dependencies."
我们从以下来源添加漏洞到 GitHub Advisory Database:
You can connect 您的 GitHub Enterprise Server 实例 to GitHub.com, then sync vulnerability data to your instance and generate Dependabot 警报 in repositories with a vulnerable dependency.
After connecting 您的 GitHub Enterprise Server 实例 to GitHub.com and enabling the dependency graph and Dependabot 警报 for vulnerable dependencies, vulnerability data is synced from GitHub.com to your instance once every hour. 您还可以随时选择手动同步漏洞数据。 代码和关于代码的信息不会从 您的 GitHub Enterprise Server 实例 上传到 GitHub.com。
When 您的 GitHub Enterprise Server 实例 receives information about a vulnerability, it will identify repositories in your instance that use the affected version of the dependency and generate Dependabot 警报. 您可以自定义接收 Dependabot 警报 的方式。 更多信息请参阅“为易受攻击的依赖项配置通知”。
Enabling the dependency graph and Dependabot 警报 on GitHub Enterprise Server
For 您的 GitHub Enterprise Server 实例 to generate Dependabot 警报 whenever vulnerabilities are detected on your repositories:
- You must connect 您的 GitHub Enterprise Server 实例 to GitHub.com. 更多信息请参阅“将 GitHub Enterprise Server 连接到 GitHub Enterprise Cloud”。
- You must enable the dependency graph.
You can enable the dependency graph via the 管理控制台 or the administrative shell. We recommend you follow the 管理控制台 route unless 您的 GitHub Enterprise Server 实例 uses clustering.
Enabling the dependency graph via the 管理控制台
- 登录到
http(s)://HOSTNAME/login上的 您的 GitHub Enterprise Server 实例。 - 从 GitHub Enterprise Server 上的管理帐户,点击任何页面右上角的 。

- 在左侧边栏中,单击 管理控制台。

- In the left sidebar, click Security.

- Under "Security," click Dependency graph.

- 在左侧边栏下,单击 Save settings(保存设置)。

- 等待配置运行完毕。
- 单击 Visit your instance(访问您的实例)。
Enabling the dependency graph via the administrative shell
-
登录到
http(s)://HOSTNAME/login上的 您的 GitHub Enterprise Server 实例。 -
In the administrative shell, enable the dependency graph on 您的 GitHub Enterprise Server 实例:
$ ghe-config app.dependency-graph.enabled true注:有关启用通过 SSH 访问管理 shell 的更多信息,请参阅“访问管理 shell (SSH)”。
-
应用配置。
$ ghe-config-apply -
返回到 GitHub Enterprise Server。
启用 Dependabot 警报
Before enabling Dependabot 警报 for your instance, you need to enable the dependency graph. For more information, see above.
-
在 GitHub Enterprise Server 的右上角,单击您的个人资料照片,然后单击 Enterprise settings(Enterprise 设置)。

-
In the enterprise account sidebar, click GitHub Connect.

-
在“Repositories can be scanned for vulnerabilities(可扫描仓库漏洞)”下,使用下拉菜单,并选择 Enabled without notifications(启用但不发通知)。 (可选)要启用包含通知的警报,请选择 Enabled with notifications(启用并发通知)。

We recommend configuring Dependabot 警报 without notifications for the first few days to avoid an overload of emails. 几天后,您可以开启通知,像往常一样接收 Dependabot 警报。
查看 GitHub Enterprise Server 上易受攻击的依赖项
您可以查看 您的 GitHub Enterprise Server 实例 中的所有漏洞,然后手动同步 GitHub.com 中的漏洞数据,以更新列表。
- 从 GitHub Enterprise Server 上的管理帐户,点击任何页面右上角的 。

- 在左侧边栏中,单击 Vulnerabilities。

- 要同步漏洞数据,请单击 Sync Vulnerabilities now。


