Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Container Image Scanning?

Image scanning inventories the packages inside a container image and matches them against vulnerability databases, in the pipeline, in the registry, and against what is running.

Illustration for the cybersecurity term Container Image Scanning
Home / Blog / Cybersecurity Terms / What Is Container Image Scanning?
17 November 2026

What Is Container Image Scanning?

What Is Container Image Scanning?

Container image scanning inventories everything inside an image—operating system packages, language libraries, and sometimes the binaries themselves—and compares that inventory against vulnerability databases such as the National Vulnerability Database and the distributions’ own security trackers. The output is a list of components, their versions, the vulnerabilities affecting them, and ideally the fixed version you should move to.

Three Places to Scan, Three Different Answers

Scanning once is better than not scanning, but each stage catches something the others cannot.

In the pipeline, immediately after the build. This is the only point where the developer who caused the problem is still thinking about the code, and the only point at which you can prevent a bad image existing. Feedback here must be fast, or it will be worked around.

In the registry, on a schedule. An image that was clean when built does not stay clean; new vulnerabilities are published against it every week. Registry scanning answers the question nobody can answer from the pipeline alone: which of the images we have already shipped are now vulnerable?

Against running workloads. Only this tells you which of those vulnerable images are actually deployed, in which environment, with what network exposure and which identity attached. That context is what separates urgent from theoretical, and it is the contribution of a cloud workload protection platform.

The Tools

Trivy and Grype are the open-source defaults, both fast enough to run on every build, and both able to emit a software bill of materials alongside the findings. Clair underpins several registry implementations. The cloud registries include their own scanning—Amazon ECR with basic and enhanced modes, Azure Container Registry through Defender, and Google Artifact Registry—which is usually the quickest way to get registry-wide coverage without new infrastructure. Commercial platforms add reachability analysis, exploit intelligence, and policy enforcement across clouds.

Thresholds Developers Will Accept

The fastest way to make scanning useless is to fail every build with a critical finding. A freshly pulled base image can carry dozens, most of them in packages your application never calls, many with no fix available. Teams respond by adding a blanket exception, and the control becomes decorative.

Something like the following works better in practice:

Pay attention to how severity is assigned. A CVSS base score describes the vulnerability in the abstract, not in your deployment, and distributions frequently rate the same flaw lower because of compile-time hardening. Exploit prediction scoring and the CISA Known Exploited Vulnerabilities catalogue are far better prioritisation inputs than severity alone; see our entry on CVSS.

Fixing the Cause, Not the Symptom

Most findings in most images come from the base image rather than from application code. Attributing each finding to the layer that introduced it—covered in container image layer analysis—usually shows that one base image upgrade clears the majority of the list. Moving to a minimal or distroless base removes entire categories permanently, because a shell and a package manager that are not present cannot be vulnerable.

Rebuild on a schedule rather than only when code changes. A service that has not been modified for six months is running a six-month-old userland, and nightly or weekly rebuilds against a patched base keep that from accumulating silently.

Enforcing the Result

A scan that produces a report nobody acts on changes nothing. Gate deployment on the scan result at admission, using the policy engines described in Kubernetes admission controllers, and require that images are signed by your pipeline so an unscanned image cannot be substituted. Combine the two and the registry becomes a genuine control point rather than a filing cabinet.

Finally, remember what scanning cannot see: logic flaws in your own code, misconfiguration of the workload, secrets baked into layers, and anything in a package the tooling fails to identify. It is one input among several.

At Privia Security, we assess pipelines and container platforms end to end through our cloud security services.

FAQ – Frequently Asked Questions

Should a Build Fail on Every Critical Vulnerability?

No, and teams that try this usually end up disabling the gate. Fail on critical and high findings that have a fix available in a component the image genuinely uses, and raise dated tickets for the rest. That keeps the gate credible, focuses effort on changes that are actually possible today, and avoids blocking releases over flaws with no available patch.

Why Do Two Scanners Report Different Results for the Same Image?

They use different vulnerability sources, different package detection logic, and different rules for matching versions to advisories. One may use distribution-specific trackers that account for backported fixes while another relies on upstream version numbers and reports false positives. Pick one tool as authoritative for gating, and treat a second as a cross-check rather than running both as blockers.

Is Scanning the Registry Enough Without Pipeline Scanning?

It catches the same vulnerabilities eventually, but much later and with no link to the change that introduced them. Pipeline scanning prevents a bad image existing and gives feedback while the developer still has context. Registry scanning catches vulnerabilities published after the build. Both are cheap; running only one leaves an obvious gap in whichever direction you chose.

Do Distroless Images Remove the Need to Scan?

They reduce the findings substantially, because there are far fewer packages and no shell or package manager, but your application dependencies are still present and still need scanning. Distroless also changes incident response, since you cannot open a shell to investigate a running container. Plan for ephemeral debug containers or sidecars before adopting them widely.

Related Terms

You May Be Interested In These

What Is SMB Protocol Security?

Cybersecurity Terms

17 November 2026

What Is SMB Protocol Security?

Read More
What Is Distributed Tracing in Security?

Cybersecurity Terms

17 November 2026

What Is Distributed Tracing in Security?

Read More
What Is IPsec?

Cybersecurity Terms

17 November 2026

What Is IPsec?

Read More