Skip to content

Language packages

Common rules for language package updates

This page explains the common rules for choosing update targets and compares update methods and partial PR behavior across managers. See the following pages for the complete process for each manager.

Topic Page
npm, pnpm, uv, and pip updates Node.js and Python package updates
Re-resolution by updating dependent packages Re-resolution through dependent packages
Go updates Go candidate selection
Maven updates Maven candidate selection
Gradle updates Gradle candidate selection
Rust updates Rust candidate selection
Environments for running package managers Work container execution

For verification coverage concerning building the final image, application behavior, and deployment, see Verification scope by target. For the terms used on this page, see Terms.

Language package selection

Candidate selection determines which packages to update and their update targets. The process from planning to PR creation follows these steps.

  1. Examine findings from the running image and dependency files, also checking runtime and tool version conditions for npm, pnpm, and uv
  2. Match findings against dependency files and choose packages and update targets
  3. If remediation PRs are enabled, confirm runtime and tool versions for execution and update dependency files
  4. Validate the update results
  5. Create a PR for updates that pass validation

Planning alone stops after step 2. For npm, pnpm, and uv, planning assigns manual handling if the runtime has reached its support end date or version conditions cannot be met.

An update target from planning alone is not a verified update result.

Fixed-version lower bounds

The lower bound is derived from findings whose status reports that a fix is available (fixed) and that include fixed-version information. Fixed-version information from each Trivy finding is used without replacing it with the fixed version in KestreLynx's package-level aggregation of findings.

The lower bound combines the version selected for each vulnerability, separately for each installed version of a package.

Scope How the lower bound is determined
Each vulnerability Select the lowest reported fixed version newer than the installed version
Each installed version of the same package Use the highest version selected across its vulnerabilities as the update target

For Rust, the lower bound is selected within the series compatible with the running version.

The following example has vulnerabilities A and B in one package installed at 1.2.0. Compare the lowest fixed version selected for each vulnerability with the resulting update target.

Version role Value Meaning
Installed version 1.2.0 Version detected in the running image
Fixed versions for vulnerability A 1.2.3, 2.0.1 The lowest version newer than the installed version is 1.2.3
Fixed versions for vulnerability B 1.2.5, 2.0.2 The lowest version newer than the installed version is 1.2.5
Update target lower bound 1.2.5 The higher of 1.2.3 and 1.2.5
Adopted version 1.2.7 if it is the only version in the updated files Version confirmed in the updated dependency files

Even if vulnerability A is aggregated first and the package-level information records 1.2.3 and 2.0.1, vulnerability B's information is also used to set the update target to 1.2.5.

The adopted version can differ from the update target and is the lowest version when multiple versions remain. For how to read the display, see Update targets and adopted versions.

The following conditions also apply when determining the lower bound.

  • If the installed or fixed version cannot be parsed, assign manual handling (manual, displayed as “Needs a decision” in Slack)
  • If a target vulnerability has no reported fixed version newer than the installed version, do not select the package as an update candidate
  • When combining multiple installed versions of the same package, verify that their calculated update targets are equal and that occurrences outside the update targets in the same dependency files are already at or above that target

The following example has 1.2.0 and 1.2.2 in the same dependency files, both selected for updates. It shows decisions based on update targets and versions outside the update targets, assuming other conditions such as version specifications are satisfied.

Case Target for 1.2.0 Target for 1.2.2 Version outside the update targets Decision
Equal targets and other versions at or above the target 1.2.5 1.2.5 1.2.7 Update together
Different targets 1.2.3 1.2.5 1.2.7 Assign manual handling
Other version below the target 1.2.5 1.2.5 1.2.4 Assign manual handling

After the update, each occurrence must reach the lower bound and satisfy the fixed-version conditions for every target vulnerability. For ordinary release versions, apply the following table from top to bottom, using the updated version as the reference.

