SECURITY ENGINEERING · PART 9 · DEVSECOPS AND SUPPLY CHAIN · SCA · 125 OF 229

Dependabot vs Renovate: Safe Dependency Updates

Finding vulnerable dependencies is useless if nobody updates them. This episode covers automated dependency updates: why staying current is a security control, how Dependabot and Renovate open update pull requests, pinning and lockfiles, grouping and scheduling, the tests that make auto-merge safe, and how to balance patching against the risk of a bad update.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 26
  26. 27
  27. 28
  28. 29
  29. 30
  30. 31
  31. 32
  32. 33
  33. 34
  34. 35
  35. 36
  36. 37
  37. 38
  38. 39
  39. 40
  40. 41
  41. 42
  42. 43
  43. 44
  44. 45
  45. 46
  46. 47
  47. 48
  48. 49
  49. 50
  50. 51
  51. 52
  52. 53
  53. 54
  54. 55
  55. 56
  56. 57
  57. 58
  58. 59
  59. 60
  60. 61
  61. 62
  62. 63
  63. 64
  64. 106
  65. 107
  66. 108
  67. 109
  68. 110
  69. 111
  70. 112
  71. 113
  72. 114
  73. 115
  74. 116
  75. 117
  76. 118
  77. 119
  78. 120
  79. 121
  80. 122
  81. 123
  82. 124
  83. 125
  84. 126
  85. 127
  86. 128
  87. 129
  88. 130
  89. 131
  90. 132
  91. 133
  92. 134
  93. 135
  94. 136
  95. 137
  96. 138
  97. 139
  98. 140
  99. 141
  100. 142
  101. 143
  102. 144
1 / 10

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Staying current is a control
  • bots open update PRs
  • pin and lockfile
  • auto-merge on green tests
  • cooldown

Notes

Why update

First, why bother updating constantly? Because most dependency vulnerabilities are fixed simply by moving to a patched version, so staying current is itself a security control. And there is a compounding effect: the longer you lag behind, the bigger and more dangerous the eventual upgrade, because you have to cross many breaking changes at once. Small, frequent updates are far easier and safer than rare, huge ones. Being current also keeps you off end-of-life packages that no longer receive any fixes at all.

Currency is a control
  • most dep vulns are fixed by updating to a patched version
  • the longer you lag, the bigger and riskier the eventual jump
  • small, frequent updates are easier and safer than rare, huge ones
  • being current also means fewer end-of-life packages

The tools

The tools watch your dependency manifests and the package registries, and when a new version appears they open a pull request that bumps it, often with the changelog and compatibility notes attached. Dependabot is built into GitHub and is simple to turn on. Renovate is more configurable, with rich grouping, scheduling and auto-merge rules, and runs across many platforms. Both solve the same core problem: turning the endless stream of upstream releases into reviewable, testable pull requests instead of manual toil.

Dependabot and Renovate
  • watch your manifests and the registry for new versions
  • open a pull request per update (or grouped)
  • include changelog and compatibility hints
  • Dependabot: built into GitHub, simple
  • Renovate: highly configurable, grouping, scheduling, auto- merge rules

Pinning and lockfiles

A key practice underneath all this is pinning. Pin exact versions in a lockfile so builds are reproducible and you get the same bytes every time. Then updates become explicit pull requests you can review, rather than silent drift where a floating range quietly pulls in something new, possibly a malicious release. The bot proposes the bump; you still review and test it. Reproducible builds, where the same inputs always produce the same output, are a security property worth having.

Control what you get
  • pin exact versions in a lockfile: reproducible builds
  • updates become explicit PRs, not silent drift
  • avoid floating ranges that pull in anything new the bot proposes the bump; you still review and test
  • reproducible builds are a security property

Taming the noise

Turned on naively, these bots bury a team in pull requests, and then everyone ignores them. So you tune. Group related updates into one pull request, such as all minor bumps or all test libraries. Schedule them as a weekly batch rather than one per release. Give security updates their own fast, prioritised lane so a critical fix is not stuck behind routine bumps. And auto-merge the low-risk ones that pass tests. A useful bot versus a muted one is almost entirely this tuning.

Grouping and scheduling
  • group related updates into one PR (test libs, minor bumps)
  • schedule: a weekly batch, not a PR per release
  • security updates: a fast, prioritised lane
  • auto-merge low-risk bumps that pass tests
  • tune, or developers mute the bot

Auto-merge safely

Auto-merging updates sounds reckless until you see what makes it safe: your test suite. The full CI run, unit tests, integration tests, builds, executes on every update pull request, and only bumps that pass everything are auto-merged. You limit auto-merge to patch and minor versions, where breaking changes are unlikely, and hold major bumps for human review because they often change behaviour. Automated dependency updates are exactly as safe as your tests are good.

The safety net
  • a strong test suite is what makes auto-merge safe
  • run the full CI on every update PR
  • auto-merge only: patch/minor bumps, all checks green
  • hold major bumps for human review (breaking changes)
  • without good tests, auto-merge ships broken builds

The other risk

There is a tension here. Staying current is good, but an update can itself be harmful: a hijacked maintainer account can publish a malicious version, and ordinary releases sometimes just break things. So you do not want to auto-pull a brand-new version the instant it publishes. A short cooldown, a few days before adopting a release, lets the community catch a bad one first, and Renovate supports this. Patch quickly, especially security fixes, but not so blindly that you discover the poisoned release yourself.

Updates are not risk-free
  • a new release can be malicious (hijacked maintainer) or broken
  • do not auto-pull brand-new versions the moment they publish
  • a cooldown (a few days) lets bad releases get caught
  • let tests and the community vet it first
  • patch fast, but not blindly

Common mistakes

Mistakes. Scanning diligently but never actually updating, so findings pile up unfixed. Turning on an update bot with no tuning, so the flood of pull requests gets ignored. Floating version ranges with no lockfile, so builds are not reproducible and updates happen silently. Auto-merging with a weak test suite, which ships broken code. Auto-merging major version bumps that carry breaking changes. And adopting brand-new releases the instant they publish, with no cooldown, so you catch the malicious ones personally.

Avoid these
  • scanning but never updating
  • bot with no tuning, so all PRs are ignored
  • floating version ranges, no lockfile
  • auto-merge with a weak test suite
  • major bumps auto-merged without review
  • adopting brand-new releases instantly, no cooldown

Say it like this

In the interview: Dependabot or Renovate to open update pull requests, with exact versions pinned in lockfiles so every update is explicit and builds reproducible. I group and schedule updates so the team is not buried, and give security fixes a fast lane. I auto-merge patch and minor bumps that pass the full test suite, because a strong suite is what makes that safe, and hold major bumps for review. And I add a cooldown so a hijacked or broken release is caught by others before I adopt it.

In the interview
  • "Dependabot or Renovate to open update PRs, with pinned
  • lockfiles so updates are explicit. I group and schedule
  • to avoid PR overload, give
  • security fixes a fast lane, and auto-merge patch/minor
  • bumps that pass full CI. Major
  • bumps get review, and I add a cooldown against bad releases."

Interview questions

Q1Why is keeping dependencies up to date a security control?

Most dependency vulnerabilities are fixed by upgrading to a patched version, so staying current directly reduces exposure. Lagging behind also forces larger, riskier upgrades later and leaves you on end-of-life packages that receive no fixes.

Q2What do Dependabot and Renovate do?

They monitor dependency manifests and registries for new versions and automatically open pull requests to update them, often with changelogs and compatibility hints. Dependabot is built into GitHub and simple; Renovate is highly configurable with grouping, scheduling and auto-merge rules.

Q3Why pin dependency versions in a lockfile?

Pinning makes builds reproducible and turns updates into explicit, reviewable pull requests rather than silent drift. It prevents floating version ranges from automatically pulling in new, untested or potentially malicious releases on the next build.

Q4How do you prevent automated update tools from overwhelming a team?

By grouping related updates into single pull requests, scheduling them as periodic batches rather than one per release, giving security updates a separate fast lane, and auto-merging low-risk bumps that pass tests, so humans only review what needs attention.

Q5What makes auto-merging dependency updates safe?

A strong automated test suite. The full CI pipeline runs on every update pull request, and only patch or minor bumps that pass all checks are auto-merged, while major version bumps with potential breaking changes are held for human review.

Q6Can updating a dependency be risky?

Yes. A new release can be malicious, for example from a hijacked maintainer account, or simply broken. Adopting brand-new versions instantly is risky, so a cooldown period before updating lets bad releases be caught by the wider community first.

Q7What is a cooldown period for dependency updates?

A configured delay before adopting a newly published version, typically a few days, so that malicious or broken releases are identified and withdrawn before they are pulled into your build. It trades a little currency for protection against supply-chain attacks.

Q8Which updates should be reviewed by a human rather than auto-merged?

Major version bumps, which commonly introduce breaking changes, and any update to a particularly sensitive or security-critical dependency. Patch and minor updates that pass the full test suite are generally safe to auto-merge.