Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dependabot hints and tricks

Dependabot hints and tricks

Practical tips for making Dependabot more effective, reducing dependency-update noise, and improving software supply-chain security.

Topics include:
- Configuring schedules, PR limits, and versioning strategies.
- Grouping dependency updates to reduce PR noise and CI costs.
- Using cooldown periods to reduce exposure to malicious or broken releases.
- Understanding package provenance and attestations.
- Making dependency installations reproducible in CI.
- Turning dependency-update failures into automated regression tests.

Includes examples, references, and links to useful resources.

Isidro López

November 20, 2026

Transcript

11 slides
  1. Dependabot baseline config that gives quick value • Weekly schedule

    (fixed day/time) • PR limit (example: 5 open PRs max) • This keeps updates predictable and reviewable.
  2. Versioning strategy matters • For libraries: use strategy that widens

    supported ranges ◦ Widen the allowed version requirements to include both the new and old versions, when possible. Typically, this only increases the maximum allowed version requirement. • For apps: use strategy that increases versions ◦ Always increase the minimum version requirement to match the new version. If a range already exists, typically this only increases the lower bound. • Also be careful with 0.x versions: minor bumps can still break contracts.
  3. Use ignore rules intentionally, not blindly If you ignore a

    dependency (or major updates), add a comment explaining why and when to revisit.
  4. Cooldown is underrated • Delay adoption of newly published package

    versions (for example 7 days). ◦ • • • It can be general or specific per major/minor/patch Examples This gives the ecosystem time to detect malicious/broken releases before they hit us. How to enforce the cooldown locally: ◦ ◦ For npm, create a file .npmrc , e.g. containing min-release-age=7d (from v11.10.0) For yarn, create a file .yarnrc.yml, e.g. containing npmNinimalAgeGate: 1440 (minutes) (from v4.10.0)
  5. Big one to reduce PR spam and CI cost: grouping

    • Group names can be anything you want • Group related dependencies (for example dev tooling vs production deps) so you review fewer, more meaningful PRs. • Also for “highly-dependent” dependencies ◦ Example
  6. Provenance/attestations • Goal: ◦ ◦ • E.g. here for pnpm

    (trustPolicy) ◦ • • • • • It ensures that the source code we see in GitHub is the same installed in our systems, e.g. with npm verify the package artifact installed is actually tied to trusted source/release processes When set to no-downgrade, pnpm will fail if a package's trust level has decreased compared to previous releases. Example library with Provenance in place (scroll to the end of the page) If the provenance has been broken, it is shown by Dependabot under Attestation changes You can also verify with the green check on each version here PRs to take into account the provenance locally in npm and yarn (to be proactive, not only reactive - upvote them! 🙂): ◦ ◦ npm/cli#9242 yarnpkg/berry#7101 ◦ Fail CI when dependencies in your lockfile lose npm provenance or trusted publisher status. 💡 There is a GitHub Action which might be useful for this as well.
  7. Critical CI hygiene • ⚠ Achtung!: npm install does NOT

    install from the lock file, but from the package.json and then it updates the lock file 😱 • For JS/TS projects prefer lockfile-based installs • npm install may drift lockfiles; npm ci (or yarn immutable install) is safer and reproducible ◦ yarn install –immutable ◦ ci = “clean install”, not “continuous integration” 😅
  8. 💡 Practical team habit When a dependency update breaks something

    manually, add an automated test so the next regression is caught by CI.
  9. Resources • • • Dependabot options references Notes on safer

    development - Part 1 Course of Dependabot: Keep your repo up to date, securely and automatically (my notes) ◦ • • • • The course is highly recommended, but it’s only in Spanish Dependabot course repository npm SemVer Calculator npm version cheatsheet How We're Protecting Our Newsroom from npm Supply Chain Attacks (12 min. read)

More Decks by Isidro López

Other Decks in Programming