Relationship between the updated version and reported fixed versions Requirement for the updated version
A fixed version has the same major and minor as the updated version Must be at or above the highest fixed version with that major and minor
No fixed version has the same major and minor as the updated version, but one has the same major Must be at or above every fixed version with the same major as the updated version
No fixed version has the same major as the updated version Must be at or above every reported fixed version

When the major version is 0 and no fixed version has the same major and minor, apply the third row of the table. The following example reports fixes in 0.2.5, 0.3.2, and 1.0.1, showing how comparison versions differ depending on whether a fix exists in the same minor.

Updated version Fixed version used for comparison Fixed-version condition
0.2.6 0.2.5, with the same major and minor Satisfied
0.3.1 0.3.2, with the same major and minor Not satisfied
0.4.0 All reported fixes: 0.2.5, 0.3.2, and 1.0.1 Not satisfied

Because no fixed version has the same minor as 0.4.0, the comparison also includes 1.0.1, so the fixed-version condition is not satisfied.

A prerelease satisfies the fixed-version condition only if that exact prerelease is reported as a fixed version. Reaching the lower bound alone is insufficient: the checks in Accepting update results also apply.

Runtime selection

Runtime selection determines the version of Node.js, Python, Go, Rust, or Gradle and the JDK used to execute an update.

Node.js, Python, and Go use supported series (groups of versions such as Node.js 22 or Python 3.13) from the runtime table KestreLynx is using. For supported series, execution versions, and support end dates, see Supported runtimes.

The following sections describe selection for each manager.

Manager Section describing selection
npm and pnpm Node.js selection
uv Python selection for uv
pip pip verification environment
Go Go selection
Gradle Gradle execution settings
Rust Rust runtime selection
Maven No update runtime required because KestreLynx rewrites pom.xml

Accepting update results

Acceptance determines whether changes to dependency files pass validation and can be included in a PR.

Update methods by manager

Update processing rechecks the inputs, edits version specifications for dependencies declared directly by the project (direct dependencies) where needed, and then updates dependency files.

The following table summarizes update methods and checks for each manager. Links on manager names lead to the complete process, while links in the checks column lead to validation details.

Manager How dependency files are updated Checks before and after the update
npm Remove target records from a working copy of the lockfile and regenerate it Check that regenerating from the original inputs preserves records, then validate the update result (Checking related changes)
pnpm Remove target records from a working copy of the lockfile and regenerate it without frozen locking Check dependency consistency with the lockfile frozen before and after the update (Checking related changes)
uv Update the lockfile with a specified target version for each package Check consistency between the lockfile and project declarations before and after the update (Checking related changes)
pip Rewrite pinned versions and update existing hashes from PyPI wheel information Check dependency resolution with dry runs targeting the running image's environment before and after the update (pip verification environment)
Go Update all targets in one go get <module>@<version> ... invocation without running go mod tidy Check the go.mod diff, go.sum, dependency requirements, and scans before and after the update (Go update validation)
Maven Have KestreLynx rewrite versions, properties, and dependency management declarations in pom.xml Resolve and scan dependencies with Trivy before and after the update
Gradle Have KestreLynx rewrite version declarations and run dependencies --update-locks in a work container Validate returned files and the lockfile, and scan the lockfile with Trivy before and after the update (Gradle update validation)
Rust Update Cargo.lock with cargo update --precise for each target Check the scope of dependency changes, checksums, and findings before and after the update

The npm pre-update check compares a lockfile regenerated from the original inputs with the original lockfile. It compares record locations, package names, versions, download locations, hashes, and link flags.

For pnpm 12, --fix-lockfile is also specified to resolve the removed records again.

Conditions for partial PRs

Partial PR selection determines whether some packages can be excluded from the update targets while the remaining updates are included in a PR. The stage at which packages can be excluded and whether the remaining update is rerun depend on the manager.

