Safeguard
Security Guides•

Fix PR reviewer checklist: what to check before you merge

A reviewer's checklist for automated security fix pull requests: scope, version jump, tests, transitive changes and what to confirm before you press merge.

Safeguard Security Team
4 min read

Before merging an automated security fix, confirm five things: the change touches only what the finding requires, the version jump is the smallest that fixes it, the tests exercise the changed code, nothing unrelated moved in the lockfile, and you know how to revert it. If any answer is unclear, ask for more evidence rather than approving.

Start with scope, not with the diff

Read the title and description first. What finding is this fixing, and in which package? Then open the file list. A fix for one vulnerable library should usually touch a manifest, a lockfile and perhaps a small code change. If you see config files, CI workflows or unrelated modules, stop and ask why.

A short diff is not automatically a safe diff. A one line manifest change can pull in dozens of transitive updates, all visible only in the lockfile. Review the lockfile diff as a list of package names and versions, not as raw text.

Check the version jump

Semantic versioning says a patch release holds backward compatible bug fixes, a minor release adds backward compatible functionality, and a major release signals incompatible API changes. That gives you a rough risk order, and it is only a convention. Maintainers do not always follow it, and anything below 1.0.0 can change at any time according to the spec.

So ask: is this the smallest version that removes the vulnerability? If the fix exists in a patch release but the PR jumps a major version, the PR is taking on risk that the finding did not require.

Look at what the tests actually cover

A green check means the tests that exist passed. It does not say they cover the code path you changed. Find one test that would fail if the upgrade broke the feature using this library. If you cannot find one, plan a manual check or a staging deploy. The post on what green CI does not prove about a fix PR goes deeper on this.

Confirm the finding is real for you

A fix for something unreachable is still worth merging if it is cheap and safe, but it should not skip review because "security wants it." Check whether the vulnerable function is called, and whether the version in the PR is the one you actually deploy. Reachability evidence in the PR description makes this a one minute task.

Click through it at your own pace, or open it full screen.

Know the way back

Before you approve, decide how you would undo it. For a normal merge commit, Git can create a new commit that reverses the change. With a merge commit you must name which parent is the mainline, for example git revert -m 1 <merge-commit>. Squash merges make this simpler because the change is a single commit. See how to roll back a bad dependency upgrade merge.

A short checklist you can paste into a template

  • The PR names the finding and the package.
  • Only expected files changed.
  • The lockfile diff lists only expected packages.
  • The version jump is the smallest that fixes the issue.
  • A test covers the changed behavior, or a manual check is planned.
  • A revert path is known.

Safeguard's autonomous remediation opens fix pull requests with evidence attached, and ships off by default with every category set to Manual, so a human reviewer stays in the loop until you decide otherwise. You can try a free scan at gold.safeguard.sh/scan.

Quick check

Is a green CI run enough to merge a fix PR?

No. It shows that existing tests passed. You still need to confirm the tests cover the changed code and that the lockfile diff contains only what you expect.

Who should review an automated fix PR?

The people who own the code being changed. Route the PR to them with a CODEOWNERS file rather than to a central security queue.

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.