Skip to main content

Enabling Dependabot for your enterprise

You can allow users of 您的 GitHub Enterprise Server 实例 to find and fix vulnerabilities in code dependencies by enabling Dependabot 警报 and Dependabot 更新.

Enterprise owners can enable Dependabot.

About Dependabot for GitHub Enterprise Server

Dependabot helps users of 您的 GitHub Enterprise Server 实例 find and fix vulnerabilities in their dependencies. You can enable Dependabot 警报 to notify users about vulnerable dependencies and Dependabot 更新 to fix the vulnerabilities and keep dependencies updated to the latest version.

About Dependabot 警报

With Dependabot 警报, GitHub identifies insecure dependencies in repositories and creates alerts on 您的 GitHub Enterprise Server 实例, using data from the GitHub Advisory Database and the dependency graph service.

We add advisories to the GitHub Advisory Database from the following sources:

After you enable Dependabot 警报 for your enterprise, vulnerability data is synced from the GitHub Advisory Database to your instance once every hour. Only GitHub-reviewed advisories are synchronized. For more information about advisory data, see "Browsing security advisories in the GitHub Advisory Database" in the GitHub.com documentation.

You can also choose to manually sync vulnerability data at any time. For more information, see "Viewing the vulnerability data for your enterprise."

Note: When you enable Dependabot 警报, no code or information about code from 您的 GitHub Enterprise Server 实例 is uploaded to GitHub.com.

When 您的 GitHub Enterprise Server 实例 receives information about a vulnerability, it identifies repositories in 您的 GitHub Enterprise Server 实例 that use the affected version of the dependency and generates Dependabot 警报. You can choose whether or not to notify users automatically about new Dependabot 警报.

For repositories with Dependabot 警报 enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added to 您的 GitHub Enterprise Server 实例, GitHub Enterprise Server scans all existing repositories on 您的 GitHub Enterprise Server 实例 and generates alerts for any repository that is vulnerable. For more information, see "About Dependabot 警报."

About Dependabot 更新

After you enable Dependabot 警报, you can choose to enable Dependabot 更新. When Dependabot 更新 are enabled for 您的 GitHub Enterprise Server 实例, users can configure repositories so that their dependencies are updated and kept secure automatically.

Note: Dependabot 更新 on GitHub Enterprise Server requires GitHub Actions with self-hosted runners.

By default, GitHub Actions runners used by Dependabot need access to the internet, to download updated packages from upstream package managers. For Dependabot 更新 powered by GitHub Connect, internet access provides your runners with a token that allows access to dependencies and advisories hosted on GitHub.com.

With Dependabot 更新, GitHub automatically creates pull requests to update dependencies in two ways.

  • Dependabot 版本更新: Users add a Dependabot configuration file to the repository to enable Dependabot to create pull requests when a new version of a tracked dependency is released. For more information, see "About Dependabot 版本更新."
  • Dependabot 安全更新: Users toggle a repository setting to enable Dependabot to create pull requests when GitHub detects a vulnerability in one of the dependencies of the dependency graph for the repository. For more information, see "About Dependabot 警报" and "About Dependabot 安全更新."

Enabling Dependabot 警报

Before you can enable Dependabot 警报:

  1. 在 GitHub Enterprise Server 的右上角,单击您的个人资料照片,然后单击 Enterprise settings(Enterprise 设置)GitHub Enterprise Server 上个人资料照片下拉菜单中的"Enterprise settings(企业设置)"

  2. 在企业帐户边栏中,单击 GitHub Connect企业帐户边栏中的 GitHub Connect 选项卡

  3. Under "Dependabot", to the right of "Users can receive vulnerability alerts for open source code dependencies", select the dropdown menu and click Enabled without notifications. Optionally, to enable alerts with notifications, click Enabled with notifications.

    Screenshot of the dropdown menu to enable scanning repositories for vulnerabilities

    Tip: We recommend configuring Dependabot 警报 without notifications for the first few days to avoid an overload of emails. After a few days, you can enable notifications to receive Dependabot 警报 as usual.

Enabling Dependabot 更新

After you enable Dependabot 警报 for your enterprise, you can enable Dependabot 更新.

Before you enable Dependabot 更新, you must configure 您的 GitHub Enterprise Server 实例 to use GitHub Actions with self-hosted runners. For more information, see "Getting started with GitHub Actions for GitHub Enterprise Server."

Dependabot 更新 are not supported on GitHub Enterprise Server if your enterprise uses clustering.

  1. 登录到 http(s)://HOSTNAME/login 上的 您的 GitHub Enterprise Server 实例。

  2. 从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击

    用于访问站点管理员设置的火箭飞船图标的屏幕截图

  3. 如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)

    "站点管理员" 链接的屏幕截图

  4. 在左侧边栏中,单击 管理控制台左侧边栏中的 管理控制台 选项卡

  5. 在左侧边栏中,单击 Security(安全性)Security sidebar

  6. Under "Security", select Dependabot 安全更新.

    Screenshot of the checkbox to enable or disable Dependabot 安全更新

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

    管理控制台 中保存设置按钮的屏幕截图

    注意: 管理控制台 中的保存设置将重新启动系统服务,这可能会导致用户可见的停机时间。

  8. 等待配置运行完毕。

    配置实例

  9. Click Visit your instance.

  10. Configure self-hosted runners to create the pull requests that will update dependencies. For more information, see "Managing self-hosted runners for Dependabot 更新 on your enterprise."

  11. 在 GitHub Enterprise Server 的右上角,单击您的个人资料照片,然后单击 Enterprise settings(Enterprise 设置)GitHub Enterprise Server 上个人资料照片下拉菜单中的"Enterprise settings(企业设置)"

  12. 在企业帐户边栏中,单击 GitHub Connect企业帐户边栏中的 GitHub Connect 选项卡

  13. Under "Dependabot", to the right of "Users can easily upgrade to non-vulnerable open source code dependencies", click Enable.

    Screenshot of the dropdown menu to enable updating vulnerable dependencies

When you enable Dependabot 警报, you should consider also setting up GitHub Actions for Dependabot 安全更新. This feature allows developers to fix vulnerabilities in their dependencies. For more information, see "Managing self-hosted runners for Dependabot 更新 on your enterprise."

If you need enhanced security, we recommend configuring Dependabot to use private registries. For more information, see "Managing encrypted secrets for Dependabot."