Container vulnerability scans produce findings, not a remediation plan. This reusable workflow helps DevOps and security teams inventory production images, review SBOMs, triage risk, update base images and packages, record exceptions, verify provenance, and confirm that fixes reached the workloads that matter.
Overview
Container image security maintenance is a recurring operating process rather than a one-time scan. An image that passed yesterday may contain a newly disclosed vulnerability today, while an image that reports a high-severity issue may not be exploitable in the way your application uses it. The goal is to connect scanner output to an evidence-based decision: fix, mitigate, accept temporarily, or retire the image.
A dependable workflow should answer six questions for every finding:
- Which image, digest, application, and environment are affected?
- Which operating-system and application packages are present, according to the SBOM?
- How severe and exploitable is the issue in this workload?
- Is a fixed package, base image, or application release available?
- What prevents immediate remediation, and who owns the exception?
- How will the team verify that the corrected artifact is built, deployed, and no longer exposed?
Start with an image inventory that includes registry location, immutable digest, tags, owning team, source repository, deployment environments, base image, build workflow, and last deployment. Treat tags as useful labels, not as the primary identity of an artifact. A digest gives the team a stable reference when the same tag is rebuilt or moved.
Generate an SBOM during the build and retain it with the image metadata. Common interchange formats include SPDX and CycloneDX; the important operational requirement is that the document identifies package names and versions well enough to support reliable matching. Record how the SBOM was generated, when it was generated, and which image digest it describes. An SBOM that cannot be tied to a specific artifact is difficult to use during incident response.
Checklist by scenario
Scenario 1: A new vulnerability appears in a production image
- Confirm the finding. Match the vulnerability to the image digest, package, installed version, affected layer, and deployment record. Check whether the scanner has identified a package that is actually present rather than only a stale package index or build-time artifact.
- Establish exposure. Identify whether the image is running in production, in a lower environment, or only in an unused registry repository. Note internet exposure, reachable services, required privileges, sensitive data access, and whether the vulnerable component is used at runtime.
- Assess urgency. Use the scanner's severity and exploitability signals as inputs, then add environment context. A critical issue in an externally reachable service generally deserves a different response from the same package in an isolated build utility that is not deployed.
- Choose an action. Prefer a rebuilt image with a fixed package or refreshed base image. If no fix is available, apply a documented mitigation, reduce exposure, or temporarily accept the risk with an owner and expiration date.
- Verify the result. Rebuild, scan the resulting digest, inspect the new SBOM, and confirm that deployment references the corrected digest. Do not close the finding solely because a new image tag was published.
Scenario 2: The base image is outdated or approaching retirement
- List every service derived from the base image, including images maintained by different teams.
- Compare the current base image with the approved alternatives and document the language runtime, operating-system, architecture, and package-manager assumptions.
- Prefer a minimal base image that still supports debugging, certificates, time-zone data, and required runtime behavior. Smaller is not automatically safer if teams compensate by adding untracked packages or disabling controls.
- Rebuild dependent images in a test environment, exercise health checks and startup behavior, and review application compatibility before production rollout.
- Update the Dockerfile, lock files, build configuration, ownership metadata, and maintenance documentation together.
Use a scheduled rebuild even when application source code has not changed. This creates a controlled path for incorporating base-image and package updates instead of waiting for an emergency. Keep build inputs reproducible where practical, but avoid treating reproducibility as a reason to preserve known vulnerable dependencies indefinitely.
Scenario 3: The scanner reports a finding without an immediately usable fix
Do not silently suppress the result. Create an exception record containing the image digest, vulnerability identifier, affected package, severity, exploitability assessment, business owner, security owner, compensating controls, decision date, review date, and planned remediation. State why the issue cannot currently be fixed—for example, an unavailable upstream patch, an application compatibility constraint, or a required vendor dependency.
Set an expiration or review date. An exception is a time-bounded risk decision, not a permanent scanner configuration. Recheck it when a new base image, package release, vendor update, or mitigation becomes available.
Scenario 4: A build is blocked by a deployment gate
| Condition | Recommended response |
|---|---|
| Fix is available and the image is production-bound | Stop promotion, update the dependency or base image, rebuild, and rescan. |
| Finding is not exploitable in the deployed configuration | Validate that conclusion, document the evidence, and use a temporary, approved exception if policy permits. |
| Finding is in an unused or superseded image | Remove the image or mark it for deletion, then confirm no deployment still references its digest. |
| Scanner result appears incorrect | Compare the finding with the SBOM and package database, record the analysis, and request correction without broadly disabling scanning. |
Deployment gates should be consistent enough to be trusted and flexible enough to distinguish urgent production risk from actionable maintenance debt. Define who can approve an exception and make the approval visible in the build or release record.
Scenario 5: A remediation has been deployed
- Record the old and new image digests and the change that removed or mitigated the finding.
- Verify the new digest is present in the intended registry and was produced by the expected build workflow.
- Check image-signing or provenance evidence according to your organization's controls. Confirm that the artifact came from the permitted repository and build path.
- Confirm that the orchestrator or deployment system rolled out the corrected digest rather than retaining an older cached image.
- Rescan the deployed artifact and update the vulnerability record only after the verification evidence is available.
For broader release controls, compare this process with your existing CI/CD pipeline controls. Image remediation should be part of the normal delivery path, not an isolated security queue.
What to double-check
- Inventory coverage: Include production, staging, development, scheduled jobs, init containers, sidecars, worker images, and images held in less frequently used registries.
- Digest accuracy: Link scan results and SBOMs to immutable digests. A mutable tag can make remediation evidence ambiguous.
- Package scope: Review operating-system packages, language dependencies, bundled binaries, and copied artifacts. A clean operating-system scan does not prove that application dependencies are safe.
- Runtime relevance: Determine whether the vulnerable code is reachable, loaded, privileged, or exposed. Keep the analysis factual and record assumptions.
- Build context: Check Dockerfiles, build arguments, package-manager configuration, lock files, and multi-stage build boundaries. A package removed from the final stage may still appear in a separate builder image with a different risk profile.
- Registry controls: Review retention, access permissions, deletion behavior, and whether old vulnerable images can still be pulled. A registry comparison can help when these controls are changing; see the container registry comparison.
- Deployment identity: Confirm which service account or automation identity can promote images. Pair image controls with a periodic Kubernetes RBAC review.
- Secrets: Ensure credentials were not copied into an image layer, build log, or SBOM metadata. Image remediation does not replace a proper secrets management process.
A useful vulnerability-response record can follow this structure:
Finding:
Image and digest:
Application and environment:
Package and installed version:
Severity and exploitability:
Exposure and runtime use:
Available fix or mitigation:
Action: fix / mitigate / accept temporarily / retire
Owner:
Security reviewer:
Build and deployment evidence:
Exception expiration or review date:
Verification result:
Common mistakes
- Scanning only at build time. New disclosures can affect already deployed images, so maintain a recurring scan of registry contents and running workloads.
- Updating only the image tag. A tag does not prove that the running workload changed. Track digests through build, registry, deployment, and verification.
- Fixing the scanner instead of the dependency. Suppression may reduce noise, but broad ignores can hide real exposure. Scope suppressions narrowly and give them review dates.
- Using severity as the entire decision. Severity is useful for sorting work, but exposure, privileges, reachability, compensating controls, and business impact also matter.
- Keeping abandoned images indefinitely. Old artifacts create confusion and may remain deployable. Apply retention and deletion rules that preserve required audit evidence without retaining unnecessary risk.
- Rebuilding without reviewing provenance. A patched package in an untrusted or unexpected build output is not a complete remediation. Verify source, workflow, registry, and artifact identity.
- Failing to test base-image changes. Updating a runtime or operating-system layer can change certificates, users, filesystem paths, locales, or startup behavior. Validate the application as well as the scan result.
If an image update affects a Kubernetes workload, include rollout behavior, health probes, configuration, and add-ons in the review. The broader Kubernetes upgrade readiness checklist provides a useful model for checking compatibility before a change reaches production.
When to revisit
Use this workflow during a weekly vulnerability review, before a planned release, whenever a high-priority disclosure affects a package you use, and after changes to scanners, registries, build systems, signing controls, or deployment gates. Revisit the base-image strategy during seasonal planning cycles and whenever a supported runtime or operating-system line changes.
Refresh the operational checklist at least quarterly, and sooner after a major security-tool release or a material workflow change. Confirm that the scanner still covers the image formats and registries in use, that SBOM generation remains attached to the correct digest, and that exception records still have owners and review dates.
For the next review, take one production image and complete the process end to end:
- Locate its deployed digest and owning team.
- Retrieve or generate its SBOM.
- Review open findings using severity and runtime context.
- Rebuild from an approved base image or document the exception.
- Verify provenance, deployment, and the post-remediation scan.
- Record one improvement to make the next review faster or more reliable.
That small recurring exercise keeps container image security connected to delivery operations. It also creates the evidence teams need when investigating a newly disclosed vulnerability, preparing for an audit, or confirming that a remediation actually reached production.