6.8 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 %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For more information, see "AUTOTITLE."
You can enable or disable {% data variables.product.prodname_dependabot_security_updates %} for an individual repository{% ifversion code-security-multi-repo-enablement %}, for a selection of repositories in an organization,{% endif %} or for all repositories owned by your personal account or organization. For more information about enabling security features in an organization, see "AUTOTITLE."
{% 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 "AUTOTITLE" or "AUTOTITLE."
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 %}
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 "AUTOTITLE."
If you only require security updates and want to exclude version updates, you can set open-pull-requests-limit to 0 in order to prevent version updates for a given package-ecosystem. For more information, see "AUTOTITLE."
# Example configuration file that:
# - Has a private registry
# - Ignores lodash dependency
# - Disables version-updates
version: 2
registries:
example:
type: npm-registry
url: https://example.com
token: {% raw %}${{secrets.NPM_TOKEN}}{% endraw %}
updates:
- package-ecosystem: "npm"
directory: "/src/npm-project"
schedule:
interval: "daily"
ignore:
- dependency-name: "lodash"
# For Lodash, ignore all updates
# Disable version updates for npm dependencies
open-pull-requests-limit: 0
registries:
- example
{% note %}
Note: In order for {% data variables.product.prodname_dependabot %} to use this configuration for security updates, the directory must be the path to the manifest files, and you should not specify a target-branch.
{% endnote %}
For more information about the configuration options available for security updates, see the table in "AUTOTITLE."