Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,31 @@ You can also enable or disable {% data variables.product.prodname_dependabot_sec
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 %}!["Code security and analysis" section with button to enable {% data variables.product.prodname_dependabot_security_updates %}](/assets/images/help/repository/enable-dependabot-security-updates-button.png){% else %}!["Code security and analysis" section with button to enable {% data variables.product.prodname_dependabot_security_updates %}](/assets/images/enterprise/3.3/repository/security-and-analysis-disable-or-enable-ghes.png){% 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](/code-security/dependabot/dependabot-version-updates/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`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-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](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#configuration-options-for-the-dependabotyml-file)."

## Further reading

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,11 @@ Any options that also affect security updates are used the next time a security

The *dependabot.yml* file has two mandatory top-level keys: `version`, and `updates`. You can, optionally, include a top-level `registries` key{% ifversion fpt or ghec or ghes > 3.4 %} and/or a `enable-beta-ecosystems` key{% endif %}. The file must start with `version: 2`.

## Configuration options for updates
## Configuration options for the *dependabot.yml* file

The top-level `updates` key is mandatory. You use it to configure how {% data variables.product.prodname_dependabot %} updates the versions or your project's dependencies. Each entry configures the update settings for a particular package manager. You can use the following options.

| Option | Required | Description |
|:---|:---:|:---|
| [`package-ecosystem`](#package-ecosystem) | **X** | Package manager to use |
| [`directory`](#directory) | **X** | Location of package manifests |
| [`schedule.interval`](#scheduleinterval) | **X** | How often to check for updates |
| [`allow`](#allow) | | Customize which updates are allowed |
| [`assignees`](#assignees) | | Assignees to set on pull requests |
| [`commit-message`](#commit-message) | | Commit message preferences |{% ifversion fpt or ghec or ghes > 3.4 %}
| [`enable-beta-ecosystems`](#enable-beta-ecosystems) | | Enable ecosystems that have beta-level support |{% endif %}
| [`ignore`](#ignore) | | Ignore certain dependencies or versions |
| [`insecure-external-code-execution`](#insecure-external-code-execution) | | Allow or deny code execution in manifest files |
| [`labels`](#labels) | | Labels to set on pull requests |
| [`milestone`](#milestone) | | Milestone to set on pull requests |
| [`open-pull-requests-limit`](#open-pull-requests-limit) | | Limit number of open pull requests for version updates|
| [`pull-request-branch-name.separator`](#pull-request-branch-nameseparator) | | Change separator for pull request branch names |
| [`rebase-strategy`](#rebase-strategy) | | Disable automatic rebasing |
| [`registries`](#registries) | | Private registries that {% data variables.product.prodname_dependabot %} can access|
| [`reviewers`](#reviewers) | | Reviewers to set on pull requests |
| [`schedule.day`](#scheduleday) | | Day of week to check for updates |
| [`schedule.time`](#scheduletime) | | Time of day to check for updates (hh:mm) |
| [`schedule.timezone`](#scheduletimezone) | | Timezone for time of day (zone identifier) |
| [`target-branch`](#target-branch) | | Branch to create pull requests against |
| [`vendor`](#vendor) | | Update vendored or cached dependencies |
| [`versioning-strategy`](#versioning-strategy) | | How to update manifest version requirements |
{% data reusables.dependabot.configuration-options %}

These options fit broadly into the following categories.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ The {% data variables.product.prodname_dependabot_alerts %} count in {% data var
**Check**: If there is a discrepancy in the totals you are seeing, check that you are not comparing alert numbers with dependency numbers. Also check that you are viewing all alerts and not a subset of filtered alerts.
{% endif %}

{% ifversion fpt or ghec or ghes > 3.2 %}
## Can Dependabot ignore specific dependencies?

You can configure {% data variables.product.prodname_dependabot %} to ignore specific dependencies in the configuration file, which will prevent security and version updates for those dependencies. If you only wish to use security updates, you will need to override the default behavior with a configuration file. For more information, see "[Overriding the default behavior with a configuration file](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#overriding-the-default-behavior-with-a-configuration-file) to prevent version updates from being activated. For information about ignoring dependencies, see "[`ignore`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore)."
{% endif %}

## Further reading

- "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ There are two types of {% data variables.product.prodname_dependabot_updates %}:
- Triggered by a {% data variables.product.prodname_dependabot %} alert
- Update dependencies to the minimum version that resolves a known vulnerability
- Supported for ecosystems the dependency graph supports
- Does not require a configuration file, but you can use one to override the default behavior

{% data variables.product.prodname_dependabot_version_updates %}:
- Requires a configuration file
- Run on a schedule you configure
- Update dependencies to the latest version that matches the configuration
- Supported for a different group of ecosystems
Expand Down
24 changes: 24 additions & 0 deletions data/reusables/dependabot/configuration-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
| Option | Required | Security Updates | Version Updates | Description |
|:---|:---:|:---:|:---:|:---|
| [`package-ecosystem`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem) | **X** | | X | Package manager to use |
| [`directory`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directory) | **X** | | X | Location of package manifests |
| [`schedule.interval`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval) | **X** | | X | How often to check for updates |
| [`allow`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow) | | X | X | Customize which updates are allowed |
| [`assignees`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#assignees) | | X | X | Assignees to set on pull requests |
| [`commit-message`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message) | | X | X | Commit message preferences |{% ifversion fpt or ghec or ghes > 3.4 %}
| [`enable-beta-ecosystems`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#enable-beta-ecosystems) | | | X | Enable ecosystems that have beta-level support |{% endif %}
| [`ignore`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore) | | X | X | Ignore certain dependencies or versions |
| [`insecure-external-code-execution`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#insecure-external-code-execution) | | | X | Allow or deny code execution in manifest files |
| [`labels`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#labels) | | X | X | Labels to set on pull requests |
| [`milestone`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#milestone) | | X | X | Milestone to set on pull requests |
| [`open-pull-requests-limit`](#open-pull-requests-limit) | | X | X | Limit number of open pull requests for version updates |
| [`pull-request-branch-name.separator`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#pull-request-branch-nameseparator) | | X | X | Change separator for pull request branch names |
| [`rebase-strategy`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#rebase-strategy) | | X | X | Disable automatic rebasing |
| [`registries`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#registries) | | | X | Private registries that {% data variables.product.prodname_dependabot %} can access|
| [`reviewers`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#reviewers) | | X | X | Reviewers to set on pull requests |
| [`schedule.day`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleday) | | | X | Day of week to check for updates |
| [`schedule.time`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduletime) | | | X | Time of day to check for updates (hh:mm) |
| [`schedule.timezone`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduletimezone) | | | X | Timezone for time of day (zone identifier) |
| [`target-branch`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#target-branch) | | X | X | Branch to create pull requests against |
| [`vendor`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#vendor) | | | X | Update vendored or cached dependencies |
| [`versioning-strategy`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#versioning-strategy) | | X | X | How to update manifest version requirements |