Co-authored-by: Peter Bengtsson <mail@peterbe.com> Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
7.3 KiB
title, intro, shortTitle, redirect_from, versions, type, topics
| title | intro | shortTitle | redirect_from | versions | type | topics | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Configuring Dependabot security updates | You can use {% data variables.product.prodname_dependabot_security_updates %} or manual pull requests to easily update vulnerable dependencies. | Configure security updates |
|
|
how_to |
|
{% data reusables.dependabot.beta-security-and-version-updates %} {% data reusables.dependabot.enterprise-enable-dependabot %}
About configuring {% data variables.product.prodname_dependabot_security_updates %}
You can enable {% data variables.product.prodname_dependabot_security_updates %} at the repository level or for all repositories owned by your personal account or organization. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For more information, see "About {% data variables.product.prodname_dependabot_security_updates %}."
You can disable {% data variables.product.prodname_dependabot_security_updates %} for an individual repository or for all repositories owned by your personal account or organization.
{% ifversion fpt or ghec %}{% data reusables.dependabot.dependabot-tos %}{% endif %}
Supported repositories
{% data variables.product.prodname_dotcom %} automatically enables {% data variables.product.prodname_dependabot_security_updates %} for newly created repositories if your personal account or organization has enabled Automatically enable for new repositories for {% data variables.product.prodname_dependabot_security_updates %}. For more information, see "Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories."
If you create a fork of a repository that has security updates enabled, {% data variables.product.prodname_dotcom %} will automatically disable {% data variables.product.prodname_dependabot_security_updates %} for the fork. You can then decide whether to enable {% data variables.product.prodname_dependabot_security_updates %} on the specific fork.
If security updates are not enabled for your repository and you don't know why, first try enabling them using the instructions given in the procedural sections below. If security updates are still not working, you can contact {% data variables.contact.contact_support %}.
Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories
You can enable or disable {% data variables.product.prodname_dependabot_security_updates %} for all qualifying repositories owned by your personal account or organization. For more information, see "Managing security and analysis settings for your personal account" or "Managing security and analysis settings for your organization."
You can also enable or disable {% data variables.product.prodname_dependabot_security_updates %} for an individual repository.
Enabling or disabling {% data variables.product.prodname_dependabot_security_updates %} for an individual repository
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %}
- Under "Code security and analysis", to the right of "{% data variables.product.prodname_dependabot %} security updates", click Enable to enable the feature or Disable to disable it. {% ifversion fpt or ghec %}For public repositories, the button is disabled if the feature is always enabled.{% endif %}
{% ifversion fpt or ghec %}
{% elsif ghes > 3.6 or ghae > 3.6 %} {% else %}
{% endif %}
Overriding the default behavior with a configuration file
You can override the default behavior of {% data variables.product.prodname_dependabot_security_updates %} by adding a dependabot.yml file to your repository. For more information, see "Configuration options for the dependabot.yml file."
If you only require security updates and want to exclude version updates, you can set open-pull-request-limit to 0 in order to prevent version updates for a given package-ecosystem. For more information, see "open-pull-request-limit."
# Example configuration file that:
# - Ignores lodash dependency
# - Disables version-updates
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "lodash"
# For Lodash, ignore all updates
# Disable version updates for npm dependencies
open-pull-requests-limit: 0
For more information about the configuration options available for security updates, see the table in "Configuration options for the dependabot.yml file."