feat(suse): add support for openSUSE MicroOS and Leap Micro detection - #10988
Open
RajeshRajendiran wants to merge 1 commit into
Open
feat(suse): add support for openSUSE MicroOS and Leap Micro detection#10988RajeshRajendiran wants to merge 1 commit into
RajeshRajendiran wants to merge 1 commit into
Conversation
Detect openSUSE MicroOS and Leap Micro via their /etc/os-release ID so package listing and SBOM generation work for these OSes. Advisory matching isn't wired up since no data source covers their versioning scheme yet; --distro can be used to force matching against a supported family/version in the meantime. Close aquasecurity#8409
|
|
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 OS detection for openSUSE MicroOS (rolling release, Tumbleweed-based) and openSUSE Leap Micro (versioned, Leap-based) via their
/etc/os-releaseIDvalues (opensuse-microosandopensuse-leap-micro).As noted in the issue, exact vulnerability-advisory matching isn't feasible yet for either OS — MicroOS is versioned by build timestamp rather than a real release number, and no advisory data source currently covers either OS's versioning scheme. Per the issue's suggested compromise, this PR is scoped to detection only: users get correct OS family/name in package listings and SBOM output, and can pass
--distro <family>/<version>to force vulnerability matching against a supported family/version if they want it.Changes:
pkg/fanal/types/const.go: newOpenSUSEMicroOS/OpenSUSELeapMicroconstants, wired intoPurlNamespace()andOSTypespkg/fanal/analyzer/os/release/release.go: detect the two newIDvaluespkg/purl/purl.go: map both to therpmPURL type (same family as the other openSUSE/SUSE variants), so SBOM PURLs come out correctdocs/guide/coverage/os/index.md,suse.md) updated with the new supported OSes and a note on the vulnerability-matching limitation/etc/os-releaseIDvalues were not present anywhere in this repo, so they were cross-checked against two independent external sources (chef/ohai's platform-detection test fixtures and k0sctl's openSUSE detection code) rather than assumed.Deliberately out of scope:
pkg/detector/ospkg/detect.go/suse.goare untouched. Wiring up real vulnerability matching depends ontrivy-dbgaining a data source for these OSes first (currently it has none for MicroOS and only partial, disconnected plumbing for Leap Micro) — that's a separate PR against that repo.Related issues
MicroOSandLeap Microsupport #8409Checklist