Skip to content

Fix Debian point release detection#4997

Open
OsamaSE wants to merge 1 commit into
anchore:mainfrom
OsamaSE:fix/debian-point-release
Open

Fix Debian point release detection#4997
OsamaSE wants to merge 1 commit into
anchore:mainfrom
OsamaSE:fix/debian-point-release

Conversation

@OsamaSE

@OsamaSE OsamaSE commented Jun 20, 2026

Copy link
Copy Markdown

Description

Debian stable keeps /etc/os-release VERSION_ID at the major release, while /etc/debian_version carries the point release. Syft already reads /etc/debian_version when os-release has no Debian version (#4569); this also uses it when os-release only has the major version.

Debian documents this split in base-files: VERSION_ID="13" and DEBIAN_VERSION_FULL=13.5. The Debian discussion for adding point releases to VERSION_ID instead concluded that VERSION_ID should continue to identify the release series, with full point-release information exposed in a separate Debian-specific field.

This also aligns Debian with other distro metadata where VERSION_ID commonly includes minor or patch versions, for example Ubuntu 24.04, Rocky 9.3, and Alpine 3.21.7.

On a Debian point-release image, Trivy did not report the same findings from a Syft-generated SBOM when the SBOM identified the distro as only the major release (13). The SBOM scan matched Trivy's direct image scan when the SBOM used the point release (13.5), which is expected because Trivy puts Debian OS versions into the package PURL distro qualifier and requires qualifier values to match.

This is not expected to change Grype or Dependency-Track vulnerability results, since both treat Debian point releases as matching the major series:

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

Issue references

Related: #4569

Debian's /etc/os-release declares only the major version in VERSION_ID (e.g. "13"), while /etc/debian_version carries the point release (e.g. "13.5"). The cataloger previously skipped debian_version whenever os-release already had a Version/VersionID, so point releases were lost.

Signed-off-by: Osama Elhindawy <25825931+OsamaSE@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant