Chapter 22Lesson 03~165 minutes

Dependabot Alerts, Security Updates, Version Updates, Dependency Review, and Policy: Configuration, Design Choices, and Tradeoffs

Once Dependabot works, configuration becomes governance: which changes deserve separate review, how much update noise the team can absorb, when security remediation outranks freshness, and which credentials the bot may use. This lesson converts those choices into explicit policy.

GroupingUpdate cadenceallow/ignoreAuto-merge policyPrivate registries

Learning objectives

  • Choose security-only, continuous version updates, or a combined model based on risk and maintenance cost.
  • Design groups around ownership/failure domains and use allow/ignore without hiding debt.
  • Define evidence-based auto-merge conditions rather than trusting SemVer or bot identity.
  • Place private-registry credentials in the correct Dependabot secret boundary.
Availability. Dependabot version updates are available for GitHub repositories broadly. Public-repository dependency review is free-compatible; private/internal dependency review and organization-wide enforcement can depend on GitHub Code Security/Advanced Security and plan. Private registry access is ecosystem/network dependent; keep it optional in this chapter.

1. Security-only updates versus continuous version maintenance

Security updates optimize for known vulnerability remediation. Version updates optimize for freshness and smaller upgrade jumps. A mature repository often uses both, but not necessarily with the same cadence or grouping. If regular updates overwhelm reviewers, reducing noise is safer than turning the bot off indefinitely.

Policy Benefit Risk Good fit
Security updates only Smallest review volume; focuses known vulnerabilities Large non-security upgrade gaps accumulate Frozen/legacy systems with deliberate upgrade windows
Weekly version updates Regular manageable freshness Can still produce review noise Most active services/libraries
Grouped routine updates Fewer PRs and CI runs One bad dependency can obscure diagnosis Closely related low-risk packages with strong tests
Individual updates Clear blast radius/changelog More PRs and CI cost High-impact dependencies or weakly coupled components

2. Customize security updates while disabling regular version PRs

GitHub currently documents a useful pattern: keep a dependabot.yml to customize security-update PRs while setting open-pull-requests-limit: 0 to disable version-update PRs for that ecosystem.

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 0
    labels:
      - "dependencies"
    groups:
      security-fixes:
        applies-to: security-updates
        patterns:
          - "*"

This is a policy choice, not a recommendation for every project. Security-only maintenance can allow API drift and large future upgrades. Record why continuous version updates are disabled and when the decision is reviewed.

3. Group by ownership and failure domain, not by desire for a clean inbox

Grouping reduces PR count but increases the number of changed dependency edges per PR. A useful group has common ownership, common testing, and a coherent rollback story. Avoid grouping database drivers, authentication libraries, UI tooling, and build plugins solely because they are all “npm dependencies.”

groups:
  lint-tooling:
    applies-to: version-updates
    patterns:
      - "eslint*"
      - "@typescript-eslint/*"
  runtime-observability:
    applies-to: version-updates
    patterns:
      - "@opentelemetry/*"

4. allow and ignore encode boundaries; exceptions need an owner

allow forms the candidate set. ignore removes matches after allow, so an ignored match wins. Use these controls for real compatibility constraints, and pair each long-lived exception with rationale/owner/expiry in policy documentation.

allow:
  - dependency-name: "@example/*"
ignore:
  - dependency-name: "@example/legacy-adapter"
    update-types:
      - "version-update:semver-major"

Do not use broad ignore rules as an alert-disposal mechanism. An ignored version update and a dismissed vulnerability alert are distinct governance decisions.

5. Auto-merge is a policy consequence, not a Dependabot feature toggle

A generated PR is executable change. “Patch version” is useful metadata but not proof of semantic compatibility. If your organization permits auto-merge, require evidence such as immutable dependency delta, required CI, dependency review, ownership, changelog/release-note checks for critical libraries, and a bounded category of updates. A failing or missing signal should stop the merge.

Condition Auto-merge candidate? Reason
Patch update + comprehensive tests + dependency review + no sensitive subsystem Possibly, if organization policy allows Evidence is strong and blast radius bounded.
Major update Usually no SemVer indicates compatibility risk; require review.
Security fix with behavior change No automatic shortcut Urgency does not erase compatibility/release ownership.
PR cannot access required private-registry test dependency No Missing test evidence is not a green signal.

6. Private registry credentials belong to Dependabot’s execution boundary

Dependabot can use top-level registries entries. Secret values referenced from this file come from Dependabot secrets. Do not put a token directly in YAML, and do not assume an Actions secret of the same name is available.

version: 2
registries:
  private-npm:
    type: npm-registry
    url: https://registry.example.invalid
    token: ${{secrets.DEPENDABOT_REGISTRY_TOKEN}}
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    registries:
      - private-npm

For GitHub Packages/Container registry dependencies, Dependabot can use its GitHub identity in supported cases. For registries reachable only on internal networks, GitHub supports Dependabot on self-hosted runners, but that becomes a runner/network security problem and is optional here.

7. Keep Git, GitHub, package registries, and build systems separate

Boundary Owns what
Core Git Manifest/lockfile commits, branches, merge history. It does not know advisories.
GitHub dependency graph/Dependabot Hosted inventory, alerts, update PR generation, bot identity.
Package registry Available versions/package metadata/authentication. It does not decide your merge policy.
CI/build tooling Runs tests, builds, compatibility checks; results are evidence, not dependency inventory.
Organization policy Required checks, review ownership, exception/auto-merge rules.

8. Worked decision: Atlas API has 46 npm dependencies

Atlas receives twelve Dependabot PRs every week, two are authentication libraries, four are lint/build tooling, and the rest are ordinary runtime utilities. The team has strong runtime integration tests but weak auth integration tests.

Decision Choice Why
Cadence Weekly Keeps upgrade distance bounded without daily review noise.
Grouping Group lint/build tooling; keep auth libraries separate Matches ownership and failure domains.
Security updates Enabled, high/critical triaged immediately Known vulnerabilities have explicit SLA.
Auto-merge Only low-risk grouped tooling after required checks Auth/runtime changes retain human review.
Ignore No permanent wildcard ignores; temporary major-version exception with expiry Makes debt visible and reviewable.
Private registry Dependabot secret with read-only registry credential Separates bot credential from Actions secrets.

The important result is not the exact settings; it is the causal justification across maintainability, security, governance, reliability, compatibility, and CI cost.

Knowledge check

Why can grouping reduce reliability even while reducing PR count?

If allow and ignore both match a dependency, which wins?

Why is a Dependabot secret not interchangeable with an Actions secret?

Should an urgent security PR bypass compatibility testing?

What is the strongest reason to keep a critical auth library out of a broad group?

Summary

Dependabot configuration is part of your software-maintenance control plane. Frequency and grouping manage review load; allow/ignore encode compatibility boundaries; dependency review and normal CI create admission evidence; private-registry credentials belong to Dependabot’s trust boundary; and auto-merge requires stronger evidence, not less review thinking.

Next you will deliberately break the dependency pipeline—wrong manifest path, missing private-registry credential, Dependabot workflow secret assumptions, noisy PR policy, and stale dismissal reasoning—then diagnose each failure without erasing the evidence.

Next lesson

Dependabot Alerts, Security Updates, Version Updates, Dependency Review, and Policy: Diagnostics, Failure Modes, Security, and Performance

Official references

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.