Skip to main content

配置 Dependabot 警报

启用 Dependabot alerts,以便在你的仓库中发现新的易受攻击依赖项时生成警报。

谁可以使用此功能?

  • 存储库管理员、组织所有者以及具有“写入”或“维护”访问权限的人员********
  • 具有显式访问权限的用户和团队。 请参阅授予对安全警报的访问权限

When Dependabot detects vulnerable dependencies in a repository, it generates alerts. For more information, see About Dependabot alerts.

You can enable or disable Dependabot alerts for:

  • Your personal account
  • Your repository
  • Your organization

Managing Dependabot alerts for your personal account

You can enable or disable Dependabot alerts for all repositories owned by your personal account.

Go to your security settings

Enabling or disabling Dependabot alerts for existing repositories

  1. Under "Advanced Security", to the right of Dependabot alerts, click Disable all or Enable all.
  2. Optionally, to enable Dependabot alerts by default for new repositories that you create, in the dialog box, select "Enable by default for new repositories".
  3. Click Disable Dependabot alerts or Enable Dependabot alerts to disable or enable Dependabot alerts for all the repositories you own.

When you enable Dependabot alerts for existing repositories, you will see any results displayed on GitHub within minutes.

Enabling or disabling Dependabot alerts for new repositories

  1. Under "Advanced Security", to the right of Dependabot alerts, select Automatically enable for new repositories.

Managing Dependabot alerts for your repository

You can manage Dependabot alerts for your public, private or internal repository.

By default, we notify people with write, maintain, or admin permissions in the affected repositories about new Dependabot alerts. GitHub never publicly discloses insecure dependencies for any repository. You can also make Dependabot alerts visible to additional people or teams working on repositories that you own or have admin permissions for.

If you enable security and analysis features, GitHub performs read-only analysis on your repository.

Enabling or disabling Dependabot alerts for a repository

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Security" section of the sidebar, click Advanced Security.

  4. Under "Advanced Security", to the right of Dependabot alerts, click Enable to enable alerts or Disable to disable alerts.

Managing Dependabot alerts for your organization

You can enable Dependabot alerts for all eligible repositories in your organization. For more information, see About enabling security features at scale.

Managing Dependabot alerts at scale with rules

Additionally, you can use Dependabot auto-triage rules to manage your alerts at scale, so you can auto-dismiss or snooze alerts, and specify which alerts you want Dependabot to open pull requests for. For information about the different types of auto-triage rules, and whether your repositories are eligible, see About Dependabot auto-triage rules.