1
0
mirror of synced 2026-01-04 00:06:20 -05:00
Files
docs/content/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates.md
2022-06-01 11:14:17 +01:00

8.7 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
/articles/configuring-automated-security-fixes
/github/managing-security-vulnerabilities/configuring-automated-security-fixes
/github/managing-security-vulnerabilities/configuring-automated-security-updates
/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates
/github/managing-security-vulnerabilities/configuring-dependabot-security-updates
/code-security/supply-chain-security/configuring-dependabot-security-updates
/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates
fpt ghec ghes
* * >3.2
how_to
Dependabot
Security updates
Alerts
Dependencies
Pull requests
Repositories

{% 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 %} 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. For more information, see "Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories" below.

{% 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 every repository that meets these prerequisites.

{% note %}

Note: You can manually enable {% data variables.product.prodname_dependabot_security_updates %}, even if the repository doesn't meet some of the prerequisites below. For example, you can enable {% data variables.product.prodname_dependabot_security_updates %} on a fork, or for a package manager that isn't directly supported by following the instructions in "Managing {% data variables.product.prodname_dependabot_security_updates %} for your repositories."

{% endnote %}

Automatic enablement prerequisite More information
Repository is not a fork "About forks"
Repository is not archived "Archiving repositories"
Repository is public, or repository is private and you have enabled read-only analysis by {% data variables.product.prodname_dotcom %}, dependency graph, and vulnerability alerts in the repository's settings "Managing data use settings for your private repository."
Repository contains dependency manifest file from a package ecosystem that {% data variables.product.prodname_dotcom %} supports "Supported package ecosystems"
{% data variables.product.prodname_dependabot_security_updates %} are not disabled for the repository "Managing {% data variables.product.prodname_dependabot_security_updates %} for your repository"

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 an individual repository (see below).

You can also enable or disable {% data variables.product.prodname_dependabot_security_updates %} for all 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."

{% data variables.product.prodname_dependabot_security_updates %} require specific repository settings. For more information, see "Supported repositories."

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 %}

  1. 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 %}Screenshot of "Code security and analysis" section with button to enable {% data variables.product.prodname_dependabot_security_updates %}{% elsif ghes > 3.6 or ghae-issue-7044 %} {% else %}Screenshot of "Code security and analysis" section with button to enable {% data variables.product.prodname_dependabot_security_updates %}{% 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."

Further reading