endorctl container scan command. Endor Labs identifies the base image of your application image and attributes findings to the base and application layers. It then compares newer base image versions so you can plan a safe upgrade. See Scan containers using endorctl to set up a container scan.
How base image remediation works
Base image remediation builds on base image detection during a container scan. The workflow has the following stages.1
Base image detection
Container scanning identifies the base image your application image is built on. It checks previously scanned images, images in your container runtime, base image labels, the name you set with
--base-image-name, the Dockerfile you set with --dockerfile-path, and matching public Docker Hub images. This separates vulnerabilities in the base image layers from those that your application introduces. See Discover base images of containers to learn more.2
Update candidate discovery
Endor Labs discovers a refreshed build of the current tag, the next version, and the latest version as candidate updates for your base image. Auto discovery of the next and latest tags is supported only for base images on Docker Hub, including private repositories. For base images in other registries, point to those tags with
--base-image-tag-next and --base-image-tag-latest. See Perform base image remediation to pin those tags.3
Impact analysis
Impact analysis scans each candidate base image and compares it against your current base image. The comparison reports how many findings each update would fix, how many it would introduce, and the change in findings broken down by severity and reachability.
4
Remediation guidance
Remediation guidance recommends the base image version that resolves the most findings at an acceptable risk of breaking changes. Update your project’s base image reference to that version, then rebuild and rescan the image to see the updated findings. For more information, see View update options.
Perform base image remediation
To compute the base image update options, scan your application image with the--base-image-check-updates flag. Choose the approach that matches how the scan detects your base image. Auto discovery of the next and latest versions can return no candidate, such as when you pin the base image only by digest. Scan the base image first when you need more predictable results.
Base image available locally
Base image available locally
When the base image is available in your local container runtime, Endor Labs detects it automatically. Run the scan with
--base-image-check-updates.Base image not available locally
Base image not available locally
When the base image is not in your local container runtime, such as a CI environment that scans a tar file, scan the base image first as its own project. Then scan your application image with
--base-image-check-updates. Scanning the exact base image first is the most reliable and recommended approach for CI.-
Scan the base image.
-
Scan the application image.
Base image from a Dockerfile
Base image from a Dockerfile
To read the base image name from the Dockerfile that built the application image, use
--dockerfile-path along with --base-image-check-updates. This flag is incompatible with --base-image-name.--base-image-tag-next and --base-image-tag-latest name the next and latest versions when auto discovery can’t determine them. Both flags require --base-image-check-updates, and each flag takes a single tag.
Endor Labs recommends only distribution releases that are generally available, have vulnerability data, and are not end of life. The scan skips a pinned tag that does not qualify and logs a warning. It then uses auto discovery for that candidate instead. It also skips moving tags such as ubuntu:rolling, debian:sid, and alpine:edge, and tags that name two releases, such as 25.10-noble.
View update options
You can view how the findings of your scanned application image would change with each base image update option. The results reflect the last scan and are not recomputed when you run this command. To recompute the update options, run the container scan with--base-image-check-updates again.
Each update option is a version of your base image that you can move to:
- Refreshed: The current base image tag resolved to its newest digest. Your version stays the same, but the image now includes the patches published for that tag since you last built. It’s a low-risk update, shown as Rebuild in the Endor Labs user interface.
- Next version: The tag that comes immediately after your current version, in version or timestamp order. This option keeps the upgrade small, so your application sees fewer changes. It’s a medium-risk update.
- Latest version: The newest tag available for the base image. It typically resolves the most findings of the three, but it makes the largest version change. It’s a high-risk update.
- The finding counts for your current base image and the candidate, and the change between them. A negative change means fewer findings after the update.
- The findings each update fixes and the findings it introduces. A fixed finding is present now and gone on the candidate. An introduced finding is absent now and present on the candidate.
--by-severity to group by severity even when reachability data is available.
Reachability analysis for containers targets OS dependencies, not language packages. Most base image findings are OS packages, so reachability data helps you prioritize them. See Container reachability to learn how Endor Labs measures it.
python:3.11.4. Its update options might look like the following:
- Refreshed: Rebuild on
python:3.11.4to include its latest patches. - Next version: Upgrade to
python:3.11.5. - Latest version: Upgrade to the newest release, such as
python:3.13.1.
list-base-image-updates command supports additional flags to target the image and narrow or format the results. See Base image update flags.
Examples
The following examples show common ways to run the command, from a quick comparison of the update options to a complete review of a single candidate.Triage vulnerabilities by severity
Triage vulnerabilities by severity
Show vulnerability findings only, grouped by severity. The results leave out other finding types and group findings into critical, high, medium, and low buckets, which helps when you triage CVEs.
Compare update options at a glance
Compare update options at a glance
Show counts only, without individual findings. This is the fastest way to compare how many findings each update option resolves before you drill into one, because the command skips fetching the finding records.
Review a single update option in full
Review a single update option in full
Show every changed finding for a single update option. Use this to review the complete list of fixed and introduced findings for a candidate before you adopt it. The
--list-all flag requires --update-option.Export results for automation
Export results for automation
Return the results as JSON for scripting and automation, such as gating a CI job on the number of findings an update resolves.
Base image scan flags
Use the followingendorctl container scan flags for base image remediation.
Base image update flags
Use the following flags with theendorctl container remediation list-base-image-updates command.
View remediation results in the Endor Labs user interface
You can view the update options and remediation guidance for a scanned container image in the Endor Labs user interface.- Select Containers from the left sidebar.
- Select a container image version to view its remediation summary.
- If you enable reachability analysis, the summary reports the number of reachable findings, and each update option shows how many of them remain after the update.
- If you don’t enable reachability analysis, the summary ranks the findings by their total counts.
- Current: Your existing base image version. It’s the baseline for comparing the update options.
- Rebuild: The same base image version, rebuilt to include the latest patches published for it. It’s a low-risk update, shown as the refreshed option in endorctl results.
- Next: The version immediately after your current one. It introduces the fewest changes and rarely requires configuration updates, so it’s a medium-risk update.
- Latest: The newest available version. It typically fixes more findings than the other options but involves the largest version change and requires a configuration review, so it’s a high-risk update.
- Select Next or Latest in Base image versions.
- Click Upgrade.
- Copy the command that matches your build setup, either a Dockerfile instruction or a Bazel rule for rules_oci or rules_docker.
- Update the image tag in the file your project uses to define base images.
- Rebuild the image.
- Rescan the container image to see the refreshed results.

- Select Layers to view the number of findings in the base image and the number of findings in the application layer. It also shows the base image name and digest, whether an update is available, and every layer in the order it’s applied with its finding count.
- Select Metadata to view the project, resolution time, package version UUID, exposed ports, environment variables, and labels of the image.
- Select Dependencies to view the dependency counts by visibility, scope, and reachability, along with the finding counts by severity.
- Select Reachability Analysis to view the profiling status, application type, profile type, image classification, duration, and entry point package.