Skip to main content
Container scanning now has its own dedicated command: endorctl container scan.The endorctl scan --container commands are deprecated and will be removed after a three-month deprecation period.Migrate to the endorctl container scan command to ensure continued compatibility. For more details, see Container scan commands migration guide.
Containers help developers create, test, and deploy applications in a consistent environment. Container images include standalone or executable files, along with the libraries and dependencies needed to run a container. Many of these components are open-source software, which exposes container images to open-source risks. Gaining visibility into container images helps you identify and prioritize risks and maintain compliance obligations. Endor Labs container scans detect and report known vulnerabilities and other risks in:
  • Operating system packages: Packages installed through the container’s base OS package manager.
  • Programming language packages: Packages installed through language-specific package managers.
  • Libraries and dependencies: Static and dynamic libraries and runtime dependencies required by the application.
It also generates a software bill of materials (SBOM) that lists all components, their versions, and associated metadata. The SBOM gives you a complete inventory of the container’s contents.
Upgrade to endorctl version 1.6.734 or higher to ensure accurate container scan results.

How Endor Labs derives container findings

Endor Labs identifies the packages installed in each image layer, then matches each package against vulnerability data for its ecosystem. OS packages use OVAL feeds and data from distribution developers, and language packages use published data supplemented by Endor Labs proprietary research. When none of these sources cover a vulnerability, Endor Labs falls back to NVD affected ranges. VEX exports label these fallback vulnerabilities with the NVD source. Endor Labs also uses the following sources for specific images and packages:
  • OpenJDK security advisories and Oracle Critical Patch Update advisories for Java runtimes, such as OpenJDK, Azul Zulu, Oracle Java, and GraalVM.
  • NVD records for Alpine vulnerabilities that the Alpine security database doesn’t list.
  • The Chainguard security advisory feed for Chainguard images.
  • The Echo security advisory and OSV feeds for Echo images.
  • PHP security advisories and NVD for PHP built from source, in the php, php-cli, and php-fpm packages.
Endor Labs fetches the container image from a container registry or loads it from a local file to scan containers. It then proceeds to extract the layers of the container image. It traverses the filesystem of each layer to identify files and directories. It looks for known package manager and metadata files to gather information about installed packages and their versions. It identifies the components and dependencies within the image and presents the findings in CLI and the Endor Labs user interface. Endor Labs categorizes the severity of vulnerabilities detected in container scans as follows:
  • Use the severity assigned by the distribution, if it exists.
  • Use the NVD severity if the distribution does not provide the severity.
  • Report the vulnerability as Medium if neither the distribution nor NVD provides a matching severity.
Endor Labs doesn’t report disputed vulnerabilities withdrawn from NVD.

Discover base images of containers

A container image is often built on a base image, a foundational layer that includes an operating system and other essential components. Knowing which vulnerabilities come from the base image and which come from your application layers helps you decide where to fix them. During each container scan, Endor Labs looks for the base image in the following order and stops at the first match:
1

Previously scanned images

Matches the image’s layers against base images already scanned in your namespace. If several previously scanned base images match, Endor Labs selects the one that shares the most layers with your image, which is usually its direct parent. To select a different one, pass its name with --base-image-name.
2

Local container runtime

Looks for an image in your local container runtime whose layers form the start of the scanned image.
3

Image label

Reads the org.opencontainers.image.base.name label from the image.
4

Scan flags

Uses the base image name from --base-image-name, or from the Dockerfile set with --dockerfile-path.
5

Public images

Looks up public Docker Hub images whose layers match the image.
If Endor Labs detects the base image in your local container runtime and hasn’t scanned it before, it scans the base image automatically. The scan creates a separate project named after the base image repository. Other detection methods identify the base image but do not scan it. When Endor Labs finds a match through the public image lookup, it also marks the matching layers in your image as base image layers. Endor Labs also skips the automatic base image scan for dry runs and when it cannot verify the base image reference in your local container runtime. To scan the base image into a project that you choose, use the --base-image-scan-project flag.
To turn off the automatic base image scan, set the --base-image-scan flag to false.

Specify the base image

Automatic detection may not find the base image if it is not in your local container runtime, such as a CI pipeline that scans a tar file. In these cases, use any of the following methods:
  • Scan sequence: Scan the base image first. Later scans of images built on that base image match it automatically.
  • Dockerfile label: Set the label directly in your Dockerfile with a command such as LABEL org.opencontainers.image.base.name="openjdk:17-slim".
  • Build time label: Include the base image label during the build process with the --label flag. Specify the base image and, optionally, its exact version through the SHA256 hash.
  • Base image name flag: Use the --base-image-name flag to name the base image at scan time. Endor Labs uses it to choose between base image names when it finds more than one, and as a fallback when no other source identifies the base image.
  • Dockerfile path flag: Use the --dockerfile-path flag to read the base image name from the Dockerfile that built the application image. --dockerfile-path reads only the first FROM instruction. For a multi-stage build, use --base-image-name instead of --dockerfile-path to name the base image of the final stage.
Base image

Remediate base image vulnerabilities

After you identify and scan the base image, you can act on the vulnerabilities it introduces. Base image remediation compares your current base image against newer versions, then shows how many findings each update resolves and how safe it is to adopt. Use it to choose the safest upgrade. See Base image remediation.

Compare findings across builds

Incremental container scanning compares a new build of a container image against a baseline scan and reports only what changed. It lists the findings that the build introduced, fixed, or shares with the baseline. You can also suppress the shared findings so each scan shows only what the build introduced. See Incremental container scanning to learn more.

Verify access to container registries

If the container image is in a private Docker registry, you must authenticate the container client before the scan. Use the following commands to authenticate the container client:
Learn more about Docker authentication
Learn more about Podman authenticationEndor Labs Podman troubleshooting
You must configure the containerd config file to authenticate with the container registry.Learn more about containerd authentication

Supported languages and package managers

The container scan identifies dependencies for the following operating systems and languages: Endor Labs recognizes only the installed dependencies. Declared but uninstalled dependencies in the container image are not recognized.

Findings for Chainguard Libraries

Chainguard Libraries are open source packages that Chainguard rebuilds from source. For some versions, Chainguard also patches known vulnerabilities. A patched build keeps the upstream version number and adds a Chainguard marker, such as 3.0.2+cgr.1. Endor Labs recognizes these versions in container scans, SCA scans, and imported SBOMs when you use endorctl v1.7.1274 or later. Endor Labs recognizes the following version formats, where N is the Chainguard patch release number: Endor Labs derives the findings for a Chainguard Libraries version as follows:
  • Matches the package against vulnerability data by its upstream version, without the Chainguard marker.
  • Leaves out the vulnerabilities that Chainguard reports as fixed in that build. Endor Labs reads the fixed vulnerabilities from the VEX data that Chainguard publishes for Chainguard Libraries.
  • Reports every other vulnerability that affects the upstream version.
  • Reports malware findings even when Chainguard reports a fix for the package version.
For example, CVE-2024-34069 affects werkzeug 3.0.2, and Chainguard fixes it in werkzeug 3.0.2+cgr.1. Endor Labs doesn’t report CVE-2024-34069 for werkzeug 3.0.2+cgr.1. The other vulnerabilities that affect werkzeug 3.0.2 still appear as findings. A vulnerability that Chainguard fixed doesn’t appear in your findings, and it isn’t listed as a dismissed finding. For the findings that remain, Endor Labs recommends the upstream version that fixes the vulnerability.

Findings for Echo Libraries

Echo Libraries are open source packages that Echo rebuilds with patches for known vulnerabilities. An Echo build keeps the upstream version number and adds an Echo marker, such as 25.2+echo.1. Endor Labs recognizes Echo builds in container scans, SCA scans, and imported SBOMs. Every supported ecosystem uses the <version>+echo.<N> format, where N is the Echo build number. More build metadata can follow the marker after a period, as in 1.2.3+echo.1.frntr.1. Endor Labs recognizes Echo builds in the following ecosystems: Endor Labs derives the findings for an Echo build as follows:
  • Matches the package against vulnerability data by its upstream version, without the Echo marker.
  • Leaves out the vulnerabilities that Echo reports as fixed in that exact build. Endor Labs reads the fixed vulnerabilities from the VEX data that Echo publishes for its builds.
  • Reports every other vulnerability that affects the upstream version.
  • Reports malware findings even when Echo reports a fix for the package version.
For example, CVE-2025-8869 affects pip 25.2, and Echo fixes it in pip 25.2+echo.1. Endor Labs doesn’t report CVE-2025-8869 for pip 25.2+echo.1. The other vulnerabilities that affect pip 25.2 still appear as findings. A vulnerability that Echo fixed doesn’t appear in your findings, and it isn’t listed as a dismissed finding. For the findings that remain, Endor Labs recommends the upstream version that fixes the vulnerability.

Limitations of container findings

  • Scanning Windows containers is not supported.
  • Docker file scans are not currently supported.
  • Container registry direct integrations are not currently supported.
  • Support for scanning binary files inside a container is limited.
  • Endor scores are not calculated for findings reported in the container scan.