MSBA-360 · Lesson 7 of 12 · 18 min

Dependabot security and version updates

▶ Video coming soon A video version of this lesson is on the way.

An alert says something is wrong. A pull request fixes it. In the seventh session Wilhelmus walked through the two ways Dependabot changes dependencies for you, and through the configuration that decides how often, in what groups and with what delays it does so. By the end of the session he had replaced 140 copies of slightly different configuration files with three templates.

Two kinds of update

Dependabot security updates are pull requests that upgrade a vulnerable dependency to the minimum version that fixes a Dependabot alert. They are triggered by alerts: when an alert appears and a patched version exists, Dependabot opens a pull request that changes the manifest and lock file, links the alert and includes release notes and the commits between versions. When the pull request is merged, the alert closes. Security updates are turned on in the repository's code security settings or through a security configuration, and they need Dependabot alerts to be on.

Dependabot version updates are pull requests that keep dependencies current whether or not they are vulnerable. They are configured in a file called dependabot.yml in the .github directory, which says which ecosystems and directories to check, how often, and which updates to group or ignore. Version updates exist because a dependency that is many versions behind is harder to fix in an emergency: the patched version may require a major upgrade that nobody has time to make on the day a critical advisory is published.

Two timelines. Top, security updates: an advisory is published, an alert appears, a pull request to the minimum patched version opens immediately, and merging closes the alert. Bottom, version updates: a new release is published, Dependabot waits three days for the default cooldown, then a scheduled weekly run opens a grouped pull request.
Security updates respond to alerts at once; version updates follow a schedule and, since July 2026, a default cooldown.
Comparing the two kinds of Dependabot pull request.
Security updatesVersion updates
Triggered byA Dependabot alert with a patched versionA schedule in dependabot.yml
Target versionThe minimum version that fixes the alertThe latest version allowed by the configuration
Configured inRepository settings or a security configuration; grouping options in dependabot.ymldependabot.yml
Default cooldownNone: opened immediatelyThree days since July 2026
GoalClose a known vulnerabilityStay current so fixes are easy later

The dependabot.yml file

A version update configuration is a YAML file with a version number, version 2, and a list of updates. Each entry names a package-ecosystem, such as npm, pip, maven, docker or github-actions; a directory, or a list of directories, where the manifests live; and a schedule with an interval such as daily, weekly or monthly. Optional settings control grouping, ignored dependencies, the branch to target, labels and reviewers, the number of open pull requests allowed and access to private registries.

Skerry's web service template for dependabot.yml. Groups and ignores keep the number of pull requests manageable.
version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: weekly
      day: monday
    open-pull-requests-limit: 5
    groups:
      dev-tooling:
        dependency-type: development
        update-types: [minor, patch]
      framework:
        patterns: ["@skerry/web-*", "react", "react-dom"]
    ignore:
      - dependency-name: "legacy-charting"
        update-types: ["version-update:semver-major"]
    labels: [dependencies]
  - package-ecosystem: github-actions
    directory: "/"
    schedule:
      interval: weekly

Grouping updates

Without grouping, Dependabot opens one pull request per dependency. A busy JavaScript project can receive twenty a week, each needing review and a build, and developers learn to ignore them. Groups combine related updates into one pull request. A group can match dependencies by patterns of package names, by dependency-type, development or production, and by update-types, such as only minor and patch updates. Updates that match no group still arrive individually.

Groups can apply to security updates as well. With grouped security updates turned on in the repository or organization settings, Dependabot combines security fixes for the same ecosystem and directory into one pull request instead of one per alert, and a group in dependabot.yml can be limited to security updates with the applies-to option. Wilhelmus kept security updates ungrouped for the payment code, where he wanted each fix reviewed on its own, and grouped them everywhere else.

Cooldowns

A new release of a package is not always a safe release. Some of the most damaging supply chain attacks in 2025 and 2026 published a malicious version of a popular package that was installed thousands of times before anyone noticed and the registry removed it. A cooldown tells Dependabot to wait a number of days after a release before proposing it, so that malicious or broken releases are usually caught and pulled first.

In July 2026 GitHub made a three-day cooldown the default for version updates on GitHub.com; GitHub Enterprise Server gets the default in version 3.23. Security updates are not affected: when a vulnerability fix is released, the pull request opens immediately. The cooldown option in dependabot.yml can lengthen the wait, shorten it, set different waits for major, minor and patch releases or turn it off. Skerry kept the default for most projects and set a seven-day cooldown for its build tooling.

