Safeguard
Developer Tools•

How to rescan deployed container images without rebuilding them

Re-check running images against new advisories by keeping a per-digest inventory and matching it again. Steps, pitfalls and what to do with results.

Safeguard Security Team
3 min read

Rescan by digest, not by tag. Record the image digest and its component list when you build, then match that list against current advisories on a schedule. You do not need to rebuild, and you do not need to pull the image again unless the stored list is missing.

Why digests, not tags

A tag such as latest can point to different content tomorrow. A digest identifies exactly one image. If you scan a tag, you might scan something other than what is running. See container image digests vs tags for the background.

Steps

  1. List what is running. Query your cluster or hosts for the digests of running containers, not the tags in manifests.
  2. Look up each digest's inventory. If you stored a software bill of materials at build time, fetch it. If not, generate one from the image once and store it against the digest.
  3. Match against current advisories. Compare the component list with today's data.
  4. Attach results to the digest. Store findings and the data date, so a result can be reproduced and aged.
  5. Map digests to owners and services. A finding with no owner is not actionable.
  6. Alert on new findings only. Compare with the previous run so the same item does not alert daily.

Caching saves time

Because an image digest never changes content, a stored inventory stays valid forever. Only the advisory side moves. That means the daily cost is a match, not a scan. Our post on caching scan results by image digest and lockfile hash goes deeper.

Pitfalls

PitfallEffect
Scanning tagsResult may describe a different image
Base image driftA rebuilt image inherits new base packages, so old results do not apply
Operating system advisoriesDistribution data differs from language ecosystem data
Layers removed but not rebuiltFiles can persist in earlier layers
Ephemeral jobsShort lived containers vanish before the next scan

For short lived workloads, scan at build and at admission, since a nightly scan may never see them.

What to do with a new finding

Decide between three paths. Rebuild with a patched base or dependency and redeploy. Apply a mitigation, such as a configuration change, while a fix is prepared. Or accept the risk with a dated record when the vulnerable code is not reachable. Verify the fix by confirming the new digest is the one running.

Where Safeguard fits

Safeguard offers container image scanning alongside SBOM and dependency scanning, and reachability analysis helps decide whether a finding in an image matters. Try a free scan.

Try it yourself

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

Check what the scan lists inside an image and how findings tie to specific components.

Quick check

Do I have to pull every image again to rescan?

Not if you stored its inventory against the digest. Matching the stored list is enough.

Does a rescan fix anything?

No. It finds. Fixing needs a rebuilt image and a redeploy.

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.