Safeguard
Security Guides•

Why fix base image findings before application findings?

Base layers sit under everything and are shared by many services, so one base fix clears more findings than any app change. Here is the order and why.

Safeguard Security Team
4 min read

Fix base image findings first because base layers sit beneath every later layer and are shared by many services. One rebuild on a patched base can clear dozens of rows across your estate, while an application fix helps one service. Rebuilding the base also rebuilds everything above it, so do it before app changes.

How layers stack

The OCI layer specification describes layers as filesystem changesets applied on top of each other to form the complete filesystem. Docker's layer documentation says each layer, once created, is immutable, and that images can extend others by reusing their base layers.

Two consequences follow for a scan.

First, findings in lower layers are inherited. Every service that starts from the same base tag carries the same operating system packages and the same rows. Second, Docker's cache documentation says that when a layer is invalidated, all layers after it are invalidated too. Changing the base therefore forces your install, copy and build steps to run again. If you fix the app first and the base later, you do two rounds of rebuilding and rescanning.

The order that saves work

  1. Group findings by layer or by base image. See base image rollup reports.
  2. Bump the base to a patched tag, using the pull flag, and rebuild one pilot service.
  3. Rescan and note what disappeared.
  4. Roll the new base across other services, as in rolling out a patched base image.
  5. Then work through what remains: language packages, your own installs, binaries.

What remains after the base bump

GroupTypical share of remaining workOwner
OS packages with no fixExceptions or a base changePlatform
Packages you installed in the DockerfileUpdate or removeApp team
Lockfile dependenciesUpdate lockfileApp team
Binaries compiled in your buildRebuild with a patched toolchainApp team

The exact shares depend on your images, so measure them rather than trusting a rule of thumb.

When base first is the wrong order

Base first is a default, not a law. Go straight to the app layer when:

  • A finding is reachable and actively exploited in your own code path, and the fix is a small dependency bump.
  • The base cannot change this week because of a freeze, but the app fix can ship.
  • The base finding has no fix and an app finding does.

In those cases ship the app fix and schedule the base work.

Keep the base current

A base that is refreshed on a schedule means the next scan starts cleaner. Docker's guidance is to rebuild regularly and pull fresh bases. For who owns that schedule, see who owns base image vulnerabilities.

Where Safeguard fits

Safeguard's SBOM and dependency scanning keeps per image component data that can be grouped by origin, and its policies can enforce a base image standard. Free scan: gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen. Look for findings that many assets share.

Quick check

Does a base bump always reduce findings?

Usually, but a newer base can bring new packages, so rescan to see the net result.

Should every service bump its base on the same day?

Pilot one, then roll out in waves. That limits the blast radius of a behavior change.

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.