Container Vulnerability Scanning Misses Runtimes Outside Packages
Most container vulnerability scanning starts in the same place: the operating system's package database. The scanner opens the dpkg, rpm or apk database inside the image, lists the installed packages and their versions, and matches them against the distribution's security tracker. That is fast, accurate and well understood.
It also misses anything the package manager never installed. An nginx compiled from source, a JDK copied out of another image, a CPython built into /usr/local, a Ruby built by the official image, a single Bun binary, a .NET runtime unpacked from an archive. None of these have a row in the package database, so none of them get matched against anything. The scan comes back clean for the component that actually serves your traffic.
This post covers why that blind spot exists, where it shows up in real Dockerfiles, how to find what your scanner is not seeing, and what good coverage looks like: matching each runtime against its own project's advisories, grading images for end of life on the runtime they run, and using configuration to decide which findings are real.
How container vulnerability scanning works, and where it stops
An image is a stack of filesystem layers. A scanner flattens them and looks for evidence of installed software. There are three kinds of evidence, and they are not equally reliable.
- OS package databases. Debian and Ubuntu record installed packages in the dpkg status file, the RHEL family in the rpm database, Alpine in the apk installed database. Each entry has a name, a version and a source package, which map cleanly to the distribution's advisories.
- Language package manifests. Lock files,
site-packagesmetadata, gem specifications,node_modulespackage files and JAR manifests tell a scanner which application dependencies are present. Most scanners read these too. - Everything else. Binaries and directory trees placed by
COPY,ADD,curl | tarormake install. There is no database entry and often no manifest. Identifying them means recognizing the software from its files: a version string in a binary, areleasefile in a JDK home, a known install layout.
The third category is where the misses live. It is also, increasingly, where the most important software in the image lives. The language runtime and the web server are the components with the largest attack surface, and they are the ones teams most often install outside the distribution's packages so they can pin a version the distribution does not ship.
Where runtimes outside the package manager come from
You do not need an unusual build to hit this. Several of the most common patterns produce it.
Official language images
The official python images build CPython from source and install it under /usr/local. The official ruby images build Ruby from source the same way. The official node images install Node.js from a release tarball. The base layer underneath is a Debian or Alpine image with a normal package database, so an OS-only scan sees the distribution's packages and reports nothing about the interpreter itself.
Copied runtimes in multi-stage builds
Multi-stage builds encourage copying exactly what you need into a slim final image. That often means copying a whole runtime directory. The final image has the JDK, but no package ever recorded it.
Version managers and vendor archives
pyenv, asdf and similar tools compile or download interpreters into a home directory. Vendor JDK builds, including commercial ones, ship as archives. The .NET runtime is commonly unpacked from Microsoft's archives into a fixed directory. Bun ships as one self-contained binary.
Servers built from source
nginx is frequently compiled with a specific module set, or a patched OpenSSL, or simply a newer version than the base distribution carries. The result is a binary in /usr/local/nginx or /opt/nginx with no package behind it.
A Dockerfile that hides two runtimes
Here is a pattern that looks ordinary. It builds nginx from a source tarball in one stage and copies a Java runtime from another image into the final stage:
# build stage: compile nginx from source
FROM debian:bookworm-slim AS nginx-build
RUN apt-get update && apt-get install -y build-essential libpcre2-dev zlib1g-dev libssl-dev
COPY nginx-1.26.2.tar.gz /src/
RUN cd /src && tar xzf nginx-1.26.2.tar.gz && cd nginx-1.26.2 && ./configure --prefix=/opt/nginx --with-http_ssl_module --with-http_v2_module && make && make install
# final stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y libpcre2-8-0 zlib1g libssl3 && rm -rf /var/lib/apt/lists/*
COPY --from=nginx-build /opt/nginx /opt/nginx
COPY --from=eclipse-temurin:21-jre /opt/java/openjdk /opt/java/openjdk
ENV JAVA_HOME=/opt/java/openjdk PATH="/opt/java/openjdk/bin:$PATH"
COPY app.jar /app/app.jar
CMD ["/opt/nginx/sbin/nginx", "-g", "daemon off;"]
An OS-only scan of this image reports the Debian libraries: PCRE2, zlib, OpenSSL and the rest of the base. It reports nothing about nginx 1.26.2 or the Java runtime, because dpkg has never heard of either. If an nginx advisory or a Java Critical Patch Update lands next week, this image will still look clean.
Note the other detail: the image runs nginx, but it also carries a JRE. Whether that JRE matters for end of life depends on what actually runs, which we return to below.
How to find software your scanner is not seeing
Before trusting a clean result, check whether your scanner can see the runtimes you ship. A few practical tests:
- Compare the scan to the Dockerfile. List every
COPY --from, everyADDof an archive, everymake installand every version manager invocation. Each one is a component that has no package entry. Check that the scan output names it. - Look at the entrypoint. Whatever
ENTRYPOINTorCMDstarts is the component you most need covered. If it lives under/usr/local,/optor a home directory, it probably did not come from the OS package manager. - Plant a known-vulnerable runtime. Build a test image with an old interpreter compiled from source or copied from an archive, and scan it. If the scan does not flag the runtime, you have measured the gap directly.
- Check where the advisories come from. A scanner that does detect a source-built runtime still has to match it against something. A distribution tracker only covers the distribution's own builds. A runtime from upstream needs upstream advisories.
Match each runtime against its own project's advisories
Detection is half the work. The other half is choosing the right advisory source. A distribution's tracker describes the distribution's package, with the distribution's backported patches and version numbers. A runtime you built from upstream source has none of those patches. Matching it against a distribution's tracker gives the wrong answer in both directions.
The right source is the project that ships the runtime:
- nginx: the security advisories published by the nginx project.
- OpenJDK and Oracle Java: OpenJDK vulnerability advisories, plus Oracle's quarterly Critical Patch Update advisories for Oracle Java SE and GraalVM builds.
- CPython: advisories from the Python Software Foundation.
- Ruby: the Ruby project's security announcements.
- Bun: Bun's own advisories.
- .NET: Microsoft's monthly .NET security advisories.
The rule of thumb: whoever built the binary owns its advisories. A distribution-packaged nginx belongs to the distribution's tracker. An nginx you compiled belongs to nginx's own advisories. Mixing the two produces false positives on patched distribution builds and false negatives on upstream builds.
Grade end of life on the runtime the image runs
End of life is a separate signal from vulnerabilities. A runtime past end of life stops getting fixes, so the absence of findings tells you little. Most tooling grades end of life on the operating system alone. That misses the common case where the OS is current and the interpreter is not, such as a supported Debian base carrying a Python or Java release that upstream no longer patches.
Grading on every runtime present has the opposite problem. Images routinely carry runtimes they do not run: a JRE left from a build step, an old Python that a tool needed at build time, a Node.js used only to compile front-end assets. Marking every image end of life because of a toolchain leftover buries the images that actually run an unsupported runtime.
The better rule is to grade on what the entrypoint runs, plus the OS. When you cannot tell which runtime the entrypoint runs, count all of them. And keep a documented way to exempt a component, with a reason and an expiry, rather than ignoring the signal everywhere.
Use configuration to decide which findings are real
Many runtime and server vulnerabilities depend on a feature being enabled. nginx is the clearest example. An advisory in the HTTP/2 module does not apply to a server that never enables HTTP/2. An advisory in the mail proxy does not apply when the mail module is not configured. The same holds for the resolver and HTTP/3.
The trap is proving a feature is off. Reading nginx.conf in the image is not enough if the start command passes -c to a different file, or a Kubernetes workload mounts a ConfigMap over the config directory. A safe rule only marks a finding mitigated when the image's configuration leaves the feature off and nothing in the start command or the workloads running the image can point nginx at another configuration. If any of that is unknown, the finding stays open.
Network placement matters too. HTTP/2 connection attacks need a client that speaks HTTP/2 to nginx. If every path to the server goes through a load balancer that speaks HTTP/1.1 to the backend, that class of attack does not reach it.
What to do: a checklist for container runtime coverage
- Inventory the runtimes in your images that no OS package owns: interpreters, JDKs, web servers, standalone binaries.
- Confirm your scanner names each one, with a version, in its results. Test with a deliberately old runtime if you are unsure.
- Confirm each runtime is matched against its own project's advisories, not the base distribution's tracker.
- Grade end of life on the OS and the runtime the entrypoint runs. Track build toolchain leftovers separately and remove them from final stages where you can.
- Record end-of-life exemptions with a reason and an expiry date, scoped to one image repository unless the exemption truly applies everywhere.
- For servers like nginx, keep configuration in the image or in reviewed manifests, so you can prove a vulnerable feature is off instead of assuming it.
- Decide where the fix lives. A runtime copied from another image is fixed by bumping that source image tag. A runtime built from source is fixed by bumping the version in your build. A distribution package is fixed through the base image.
For the last step, our earlier post on whether a container fix belongs in the base image or the build walks through the decision.
How Heeler covers runtimes outside OS packages
Heeler container image scans detect nginx, OpenJDK and other Java builds, CPython, Ruby, Bun and the .NET runtime when no OS package owns them. Each is matched against its project's own advisories: nginx security advisories, OpenJDK advisories and Oracle Critical Patch Update advisories (including Oracle Java SE and GraalVM builds), Python Software Foundation advisories, Ruby security advisories, Bun advisories and Microsoft's .NET runtime advisories. A Python or nginx that the image's distribution packages stays covered by the distribution's advisories. Runtime findings appear in Security → Containers → Findings like any other finding, the Package Type filter selects them, and an image's detail page lists each runtime with its version.
Images are graded for end of life on the operating system and the runtime the entrypoint runs. When Heeler cannot tell which runtime the entrypoint runs, every runtime counts. An administrator can exempt a runtime or the OS for one image repository or all images, with a reason such as Build toolchain or Not in use, notes and an expiry date.
For nginx, the image scan reads the nginx configuration in the image. A finding for the nginx vulnerabilities that need HTTP/2, HTTP/3, the mail proxy or the resolver is marked mitigated only when the configuration leaves that feature off and every ECS, Kubernetes or Cloud Run workload running the image keeps its start command and config. On ECS, the HTTP/2 vulnerabilities are mitigated when the load balancer in front of nginx uses HTTP/1.1 only. If any of this is unknown, the finding stays open. Images that start nginx under supervisord are covered, and ingress-nginx controller images from registry.k8s.io are scanned.
Container findings feed the rest of the picture. Each carries an Autotriage band (Urgent, Plan or Defer) built from the service tier, internet exposure and threat, described on our prioritization page. Threat Intelligence now counts a CVE as present in your environment when it has a finding on a live container image, so a runtime CVE shows up in the In Your Environment count even when no repository dependency carries it. The same scanning sits alongside software composition analysis for application dependencies as part of Heeler's supply chain security coverage.
FAQ
Why does my container scanner miss software I installed myself?
Most scanners build their inventory from the OS package database, and software installed by COPY, an archive or make install never gets an entry there. Unless the scanner also recognizes runtimes from their files, those components go unreported.
Should a source-built runtime be matched against the distribution's advisories?
No, a runtime built from upstream source should be matched against the upstream project's advisories. Distribution trackers describe the distribution's own builds and backported patches, which a source build does not have.
Does an unused runtime make my image end of life?
It should not, if the image never runs it. Grade end of life on the OS and the runtime the entrypoint starts, and record an exemption with a reason and expiry for build toolchain leftovers you cannot remove yet.
Can configuration really make an nginx vulnerability not apply?
Yes, when the vulnerable feature is off and you can prove nothing turns it back on. That proof has to cover the image's config files, the start command and any workload that overrides them; if any of those is unknown, treat the finding as open.
Is this a problem for distroless or scratch images?
It is usually worse there. Minimal images often have little or no package database, so almost everything in them, including the runtime, has to be recognized from its files.
A clean scan only means something if the scanner can see the runtime that actually serves your traffic. Heeler finds nginx, Java, CPython, Ruby, Bun and .NET runtimes outside OS packages, matches them against their own projects' advisories, grades end of life on what the image runs, and uses nginx configuration to separate real findings from unreachable ones. Get a demo


.jpg)
