extractor/os/rpm: add AlmaLinux ecosystem mapping#2148
Closed
herdiyana256 wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Hi @michaelkedar, PR is ready for review. All 14 CI checks passing. Thanks! |
copybara-service Bot
pushed a commit
that referenced
this pull request
Jun 9, 2026
…stem PiperOrigin-RevId: 928883806
Member
|
Thanks for this @herdiyana256! |
Contributor
Author
|
Hi @michaelkedar, sure! I'll submit a follow-up PR to |
Contributor
Author
|
Follow-up PR submitted to google/osv-scanner as requested: google/osv-scanner#2870 |
This was referenced Jun 10, 2026
This was referenced Jun 18, 2026
Contributor
Author
|
Closing this PR as the changes have been merged upstream via copybara (commit a940948). Thank you @michaelkedar for the review! |
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.
Closes #2091
Problem
ecosystem.gomaps RPM packages to OSV ecosystems based onIDfrom/etc/os-release. It already handlesrhel,rocky, andopenEuler, butalmalinuxhas no case. Any RPM package extracted from an AlmaLinux container falls through with an empty namespace and never matches anything on OSV.dev.On
docker.io/library/almalinux:9:OSV.dev tracks 1,000+ advisories under the
AlmaLinuxecosystem — all prefixedALSA-. None of them are reachable today because the ecosystem is never set. A few examples that should have been caught:ALSA-2022:8299— curl 7.76.1 — Critical (CVE-2022-32221)ALSA-2023:0333— curl 7.76.1 — High (CVE-2022-43552 use-after-free)ALSA-2023:1701— openssl 3.0.7 — Important (CVE-2023-0286, CVSS 7.4)ALSA-2023:2650— python3 3.9.16 — Critical (CVE-2023-24329)ALSA-2024:2988— kernel — Important (multiple privilege escalation CVEs)AlmaLinux is the main CentOS 8 replacement after Red Hat ended free access in December 2021. The official
almalinuxDocker image has over 1B pulls on Docker Hub.Solution
The
os/rpmextractor already readsIDfrom/etc/os-releaseand stores it inrpmmeta.Metadata.OSID. TheEcosystemAlmaLinuxconstant is already defined inosvconstants— it's just not wired up. The fix is oneif-branch inecosystem.go, same pattern as therockycase directly above it:No new extractor, no new dependencies.
Before / After
Before:
After:
With the namespace correctly set, the OSV matcher can now find
ALSA-2022:8299and the rest.Files changed
extractor/filesystem/os/ecosystem/ecosystem.go— oneif-branch, 3 linesextractor/filesystem/os/ecosystem/ecosystem_test.go— 3 new test cases (AlmaLinux_9,AlmaLinux_8,AlmaLinux_no_version)docs/supported_inventory_types.md— AlmaLinux added to the RPM rowTesting