security
Verify a container fix by image digest
Trace a dependency fix from the rebuilt container image to the deployed digest so a green rescan closes the finding for the artifact actually in use.
TrustIvan · · 10 min read
The build pipeline shows a clean rescan for dispatch:stable. The Tuesday deployment dashboard shows the same tag. The runtime records show two replicas running Tuesday's rebuild and an older worker still running Friday's image. Someone updated the release tag but left the worker on its previous revision. The finding belongs to both workloads, so the rescan is evidence for the rebuild and the worker still needs a rollout.
Use the registry digest to join build, scan, and deployment records. Track the affected package instance alongside that digest. A digest identifies immutable content. A tag is a label whose target can change. Record enough evidence that a reviewer in another time zone can reproduce the closure decision without asking you what the dashboard showed that morning.
Start with the image from the original finding
Capture the registry repository, manifest digest, operating system and architecture, package identity, installed version, and the file path or package database behind the finding. Record who owns the workload and where you observed that image running. Tag and service name help humans navigate, but the digest and instance details let them find the same package in the same artifact.
Check whether the package came from the operating system, application dependencies, a vendored directory, or a tool copied from another build stage. Ownership often follows this distinction. The platform team may maintain the base image, the service team may maintain the lockfile, and a build team may own a precompiled helper. In a multi-stage build, a package present only in a build stage can be a legitimate supply-chain concern while falling outside a runtime image finding. Keep the two scopes visible.
Read the existing evidence before rebuilding. If the package path points into a copied utility, updating your application's lockfile could leave that utility untouched. If the scanner reports the package database and a separate vendored file, collect evidence for both locations. A single version string in a release note cannot settle whether both copies changed.
Write the affected condition as a sentence the owner can test. In one fictional example, the Linux ARM64 image's OS package database lists libexample at the vulnerable distribution release. The worker loads that package from the root filesystem. The reviewer knows where to look, which evidence counts, and which deployment has to change.
Follow the rebuilt image through the registry
Record the source revision, build invocation, base-image reference, and registry digest returned after publication. Where a tag is needed for release tooling, preserve the digest captured in that build's publish step. Resolving the tag during an investigation could return an entirely different release. Keep the original and replacement references fully qualified with the registry and repository. If your environment imports images into another registry, verify the digest or recorded relationship there, too.
A manifest points to image configuration and layers. An OCI image index can hold descriptors for multiple platform manifests, each with its own digest. A build record that shows an index digest therefore needs a platform-to-manifest mapping when the release serves more than one architecture. A Linux AMD64 rescan covers that variant. Match Linux ARM64 to the ARM64 manifest and collect its evidence when that platform is deployed. The OCI image manifest and OCI image index specifications describe the objects these digests identify.
Use the identifier from the system that actually scanned the image. A local image ID can refer to the image configuration, and a registry manifest digest identifies the manifest document. The two are valid in their own contexts. A runtime may expose a repository digest, a configuration ID, or a runtime-specific image reference. Keep field names and object types next to the values. When the identifiers differ, map the observed runtime artifact back to the manifest through trusted runtime and registry records before closing anything.
Store the full digest in the evidence system. Abbreviations are fine for meeting notes when the full values remain one click away. Add the repository, platform, and evidence timestamp to those records so someone can reconcile the same digest across environments without guessing which project the release came from.
Compare equivalent rescans
Re-run the authorized scanner against the replacement digest. Retain the scanner profile, vulnerability data timestamp or revision if available, platform, analysis scope, and result. Make the same fields available for the original scan. If a detector or package catalog changed between runs, note the change and use the underlying package evidence to decide what happened.
A new report might show no finding because the fixed version shipped, the package was intentionally removed, the scan only covered a different platform, or a matcher produced a different result. Use the second signal that fits the change. For an OS package upgrade, verify the installed distribution package version and the distribution's fix status. For an application dependency upgrade, inspect the rebuilt artifact's dependency metadata or other reproducible package evidence. When a package was removed, confirm that no affected copy remains in the original locations and that the workload still behaves as intended without it.
Check distribution advisories when a base image uses backported fixes. The upstream version alone may look old even though the distribution patched its release. Match the applicable distribution, package, and release fields. Save the authoritative advisory next to the scan result when it explains an apparent disagreement. Use the scanner vendor's structured applicability states where available and make the decision traceable.
Scan and delivery records should describe the same scope. For example, if your policy interprets shipped image layers differently from the final root filesystem, record both results with their scope. A final filesystem inventory can show that a package is absent from the running view. The published image still has its own manifest and layer lineage. Treat a path disappearing from one view as evidence limited to that view.
Reconcile with the runtime during and after rollout
A desired revision and observed running state answer different questions. In Kubernetes, setting a Deployment image by digest helps pin the requested content. Verify the workload's observed containers too, including relevant init containers, sidecars, and jobs when those are affected. Kubernetes documents how it handles image names, tags, and digests in its container image reference.
Start from the workloads enumerated in the original finding. Observe each environment or region included in the remediation scope. Check whether stale replicas remain during canary or rolling updates. For scheduled work, record the updated job template and decide what evidence you need from the next execution. Preserve deployment revision, rollout timestamp, architecture where relevant, and the observed digest mapping.
Treat running coverage as a count with a clear denominator. “Two of three workloads verified” makes the remaining action obvious. Counting individual Pods during a scale-up can obscure the real question if an older ReplicaSet will later return. Pause the verification until the participating controllers and fallback revisions have been checked. For paused workloads, capture the current revision and validate the resume configuration before reporting that the affected image can no longer start.
Rollbacks deserve a separate check. If the previous artifact stays available as a rollback option, record what happens to the finding on rollback. A known safe fallback might permit closure after rollout completion. A fallback with the affected package requires a control such as explicit approval, a replacement fallback, or a documented reopen condition. The exact choice depends on the service's recovery requirements and your organization's remediation policy.
Worked example with an incomplete rollout
This example uses fictional services and shortened digest labels. Keep full digest values in a live evidence record.
| Workload | Before | Replacement evidence | Runtime observation | Decision |
|---|---|---|---|---|
| Dispatch API, Linux AMD64 | Manifest A1, package 4.1-2 | Manifest A2, package 4.1-3, clean rescan | Three of three replicas on A2 | Verified after rollout |
| Dispatch API, Linux ARM64 | Manifest B1, package 4.1-2 | Manifest B2, package 4.1-3, clean rescan | One of two replicas still on B1 | Keep open |
| Dispatch worker, Linux ARM64 | Manifest B1, package 4.1-2 | Manifest B2, package 4.1-3, clean rescan | Scheduled job template still references B1 | Update job template and verify |
| Dispatch support helper | No affected instance established | Out of the finding's runtime scope | Separate build dependency record | Review separately |
Registry evidence links both A2 and B2 to the rebuilt multi-platform index. Each platform also has a matching scan. That proves the proposed replacement exists for both platforms. At the point captured in the table, AMD64 production replicas provide runtime evidence. ARM64 replicas and the scheduled worker still need work. Keep the shared finding open or maintain separate per-workload closure records according to your ticket model.
The API owner verifies the ARM64 rollout after the remaining replica replaces B1. The job owner updates the template, checks that no affected run remains active, and records the first new run on B2. If the next worker run is days away, the team can choose a documented interim status tied to the actual control in place. A stopped or paused workload may temporarily remove exposure while its resume configuration still needs remediation.
Consider a different last step. During ARM64 rollout, error rates climb and the service returns to B1. The clean B2 rescan remains valid for the replacement artifact. The workload is affected again. Reopen the corresponding rollout record, attach the rollback timestamp, and capture the reason and owner for the next attempt. Keep build and deployment states independent so a regression in one does not erase evidence collected for the other.
Make the closure record easy to inspect
Keep this evidence together, using references to durable systems that authorized reviewers can access.
- Finding identity, package coordinate and location, original digest, platform, and initial observation time.
- Rebuild source revision, publishing job, replacement digest, and the related index or platform manifests.
- Old and new package evidence, equivalent rescan status, and a short explanation for any differences in detector scope.
- Workload owner, deployment revision, environment, observed artifact, and runtime timestamp for each scoped workload.
- Any approved exception, affected rollback artifact, or resumption condition with a named owner and next review date.
A missing link should have its own status. “Awaiting ARM64 runtime evidence” is actionable. “Pending verification” makes the team retrace the investigation. Keep the scope narrow enough to support a decision but broad enough to include every affected workload and copy. When the report concerns a package shipped in both a service and its companion worker, carry both records to closure.
Store only the metadata the review needs in the closure record. Public ticket comments rarely need full internal paths, registry credentials, infrastructure topology, or raw log extracts. Put authorized references in the evidence system and write a short package and deployment summary in the ticket. The next reviewer should be able to see the evidence through their role without copying it into an unrestricted channel.
One useful recurring check is to sample recently closed findings and ask a reviewer to identify the exact deployed artifact from the record alone. If they need to search tag history or ask the original author for a screenshot, improve the evidence capture in the publishing or deployment step. The objective is a closure decision that remains reproducible after tags move and the original team rotates off call.
For inventory checks that support the rescan, use Find SBOM gaps for vendored dependencies. To track verified fixes across reporting periods, use Count remediated findings through rescans.