Container image security scanning is most useful when it is treated as a repeatable release control rather than a one-time audit. This guide compares common scanning approaches, explains which signals to track, and provides a practical CI/CD remediation workflow for vulnerabilities, secrets, misconfigurations, and software bills of materials (SBOMs).
Overview
A container image can contain more than application code. It may include operating-system packages, language dependencies, compiled binaries, configuration files, certificates, and build artifacts. A secure delivery workflow therefore needs more than a single CVE check. It should answer four questions:
- Which components are present in the image?
- Which known vulnerabilities, secrets, and configuration risks affect it?
- Which findings block a release, and which can be documented for later remediation?
- Can the exact image deployed to a registry or cluster be traced back to the scan result?
Container image security scanning tools differ in how they identify packages, consume vulnerability data, generate SBOMs, integrate with registries, and enforce CI/CD policies. Tool selection should follow the workflow you need to operate. A small team may begin with a command-line scanner and a signed build artifact. A larger platform team may need registry admission controls, centralized findings, exception workflows, and evidence that remains available after a pipeline run.
Scanning is also not the same as remediation. A scanner reports a condition at a point in time. The engineering workflow must then identify the owning team, determine whether the finding is reachable or relevant, update the dependency or base image, rebuild the image, rescan it, and verify that the approved digest is the one deployed.
What to track
Compare scanners by workflow, not by feature count
The following comparison is a practical starting point. Capabilities and packaging can change, so confirm the current behavior, supported registries, database terms, and license conditions before standardizing on a tool.
| Tool or approach | Useful fit | Typical outputs and integrations | Offline and licensing questions |
|---|---|---|---|
| Trivy | Broad developer and CI scanning for images, filesystems, repositories, and related artifacts. | Vulnerability findings, configuration checks, secret detection, and SBOM generation in common formats. | Can use locally available databases or caches in restricted environments. Check the current database distribution and license terms for your deployment model. |
| Grype with Syft | A composable workflow where Syft creates an SBOM and Grype matches packages against vulnerability data. | Image or SBOM scanning, machine-readable reports, and integration with CI pipelines and artifact workflows. | Offline operation depends on preloaded databases and the chosen workflow. Review current database, output-format, and commercial-support terms. |
| Docker Scout | Teams already using Docker-oriented build and registry workflows that want image analysis connected to those workflows. | Image recommendations, dependency and base-image visibility, and integration points associated with Docker environments. | Separate available plan features from self-managed requirements. Confirm registry coverage, data handling, CI support, and current licensing. |
| Registry-native scanning | Organizations that want scanning close to the image repository and deployment approval process. | Image findings, repository dashboards, retention or promotion controls, and integrations with cloud or container registries. | Offline use is often limited or architecture-dependent. Check supported registries, scan timing, retention, export formats, and access controls. |
| Commercial application-security platforms | Teams needing centralized ownership, policy management, ticketing, risk context, and reporting across many repositories. | Container findings combined with source, dependency, IaC, secret, and runtime context, depending on the product. | Compare licensing by repository, developer, workload, scan, or data volume. Confirm whether private registries, air-gapped operation, and SBOM import are supported. |
| Registry-focused scanners such as Clair | Teams that need a scanner designed around registry analysis and are prepared to integrate it into a broader workflow. | Image-layer and package vulnerability analysis with deployment-specific integration work. | Evaluate operational maintenance, database updates, policy enforcement, and report storage rather than assuming the scanner supplies a complete security program. |
Track more than CVE counts
A useful container security dashboard records the image digest, repository, owning team, base-image identifier, build commit, scan timestamp, scanner version, vulnerability database version or timestamp when available, and the policy result. It should also distinguish between:
- Vulnerabilities: Known weaknesses associated with detected packages or components.
- Secrets: Potential credentials, tokens, private keys, or sensitive configuration embedded in layers or files.
- Misconfigurations: Risky image or deployment settings, such as unnecessary privileges, exposed services, or weak defaults.
- SBOM coverage: Whether the image produces a complete, usable inventory in a format such as SPDX or CycloneDX.
- Remediation status: New, triaged, assigned, fixed, accepted, mitigated, or false positive.
Do not use severity as the only decision variable. A high-severity package in an unreachable code path may require a different response from a lower-severity issue affecting an exposed service. Record the reason for each decision without treating that reasoning as permission to ignore an unreviewed finding.
Cadence and checkpoints
Run container scanning at multiple points. Each checkpoint answers a different question.
- During development: Scan a local image or pull request build so developers see package, secret, and configuration issues before merge. Keep this check fast and provide a direct remediation path.
- At image build: Generate an SBOM, scan the immutable image, and attach the result to the build record. Use the image digest rather than only a mutable tag.
- Before promotion: Apply the release policy to the exact artifact that will enter the registry or deployment environment. A source scan does not replace an image scan.
- After publication: Rescan retained images when vulnerability data changes. This catches newly disclosed issues in images that were previously approved.
- At deployment: Verify that the deployed workload references the approved digest and that admission or deployment controls have not substituted another image.
- During operations: Track newly affected images, overdue exceptions, base-image age, and remediation time. Connect urgent findings to the incident process when exposure or exploitability warrants it.
A monthly review can cover aging exceptions, failed scans, stale databases, unowned repositories, and images that have not been rebuilt recently. A quarterly review is a useful point to test scanner coverage, update policy thresholds, review the supported SBOM formats, evaluate registry integrations, and check whether the selected tools still fit the organization’s build and deployment model. For pipeline-specific diagnosis, use this CI/CD pipeline troubleshooting guide.
Copyable scanning policy template
Container image security policy
Scope:
- Apply to every release image and every production deployment.
- Identify artifacts by immutable digest, repository, commit, and build ID.
Required checks:
- Vulnerability scan completed with a recorded scanner and database version.
- SBOM generated in an approved format, such as SPDX or CycloneDX.
- Secret scan completed for image contents and build output.
- Image and deployment configuration checks completed.
Release blocking:
- Block findings that meet the organization’s defined severity and exposure threshold.
- Block confirmed credentials or private keys unless the security owner documents containment.
- Block missing or unverifiable scan evidence.
Exceptions:
- Record finding ID, affected digest, owner, rationale, compensating control, approver, and expiry date.
- Do not create indefinite exceptions.
- Reassess exceptions when the image, dependency, exposure, or vulnerability data changes.
Verification:
- Rebuild after remediation.
- Rescan the new digest.
- Confirm the deployed digest matches the approved digest.
How to interpret changes
A change in the dashboard does not automatically mean that the software became less secure. It may reflect a new vulnerability record, improved package detection, a changed severity assessment, a different base image, or a scanner and database update. Preserve enough metadata to explain why counts changed.
When a new finding appears, triage it in this order:
- Confirm the artifact: Check the image digest, environment, package version, and scan timestamp.
- Confirm detection: Determine whether the package is actually present and whether the result is a duplicate, false positive, or dependency alias.
- Assess exposure: Identify whether the affected component is reachable, loaded, privileged, internet-facing, or included only in an unused build layer.
- Choose remediation: Prefer updating the direct dependency, rebuilding from a maintained base image, removing unnecessary packages, or changing the build process.
- Set a deadline: Assign an owner and due date based on severity, exposure, exploitability, and operational context.
- Verify closure: Rebuild and rescan. A closed ticket without a clean result is not proof that the image was fixed.
Rebuilding is often preferable to patching a running container. Containers should generally be treated as replaceable artifacts: create a new image, test it, promote it, and roll back to a known digest if the release causes problems. Keep the exception process separate from the normal remediation path so that accepted risk does not become invisible technical debt.
Secrets require a different response from ordinary package findings. Remove the secret from the source and image, revoke or rotate it, inspect access logs when appropriate, and prevent recurrence with secret scanning and build controls. Removing a file in a later layer may not remove it from the image history, so treat an exposed credential as compromised until the relevant security process determines otherwise. For related operational guidance, see the secrets management tools and rotation playbook.
When to revisit
Review this workflow on a monthly or quarterly cadence, and immediately after a significant vulnerability disclosure or a change to the build and deployment architecture. The article’s comparison and your internal policy should be revisited when a scanner changes its database behavior, adds or removes output formats, alters registry support, changes offline operation, or introduces a new licensing model.
Use these checkpoints to keep the process current:
- Base-image updates: Scan the replacement image before adoption and compare package inventory, vulnerabilities, size, and runtime behavior.
- Pipeline changes: Confirm that scans still run on merge, release, and promotion paths, including failed-build handling and artifact retention.
- Registry or cluster changes: Verify that every production registry and Kubernetes environment is covered and that deployment references are digest-pinned where appropriate.
- Policy reviews: Reassess thresholds, exception expiry, ownership, and evidence requirements rather than copying severity labels directly into release rules.
- Audit preparation: Test whether the team can produce an image digest, SBOM, scan result, approval record, exception history, and deployment verification for a selected release.
Start with one representative service today. Generate its SBOM, scan the exact release image, record the findings and scanner metadata, and walk one issue from discovery through rebuild and deployment verification. Then turn the successful path into a reusable CI/CD control. As the workflow matures, connect it with your least-privilege access review, infrastructure change review, and incident runbooks so container security remains part of normal DevSecOps operations rather than a separate inspection performed only after a problem appears.