Worked problem

Cooldowns and an urgent fix

A library Skerry uses releases version 3.4.2 to fix a critical vulnerability with an advisory. The same day, a different library releases 2.1.0 with new features. With the default cooldown, when does Dependabot propose each change?

Show solution
  1. The 3.4.2 release fixes an advisory, so Dependabot raises an alert and a security update pull request at once. Cooldowns do not apply to security updates.
  2. The 2.1.0 release is a normal version update. Dependabot waits until it has been available for at least three days.
  3. It is then proposed on the next scheduled run, which for Skerry's weekly schedule is the following Monday.
  4. If 2.1.0 were withdrawn from the registry during the three days, Dependabot would never propose it.

Reviewing and merging Dependabot pull requests

A Dependabot pull request is a normal pull request. It runs the repository's checks, it needs reviews according to the branch rules, and it can be merged, closed or left open. Dependabot keeps it up to date: it rebases when the base branch changes, recreates it when the manifest changes, and closes it if a newer version supersedes it. Developers can steer it with comments addressed to Dependabot, such as asking it to rebase, recreate, or ignore a version or a dependency from now on.

For low-risk updates many teams auto-merge. A workflow triggered by Dependabot pull requests reads metadata about the update, such as whether it is a patch or minor change and whether the dependency is development-only, and enables auto-merge when the rules allow it. The pull request still has to pass every required check before it merges. Skerry allowed auto-merge for patch updates of development dependencies in repositories whose tests ran in under 15 minutes, and nowhere in skerry-stores.

Enabling auto-merge for patch updates of development dependencies. Required checks and reviews still apply before the merge.
name: Dependabot auto-merge
on: pull_request
permissions:
  contents: write
  pull-requests: write
jobs:
  automerge:
    if: github.actor == 'dependabot[bot]'
    runs-on: ubuntu-latest
    steps:
      - id: meta
        uses: dependabot/fetch-metadata@v2
      - if: steps.meta.outputs.update-type == 'version-update:semver-patch' && steps.meta.outputs.dependency-type == 'direct:development'
        run: gh pr merge --auto --squash "$PR_URL"
        env:
          PR_URL: ${{ github.event.pull_request.html_url }}
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Private registries and where Dependabot runs

Projects that depend on private packages need Dependabot to reach their private registry. The registries section of dependabot.yml defines each registry and the credentials to use, which are stored as Dependabot secrets, separate from Actions secrets. Organizations can also define private registries at organization level so that every repository's Dependabot can use them without each repository repeating the configuration.

Dependabot jobs run on GitHub Actions. By default they run on GitHub-hosted runners, and they appear in the repository's Actions tab, where their logs help diagnose failures. Organizations that must reach registries on a private network can run Dependabot on self-hosted or larger runners with private networking, which uses the runner groups covered in MSBA-291. Dependabot's Actions usage does not count against the included minutes for most plans; check GitHub's billing documentation for the current rule.

Updates in a large organization

Wilhelmus's three templates were one for web services, one for data pipelines and one for store systems. Each repository's dependabot.yml started from a template and was checked against it by the nightly drift check from MSBA-291. The store systems template had no auto-merge, longer cooldowns and a lower open-pull-request limit, because changes there went through a stricter release process.

The organization also needed to watch the pull requests themselves. Dependabot pull requests that sat unmerged for months were a sign of a repository nobody owned or a test suite nobody trusted. The security overview and a simple query for open Dependabot pull requests older than 30 days became part of the weekly scorecard. In November, 61 of them were older than 30 days, concentrated in 8 repositories, which Freya raised with the owning teams.

Dependabot and GitHub Actions

Version updates for the github-actions ecosystem keep workflow actions current. When workflows reference actions by full commit identifier, as Skerry required, Dependabot updates the identifier and the version comment beside it. When a repository uses an Actions lockfile, Dependabot updates the lockfile as well. That combination gave Skerry the safety of pinned actions without the burden of updating hundreds of commit identifiers by hand.

When a security update cannot be created

