feat: add Hadron Linux support#5025
Open
Itxaka wants to merge 5 commits into
Open
Conversation
Signed-off-by: Itxaka <itxaka@kairos.io>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Itxaka <itxaka@kairos.io>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Itxaka <itxaka@kairos.io>
Signed-off-by: Itxaka <itxaka@kairos.io>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Itxaka <itxaka@kairos.io>
29388a8 to
a743030
Compare
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.
Description
Adds support for Hadron Linux to Syft.
Hadron Linux is a musl-based, rolling-release distribution that ships pristine upstream package versions and has no traditional package manager. Installed component versions are recorded in a single flat JSON file at
/usr/lib/hadron/components.json(aname → versionmap).This PR adds:
pkg.HadronPkg("hadron"), withPackageURLType()returninghadronso packages are minted aspkg:hadron/<name>@<version>.hadron-cataloger(agenericcataloger) that parses**/usr/lib/hadron/components.json, emitting one OS package per entry. Empty name/version rows are skipped and output is sorted by name for deterministic results.SourceInfomapping for the new type.OS detection works out of the box:
ID=hadroninos-releaseflows throughlinux.Releaseand is surfaced as distrohadron.PURL
pkg:hadron/<name>@<version>— chosen to reconcile 1:1 with the corresponding Trivy implementation (Trivy mints the OS-package PURL type from the OS family string, i.e.hadron).Context
This is the Syft half of cross-tool Hadron support. It mirrors the Trivy implementation in aquasecurity/trivy#10901 so that an SBOM/scan of the same Hadron image yields identical package names, versions, IDs, OS family, and PURLs regardless of scanner. A companion Grype change adds the
hadrondistro type and a distro matcher.No vulnerability advisory source for Hadron exists yet; that is intentionally out of scope here.
Type of change