Repository navigation
Match Alpine, Debian, and Ubuntu packages by release and source package - #49
Merged
codeyevsky merged 5 commits intoOct 27, 2026
Merged
Conversation
OSV only evaluates Alpine version ranges within a release branch such as Alpine:v3.17, so querying the bare "Alpine" ecosystem returned no vulnerabilities for every Alpine package and scans reported affected releases as clean. Alpine advisories are also keyed by source package, so binary subpackages like libcrypto3 never matched OpenSSL advisories. Derive the branch from the purl distro qualifier and the name from the upstream qualifier. Alpine components without a usable distro qualifier are now skipped with an explicit reason instead of silently matching nothing. A real alpine:3.17.2 SBOM goes from 0 to 35 findings. The bundled example SBOM gains distro qualifiers so the quickstart still imports all three components. Signed-off-by: GamehunterKaan <kaan@kaangultekin.net>
Debian and Ubuntu components were queried under their installed binary names, such as libc6 or libssl3, while OSV keys distribution advisories by source package (glibc, openssl). The bare "Debian" ecosystem also merges every release, so patched Debian 12 packages matched ranges from Debian 13 and later. Generalize the Alpine handling: derive the release-specific ecosystem (Debian:12, Ubuntu:22.04:LTS, Ubuntu:24.10) from the distro qualifier and the source name and version from the upstream qualifier, keeping the installed package URL. Distribution components without a usable release are skipped with an explicit reason. On real images, a debian:12 SBOM goes from 43 findings (67 missed, 14 from other releases) to the expected 96, and an ubuntu:22.04 SBOM from 9 to the expected 62. Signed-off-by: GamehunterKaan <kaan@kaangultekin.net>
Describe how the importer selects the release and source package for distribution packages, that those without a release are skipped, and the remaining matching limitations in the threat model. Signed-off-by: GamehunterKaan <kaan@kaangultekin.net>
Member
Author
|
The Verify failure is unrelated to this change: Confirmed on unchanged |
codeyevsky
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Distribution packages were sent to OSV with a bare ecosystem and the installed binary name. OSV evaluates distro ranges per release and keys advisories by source package, so scans missed most findings and reported others from the wrong release.
distro:Alpine:v3.17,Debian:12,Ubuntu:22.04:LTS,Ubuntu:24.10upstream(e.g.util-linux@2.38.1-5+deb12u3forbsdutils@1:2.38.1-…). The stored purl keeps the installed package.distro: skipped with a reason instead of silently matching nothingFindings behind this:
AlpineorUbuntuquery only matches explicitly listed versions. Alpine records have none, so every Alpine package returned 0.Debianquery merges all releases. Example: glibc2.36-9+deb12u14matches CVE-2023-4527 through the Debian 13 range, although Debian 12 fixed it indeb12u3.Evidence
Real Syft v1.54.1 SBOMs of official images. "Expected" means OSV queried with the release and source package.
sbomtests fail (e.g.osvIdentity(libssl3?distro=ubuntu-22.04&upstream=openssl) = "Ubuntu", "libssl3")After: the full CI Verify job passes in a Linux container (gofmt, govulncheck, vet,
go test -race ./..., release builds)Merge Danger
Door: two-way
No schema or migration change; a revert restores the old mapping.
Blast Radius: SBOM import
distroqualifier now skip Alpine, Debian, and Ubuntu packages that used to import.