feat: recognize TuxCare ELS advisories#2916
Open
Korulag wants to merge 5 commits into
Open
Conversation
Contributor
Author
|
@another-rex @jess-lowe could you please take a look or ping someone who can? |
Introduce internal/tuxcare holding all TuxCare-specific knowledge: the version marker that identifies a TuxCare-rebuilt package, the mapping from os-release to the TuxCare advisory ecosystem (deb + RPM, per-distro version granularity), CentOS-8 ELS channel detection from the repo file, and host-context enrichment. Shared code references only the exported entrypoints. Signed-off-by: Vasily Kleschov <vkleschov@cloudlinux.com>
Add a supplementary-ecosystem registry that detects a vendor version marker and routes the osv.dev query to the vendor's ecosystem (e.g. TuxCare:AlmaLinux:9.6) instead of the base one. Routing runs before the base-ecosystem gate so CentOS/Oracle RPMs (which scalibr leaves without a base ecosystem) are still matched. TuxCare ecosystems are RHEL-family with epoch-encoding feeds, so their routed queries are epoch-qualified. Signed-off-by: Vasily Kleschov <vkleschov@cloudlinux.com>
Add the os/tuxcare-els-repo extractor, which reads the host's
/etc/yum.repos.d/centos8.{4,5}-els.repo file to recover the CentOS-8 ELS
channel (8.4 vs 8.5) — the only reliable signal, since os-release reports
only major 8 and the package el-token is ambiguous. It emits a synthetic
channel marker consumed by host-context enrichment. Registered in the
artifact preset and resolvable by name.
Signed-off-by: Vasily Kleschov <vkleschov@cloudlinux.com>
Run host-context enrichment after extraction and before matching in both scan paths: it stamps the detected CentOS-8 channel onto CentOS-8 RPM packages so they route to the correct TuxCare ecosystem, then strips the synthetic channel-marker package so it never reaches the matcher or report. Signed-off-by: Vasily Kleschov <vkleschov@cloudlinux.com>
A TuxCare advisory's affected entry is keyed to the overlay ecosystem (TuxCare:AlmaLinux:9.6) while the scanned package keeps its base ecosystem (AlmaLinux:9.6), so fix-version reconciliation skipped every fix and reported "No fix available" even when an upgrade existed. Normalize the overlay prefix to the base when reconciling, mirroring how Ubuntu Pro/LTS variant suffixes are handled, and apply it in both the table and the JSON/SARIF fixed-version paths (which also fixes Ubuntu Pro there). Signed-off-by: Vasily Kleschov <vkleschov@cloudlinux.com>
Korulag
force-pushed
the
tuxcare-advisory-recognition
branch
from
July 14, 2026 08:38
ee06a97 to
a0e5bec
Compare
Contributor
Author
|
@another-rex, could you please take a look at this one? |
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
Adds recognition of TuxCare Extended Lifecycle Support (ELS) advisories. TuxCare rebuilds distro packages with backported fixes and publishes its own advisory stream (
CLSA-*), which osv.dev serves under dedicated ecosystems (TuxCare:<Distro>:<Version>). This PR routes TuxCare-rebuilt packages to those ecosystems so their advisories — and fixed versions — are reported.Covers deb (Ubuntu / Debian) and RPM (AlmaLinux / CentOS / RHEL / Oracle Linux / CentOS Stream), including CentOS-8.4/8.5 channel detection.
How it works
TuxCare-rebuilt packages carry a version marker (e.g.
…+tuxcare.els3,….tuxcare.els2). The change is built around a small supplementary-ecosystem seam rather than anything TuxCare-specific in the core:internal/clients/clientimpl/osvmatcher): a marker-driven registry routes a matched package's query to the vendor ecosystem (e.g.TuxCare:AlmaLinux:9.6) instead of the base one, before the base-ecosystem gate (so CentOS/Oracle RPMs, which scalibr leaves without a base ecosystem, are still matched). This mirrors the existing single-query model; a package resolves to exactly one ecosystem.internal/tuxcare): all vendor knowledge — marker, os-release → ecosystem mapping, per-distro version granularity — lives here. Shared code touches only exported entrypoints.internal/scalibrextract/os/tuxcare-els-repo): CentOS-8 ELS pins a minor (8.4 vs 8.5) that os-release doesn't expose, so a small extractor reads/etc/yum.repos.d/centos8.{4,5}-els.repoand a host-context step stamps the channel onto CentOS-8 RPMs, then strips the synthetic marker before matching/reporting.internal/output,internal/utility/vulns): an advisory's affected entry is keyed to the overlay ecosystem while the scanned package keeps its base ecosystem, so fixed-version lookup previously found nothing and showed "No fix available". Reconciliation now normalizes the overlay prefix to the base — the same shape as the existing Ubuntu:Pro/:LTSvariant handling — in both the table and the JSON/SARIF paths. (As a side effect this also fixes Ubuntu Pro fixed-version resolution in JSON/SARIF, which had the same base-vs-variant mismatch.)Usage
RPM extraction is the experimental
os/rpmopt-in; the repo-file extractor rides the artifact preset on image scans:Testing
dnf), fully patched (clean), and the superseded-kernel case (an old kernel left on disk is correctly reported until removed).Scope / notes
Depends on: #2915