WIP: Scanning: add support for CPE catalog which maps packages to repositories - #158
Draft
vojtapolasek wants to merge 5 commits into
Draft
vojtapolasek wants to merge 5 commits into
vojtapolasek wants to merge 5 commits into
Conversation
Generate an online catalog from explicitly selected repository IDs and store it as plain JSON. Index exact NEVRA matches, preserve repository-to-CPE metadata for offline scanning, and keep the catalog proof of concept free of a second database format.
Add catalog generation CLI wiring and scan-time enrichment. Configure Claircore with a local repository mapping, validate catalog compatibility, and attach exact-NEVRA CPEs only to the matching package environments before vulnerability matching.
Keep the catalog regression test and local fixtures in the shared branch without including the private VM reproducer documentation. The test still proves the exact krb5-libs NEVRA is missed without repository CPE context and reported after catalog enrichment.
Mab879
reviewed
Sep 21, 2026
|
|
||
| var catalogCmd = &cli.Command{ | ||
| Name: "catalog", | ||
| Usage: "generate an RHEL package catalog", |
| }, | ||
| &cli.StringFlag{ | ||
| Name: "arch", | ||
| Usage: "package architecture to catalog", |
Member
There was a problem hiding this comment.
After doing some playing on my RHEL boxes, seems you can't get info for other arches. So I propose we drop this and send the arch we running on to the catalog creator.
| Usage: "package architecture to catalog", | ||
| }, | ||
| &cli.StringSliceFlag{ | ||
| Name: "repo-id", |
Member
There was a problem hiding this comment.
Should be required? Can make not required for RHEL?
| Action: generateCatalog, | ||
| Flags: []cli.Flag{ | ||
| &cli.StringFlag{ | ||
| Name: "rhel-version", |
Member
There was a problem hiding this comment.
I don't think you can get info from other RHEL versions info. Is this even needed?
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.
This is rather a draft. It is working, but if accepted, there are plans for further enhancements and possibly simplifications.