How candidates and pull requests are decided
Selecting base image update candidates
For pinned tags, KestreLynx selects candidates for PRs that change the tag in FROM.
For floating tags, it provides rebuild guidance.
This page explains how KestreLynx selects the FROM to update, matches base layers, and estimates the effect of rebuilding.
See Terms for the terminology used on this page.
Identifying the base image
KestreLynx follows FROM inheritance from the selected build stage to identify the external image to update.
It obtains the Dockerfile location and stage selection from the following information.
- When using a Dockerfile mapping, use its
targetto select the stage - When Compose's
build:identifies the location to change, use its context, Dockerfile, andbuild.target - When a Dockerfile mapping and Compose's
build:use the same repository and base branch, check that the Dockerfile path andtargetagree - On Kubernetes, use a
dockerfilemapping to specify the target and check that the image name in the Pod spec matches the running image
KestreLynx uses the stage named by the resulting target, or the last stage when it is omitted.
The following Dockerfile excerpt shows the difference between inheritance through FROM build and copying through COPY --from=build.
FROM golang:1.22.1 AS build
FROM build AS test
FROM debian:12.5.1-slim AS runtime
COPY --from=build /out /out
The selected stage determines which FROM is considered for a tag change.
target |
Path followed | FROM considered for a tag change |
|---|---|---|
test |
test → build → external image |
FROM golang:1.22.1 AS build |
Omitted or runtime |
runtime → external image |
FROM debian:12.5.1-slim AS runtime |
References in COPY --from are not followed when identifying the base.
The tag determines whether KestreLynx compares update candidates or provides guidance.
Here, the “current base” is the image that the tag in the current Dockerfile's FROM points to in the registry now.
| Base tag | Processing |
|---|---|
| Pinned tag | Compare the latest patch in the same series |
| Floating tag | Match the layers of the base currently referenced by the tag against the running image |
Adopting a pinned-tag candidate requires it to resolve at least one base fix target without introducing new findings. See Verification scope by target for the decision conditions and what is verified.
If the candidate in the same series does not resolve the findings, KestreLynx also checks whether it can proceed to Checking newer series.
For floating tags, KestreLynx does not create tag update PRs or compare vulnerability counts before and after an update.
A commit tag in FROM is also treated as a floating tag, and if its content has not changed since the image was built, the card action line advises changing to a newer tag.
See Dockerfile input requirements for inputs that allow KestreLynx to locate the change.
Matching base layers
KestreLynx checks the layer sequence to determine whether the current base image forms the foundation of the running image. It matches the base's layer sequence against the first layers of the running image, including their order.
The matching result determines what happens next.
| Matching result | Processing |
|---|---|
| Match with a pinned tag | Proceed to selecting base fix targets and comparing candidates |
| Mismatch | Do not treat a comparison of that base as representative of the running image |
| Empty or unusable layer information | Treat as “Not comparable” |
| Match with a floating tag | Determine that no update is visible from the base currently referenced by the tag and record fix targets in the base layers without comparing candidates |
A mismatch with a floating tag also does not qualify as a candidate with confirmed improvements. See Rebuild estimates for floating tags for estimates included in rebuild guidance.
Layer matching and build provenance
A match establishes correspondence between filesystem layers. Even if a later instruction reinstalls a package with the same name and version, Trivy may report it as belonging to a base layer.
Selecting base findings
KestreLynx selects which findings to use as base fix targets. It treats findings according to the layers reported by the Trivy scanner.
| Layer containing the finding | Treatment as a base fix target |
|---|---|
| A matched base layer | Include as a target |
| A layer after the base | Do not include as a target |
| No layer information | Do not include unless the language runtime conditions are met |
| The same layer ID appears both inside and outside the base and cannot be distinguished | Do not include unless the language runtime conditions are met |
Handling language runtime findings
For findings from a JDK release file, KestreLynx determines whether they come from the base solely by matching layers, as it does for Trivy findings.
For Node.js, Python, and Java runtime findings based on an environment variable, KestreLynx also uses the version environment variable to determine whether they come from the base. This determines how findings are attributed to the base; it does not prove build provenance.
For pinned tags, KestreLynx checks all of the following conditions when using environment variables to attribute findings to the base.
- The current base's layer sequence matches the first layers of the running image
- Both the running image's configuration and the current base's configuration contain the runtime's version environment variable
- The environment variable has the same value in the running image and the current base
- For Java,
JAVA_HOMEis the same absolute path in the running image and the current base
The version environment variables are NODE_VERSION for Node.js, PYTHON_VERSION for Python, and JAVA_VERSION for Java.
If an environment variable occurs more than once, KestreLynx uses its last value.
When all conditions are met, runtime findings that could not be assigned to a layer are included as base fix targets. The comparison between the current base and the candidate also checks runtimes, and the candidate is rejected as undetermined if a runtime being compared cannot be checked on either side.
Rebuild estimates for floating tags
KestreLynx checks the current base against the running image to estimate the effect of rebuilding for rebuild guidance. This is separate from the normal candidate comparison used to decide whether to propose a PR, and no image is built.
The check applies when a floating tag is used in FROM and the current base's layers do not match the first layers of the running image.
This layer mismatch is recorded as floating_base_unconfirmed.
KestreLynx matches package locations and CVEs and records the result in rebuild_check.
One fix plan item targets one FROM in one Dockerfile.
Results from multiple running images built using that FROM are combined in that item.
For language runtimes themselves, KestreLynx estimates the effect of rebuilding when the following conditions are met.
- The running image has findings in the language runtime itself
- The runtime version can be checked from the current base's image configuration
- For Java,
JAVA_HOMEis the same absolute path in the running image and the current base - For findings from a
releasefile, the estimate includes only findings for the JDK thatJAVA_HOMEpoints to in the running image
When these conditions are met, KestreLynx estimates how many findings would disappear if a rebuild inherited the base's version and records the result in rebuild_runtimes.
It considers only CVEs currently detected in that runtime and does not count CVEs introduced by the new version.
Because this is not a comparison of finished images, the classification remains not_comparable (“Not comparable”).
An estimate for the entire item is included only when every target running image has the reason floating_base_unconfirmed.
For example, suppose two running images use the same FROM, with one image's layers mismatching the current base and the other's matching it.
The mismatching image retains its individual rebuild_runtimes record, but no estimate is included for the entire item.
Known limitations for language runtimes
- If a later layer replaces only the
nodeorpythonexecutable, KestreLynx cannot distinguish it when the version environment variable is unchanged - The rebuild estimate may be inaccurate if the Dockerfile reinstalls the runtime or overrides the version through
ENV - KestreLynx does not propose updates to pinned Temurin tags such as
21.0.13.1_2-jre
Scan preparation checks the comparison conditions and scan limits.
| Preparation | Processing |
|---|---|
| Current base | Scan the content currently referenced by the tag from the registry under the scan comparison conditions |
| Running image | Rescan if its scan conditions differ from those used for comparison |
| Scan count | Use the remaining baseline_rescans_per_cycle allowance |
| Identical base content | Scan only once per cycle |
The check runs after planning, language package updates, and newer series checks, but before the plan is saved. It reserves time and registry requests for PR processing through the same mechanism as the Limits and reserving capacity for PR processing.
If the check stops to preserve capacity for PR processing, it records newer_series_reserved.
Matching method
For a package in the same location, KestreLynx checks whether the current base still has the target CVE.
A package's status is the vulnerability fix status reported by Trivy.
fixed indicates that a fixed version has been released, not that the vulnerability has been resolved in the running image.
The findings used for this check are selected as follows.
| Target | Findings used |
|---|---|
| Running image | Findings within the severity range whose status is fixed and that have a fixed version |
| Current base | All findings within the severity range, including those without a fixed version |
| Language runtimes themselves | Findings in rebuild_runtimes determined by Rebuild estimates for floating tags |
Packages are matched by type, class (OS or language package), name, and location.
PkgPath and Target are package location information reported by the Trivy scanner.
The table shows the location used for each package type and when location matching leaves a finding undetermined.
| Package type | Location used for matching | When matching is not possible |
|---|---|---|
| OS package | Match by package name without using a path | The base's OS cannot be identified |
node-pkg |
Use PkgPath as reported |
PkgPath is empty |
python-pkg |
Use PkgPath with the package's own version removed from .dist-info or .egg-info components |
PkgPath is empty |
jar |
Use PkgPath with the package's own version removed when the filename ends in -<version>.jar |
PkgPath is empty |
| Other types | Use PkgPath, or a Target containing / as a path when PkgPath is empty |
PkgPath is empty and Target contains no / |
For example, the following paths differ only in pip's own version and are matched as the same location.
| pip version | PkgPath reported by Trivy |
|---|---|
25.0.1 |
usr/local/lib/python3.12/site-packages/pip-25.0.1.dist-info/METADATA |
25.3 |
usr/local/lib/python3.12/site-packages/pip-25.3.dist-info/METADATA |
A finding is also left undetermined when any of the following applies.
- The base contains multiple versions at the same location
- The base contains the same version at the same location but does not report the CVE
- A language runtime finding is not included in
rebuild_runtimesfor the version where it was detected
For types other than OS packages, node-pkg, python-pkg, and jar, KestreLynx checks other locations only when neither the matching package nor the target CVE is found at the same location in the base.
If another location contains a package with the same type, class, and name, the finding is left undetermined.
Matching results
rebuild_check describes findings expected to disappear, findings that remain, undetermined counts, and related results.
The fields used in the Webhook's Check against the current base are listed below.
| Field | Meaning |
|---|---|
gone |
Package records where the base has a different version at the same location without the target CVE |
remaining |
Package records where the base has the same CVE at the same location |
not_in_base |
Records of OS packages or packages in global node_modules that are absent from the same location in the base |
other_not_in_base |
Number of other packages absent from the same location in the base, such as application dependencies outside the scope of not_in_base |
only_in_base |
Package records with base findings within the severity range whose status is fixed and that have a fixed version, with no matching finding at the same location in the running image |
undetermined |
Number of findings that could not be determined |
The check's status is recorded in rebuild_check.status.
When there are multiple running images, their individual statuses determine the status of the entire item.
| Status | Meaning | Condition for the entire item |
|---|---|---|
checked |
All target findings have been determined | Every running image is checked |
partial |
Some findings are undetermined | None is not_checked and at least one is partial |
not_checked |
No comparison was made, with an explanation recorded in reason and detail |
At least one is not_checked |
The following example has two running images using the same FROM, both with the reason floating_base_unconfirmed.
| Running image A's status | Running image B's status | Status of the entire item |
|---|---|---|
checked |
partial |
partial |
The following rules also apply when combining results from multiple running images for the entire item.
- The item's
rebuild_checkis included only when every running image has the reasonfloating_base_unconfirmed goneincludes a finding only when it disappears from every running image that has it- If the base version differs by platform, each version has a separate record
Notification contents
In Slack and email, the check status and findings expected to disappear determine whether floating tag rebuild guidance is shown. The following table shows when the rebuild line appears and which text is appended.
| Check status | Rebuild line | Appended text |
|---|---|---|
checked, with findings expected to disappear |
Shown | None |
checked, with no findings expected to disappear |
Not shown | None |
partial |
Shown | (some findings could not be confirmed) |
not_checked |
Shown | (which findings disappear could not be confirmed) |
| No check result was recorded | Shown | (which findings disappear could not be confirmed) |
Findings are expected to disappear when package results in rebuild_check.gone or runtime estimates in rebuild_runtimes include disappearing findings.
Items with a rebuild line count toward “rebuild” in the opening summary.
If the notification includes a PR number, the opening summary instead counts PRs by status and does not count rebuilds.
Even when no rebuild line is shown, the webhook's rebuild_check records the matching results.
A runtime estimate line appears only when the rebuild line is shown and the runtime has findings expected to disappear or remain.
The Python runtime itself is displayed as Python runtime and the Java runtime as Java runtime.
Package lists use the following display rules.
- Show package names and versions without CVE IDs
- Group packages in global
node_moduleslisted under “not in the current base” by their outer package - Show at most 10 entries per line after grouping, with a count for the rest
The following example has undici inside a globally installed npm.
When listed under “not in the current base”, undici contributes to the count of packages bundled with npm instead of appearing by name.
Limitations of the estimates
Rebuild estimates have the following limitations because changes to the finished image caused by Dockerfile instructions are not checked.
- The effects of Dockerfile
RUNinstructions are not evaluated, so commands such asapk upgrademay remove findings listed as “also in the current base” - If the Dockerfile reinstalls an older version at the location of the current base's package, findings listed as “gone if the current base's version carries over” may remain
- “not in the current base” does not distinguish packages removed from the base from packages added by the Dockerfile
- “new in the current base” includes findings that Dockerfile instructions remove from the finished image
The webhook's dockerfile_items[].final_image_verified is false, indicating that the finished image after rebuilding has not been verified.
When a merged PR has not been deployed
This check identifies cases where a base update PR has been merged but the running images were still built from the old base.
Because it uses PR processing records, it runs only when PR processing is enabled through pull_requests.
For an item with the reason base_layers_mismatch, KestreLynx checks all five conditions below.
- The repository was verified through GitHub during the latest fix plan processing, and its ID matches the repository ID in the record
- A Dockerfile PR created by KestreLynx has been merged and targets the same repository, base branch, file, and stage
- Nobody has changed the PR's branch or base, and its contents remain as created by KestreLynx
- The
FROMafter the PR's change and theFROMin the current Dockerfile specify the same image and tag - Every running image's image ID matches an ID recorded for the running images when the PR was created
Image names are matched allowing equivalent names such as python and docker.io/library/python.
If all conditions are met, the item's reason changes to base_update_not_deployed.
If multiple PRs qualify, KestreLynx uses the one with the highest number.
The item's category remains not_comparable, and each running image's result remains base_layers_mismatch.
Rebuild command guidance
Rebuild guidance shows operations according to how the Dockerfile was located. The guidance for each source is listed below.
| How the Dockerfile was located | Suggested operation |
|---|---|
Compose build |
Pull the current base and rebuild with docker compose build --pull, then recreate the containers |
| Configuration mapping only | Pull the current base, rebuild with a command such as docker build --pull, and redeploy |
Compose build combined with a container/<name> mapping |
Rebuild Compose services with docker compose build --pull and docker run containers with a command such as docker build --pull, then recreate each container |
Guidance based on configuration mappings also applies to images built in CI or other build systems.
docker build --pull illustrates the option for retrieving the base again and is not a complete command ready to run.
The notification guidance alone does not determine the Dockerfile, build context, or name of the image to create.