Sometimes Dependabot raises an alert but cannot open a security update. The fixed version may require a newer version of another dependency that the project pins; the patched version may not exist yet; or the change may conflict with the lock file in a way Dependabot cannot resolve. In those cases the alert shows an error explaining why the update failed, and the Dependabot job log in the Actions tab gives details. Wilhelmus asked teams to treat a failed security update as a task in its own right, because it usually meant a dependency was too far behind to be upgraded automatically.

The fix was often a version update that nobody had merged. In the checkout service, a security update for a cookie-parsing library failed because the web framework that depended on it was two major versions behind. A version update to the framework had been open for four months. Once it was reviewed and merged, the security update succeeded at once. That pattern, repeated across the estate, was the best argument Wilhelmus had for keeping version updates flowing.

Version update strategies

Dependabot offers a versioning strategy setting for some ecosystems that controls how it changes version constraints in a manifest: for example, whether it widens a range to allow the new version or raises the lower bound. For applications, raising the version to the exact new release is usually right. For libraries that other projects depend on, widening the allowed range keeps the library compatible with more consumers. The default depends on the ecosystem and whether the project looks like an application or a library. Skerry's internal libraries set the strategy explicitly so that their consumers were not forced to upgrade at the same pace.

Labels, reviewers and assignment

Dependabot pull requests can be labelled and assigned so they reach the right people. Labels make them easy to filter, and Skerry's router used the dependencies label to keep them out of the team's main review queue. Review requests are best handled through the repository's CODEOWNERS file rather than Dependabot's own reviewer settings, because CODEOWNERS already says who owns each manifest. In the store-systems monorepo, that meant pull requests updating the point-of-sale application's dependencies went to the point-of-sale team, while updates to the shared libraries went to the platform team.

Measuring the update flow

Wilhelmus tracked two measures for updates. The first was the median age of open Dependabot pull requests, which showed whether teams were keeping up. The second was the share of security alerts that were fixed by a Dependabot security update rather than a manual change, which showed whether dependencies were current enough for automation to work. In September the share was 58 in 100; by late November it was 81. The difference was almost entirely the version update backlog being cleared.

Updates for container images and infrastructure

Dependabot also updates base images named in Dockerfiles and, for some ecosystems, infrastructure definitions such as Terraform providers and modules. Skerry enabled the docker ecosystem for every service that built an image, so that base image updates arrived as pull requests rather than being discovered months later in a build SBOM. Combined with the build SBOMs in lesson 9, this gave the team both an early warning and a way to confirm that the update had actually changed what shipped.

Common mistakes

  • MistakeRelying on security updates alone and never updating otherwise.

    InsteadUse version updates so that urgent fixes do not need major upgrades on the day they are released.

  • MistakeLeaving version updates ungrouped in busy repositories.

    InsteadGroup related updates by pattern, type and update level so pull requests stay reviewable.

  • MistakeTurning cooldowns off to get releases faster.

    InsteadKeep a cooldown for version updates; security fixes are not delayed by it.

  • MistakeAuto-merging every Dependabot pull request.

    InsteadAuto-merge only low-risk updates and only where required checks give real confidence.

Summary and key terms

  • Security updates open pull requests to the minimum patched version when an alert appears; merging closes the alert.
  • Version updates keep dependencies current on a schedule configured in .github/dependabot.yml.
  • Groups combine related updates; grouped security updates combine fixes for the same ecosystem and directory.
  • Since July 2026 version updates wait a default three-day cooldown; security updates are not delayed.
  • Dependabot runs on GitHub Actions, uses Dependabot secrets for private registries and can be steered with comments.
Dependabot security update
A pull request upgrading a vulnerable dependency to the minimum fixed version.
Dependabot version update
A scheduled pull request that keeps a dependency current.
dependabot.yml
The configuration file for version updates, in the .github directory.
Group
A rule that combines related dependency updates into one pull request.
Cooldown
A wait after a release before Dependabot proposes it as a version update.
Auto-merge
Merging a pull request automatically once its required checks and reviews pass.
Dependabot secret
A credential stored for Dependabot, such as access to a private registry.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Which kind of Dependabot update is affected by the default cooldown?

    Show answer

    Version updates only; security updates open immediately.

  2. Where is the version update configuration stored?

    Show answer

    In .github/dependabot.yml.

  3. What does a group in dependabot.yml do?

    Show answer

    Combines matching dependency updates into a single pull request.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz