Safeguard
Developer Tools•

Should you batch dependency upgrades or ship them one at a time?

Batching saves review time, single upgrades save debugging time. A simple rule for choosing batch size, and how to bisect a batch that breaks the build.

Safeguard Security Team
4 min read

Batch low risk upgrades that share an ecosystem and have strong tests, and ship risky ones alone. A batch cuts review and CI overhead, but when it breaks you must find which change did it. If you cannot bisect cheaply, make the batch smaller. Security fixes for exposed code should not wait for a batch.

The trade off

ApproachStrengthWeakness
One upgrade per pull requestA failure points to one cause. Easy rollbackMany pull requests, repeated CI runs, review fatigue
Large batchFew reviews, one CI runA failure has many suspects. Rollback undoes good changes too
Grouped by riskBalances bothNeeds a rule and some tooling

GitHub's Dependabot configuration documents a groups option that bundles updates into one pull request, so grouping is a supported workflow rather than a hack.

A grouping rule that works

Group by risk and by type, not by convenience.

  1. Patch and minor updates of development tools go together, weekly. Low blast radius.
  2. Patch updates of runtime libraries with good test coverage can go together.
  3. Packages on a trust boundary, such as authentication, cryptography, parsers, database drivers and HTTP clients, ship alone or in pairs.
  4. Major versions always ship alone. See testing a major upgrade in small steps.
  5. Security fixes ship as soon as they are verified, outside the schedule.

Keep one ecosystem per batch. A Python batch and a JavaScript batch fail for different reasons and roll back differently.

When a batch breaks: bisect it

Git has a bisect command that uses binary search to find the commit that introduced a bug, and it can run a script on each step to automate the search. For a batch, the same idea works on the list of upgrades.

  1. Confirm the batch fails and the previous state passes.
  2. Apply half of the upgrades. Run the failing test or smoke test.
  3. If it fails, the culprit is in that half. If it passes, it is in the other half.
  4. Repeat until one upgrade remains. A batch of sixteen needs about four rounds.
  5. Ship the batch without the culprit, and handle the culprit on its own.

This is cheap only if your tests run quickly and you can apply upgrades individually. If your lockfile cannot be partially updated, or the failing test takes an hour, the batch was too big.

Make small batches practical

  • Keep CI under ten minutes for the smoke path.
  • Use a bot that can group updates and also split one out on request.
  • Commit lockfile changes separately from code changes, so you can revert cleanly.
  • Write the batch rule in the repository so every maintainer follows it.

For a volume view on bot pull requests, see auto triage rules for Dependabot pull requests at scale.

Watch for the lockfile effect

Batching also changes transitive packages. Read the combined lockfile diff, not just the list of direct bumps. See testing a transitive bump.

Safeguard's fix pull requests are off by default with every category on Manual, so teams choose their own grouping and review rules, and its policies and gates apply to each pull request the same way. Free scan: gold.safeguard.sh/scan.

Quick check

Is a weekly batch of all updates a bad idea?

Not if the risk is low and tests are good. Split out trust boundary packages and major versions so a failure has few suspects.

How do I find which upgrade in a batch broke the build?

Bisect: apply half the upgrades, test, and narrow down until one remains. Git bisect automates this for commits.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.