Manager Whether some packages can be excluded while updating the rest Exclusion conditions
npm, pnpm, and uv Decide after the update and rerun once if needed The decision diagram in this section and Checking related changes
pip Decide after checking the pinned-version update and rerun once if other targets remain The explanation of dependents_hold_back in this section and pip verification environment
Go Do not split the update to exclude some targets Go update validation
Maven Exclude targets before rewriting and allow only one rerun based on post-update dependency checks Maven exclusion conditions
Gradle Exclude targets before rewriting and do not rerun for targets missed after the update Gradle exclusion conditions
Rust Do not split targets into smaller groups and retry after running the update Rust update validation

For npm, pnpm, and uv, when Re-resolution through dependent packages is applicable, its result is checked before deciding on a partial PR from the ordinary update. The following diagram shows partial PR selection for an initial update result with targets that missed their lower bounds.

flowchart TD
    A["Packages that reached their lower bounds"] -->|"None"| N["Do not propose a PR"]
    A -->|"Some"| B["Exclude targets that missed their lower bounds"]
    B --> C["Compare excluded targets: versions, occurrence counts, and dependency version declarations"]
    C -->|"Unchanged"| D["Continue checking the remaining updates"]
    C -->|"Changed or cannot be compared with original inputs"| R["Rerun the remaining updates once from the original inputs"]
    D -->|"Validation passes"| P["Create a partial PR for the remaining updates"]
    D -->|"Unexplained related changes"| R
    D -->|"Other validation failure"| N
    R --> E["Check all remaining targets reach their lower bounds and pass ordinary validation"]
    E -->|"All pass"| P
    E -->|"Target missed or validation fails"| N

If a rerun has already occurred, or validation fails without any targets being excluded, do not rerun for a partial PR and do not accept that result. The rerun does not repeatedly exclude additional targets.

For pip pinned-version updates, packages confirmed to be blocked by a dependent package's version requirements are excluded with dependents_hold_back. If other update targets remain in the same requirements.txt, rerun those updates once from the original inputs.

If the pip rerun passes validation, create a PR for the remaining updates and record excluded packages as left_out with their reasons. If no other targets remain or the rerun fails validation, do not create a partial PR.

The following requirements still apply after excluding targets.

  • Apply the ordinary checks for fixed-version conditions, dependencies, distributions, diffs, and scans to the remaining updates
  • Do not use a partial PR to ignore inconsistent inputs or new findings
  • Record excluded packages and their reasons, and carry them forward into a cycle that links the update to an existing PR

For how to read the display, see Partial PRs.

Card action line

The Action: line on a language package card uses the package's plan result when every finding with an available fix on the card matches one package in one dependency file. If any finding does not match, no line is produced from the dependency files.

When multiple lines can be shown on one card, one is selected in the following order (F is the dependency filename).

flowchart TD
    A["Is there a global node_modules line?"] -->|"Yes"| G["Show the global node_modules line"]
    A -->|"No"| B["Is there a dependency-file line, excluding packages the update cannot reach?"]
    B -->|"Yes"| L["Show the dependency-file line"]
    B -->|"No"| C["Is there a Dockerfile base image line?"]
    C -->|"Yes"| P["Show the base image line"]
    C -->|"No"| D["Is there a line for the image itself?"]
    D -->|"Yes"| I["Show the line for the image itself"]
    D -->|"No"| E["Is the package beyond the reach of dependency-file updates?"]
    E -->|"Yes"| U["Show the “updating F cannot fix it” line"]
    E -->|"No"| N["Omit the line"]

The following reason codes identify packages that dependency-file updates cannot reach.

Reason code Meaning
not_found_in_source The dependency files do not list the package at the running version
jar_bundled_copy A copy of the package is bundled inside another archive, which no change of the pom files reaches
go_stdlib_needs_newer_go The Go standard library is fixed by building with a newer Go, not by go.mod

For jar_bundled_copy, the line is omitted if any finding lacks the containing archive's file location.

See Language package updates through dependency files for display examples.