Feature/package discovery#51
Open
raahulkurmi wants to merge 5 commits into
Open
Conversation
Signed-off-by: Rahul <raahulchaudhary07@gmail.com>
Signed-off-by: Rahul <raahulchaudhary07@gmail.com>
Signed-off-by: Rahul <raahulchaudhary07@gmail.com>
Signed-off-by: Rahul <raahulchaudhary07@gmail.com>
Signed-off-by: Rahul <raahulchaudhary07@gmail.com>
33992e0 to
0aaed75
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.
Summary
Adds CLI support for discovering, searching, and inspecting individual packages from witness attestations — without requiring users to manually search large SBOM outputs.
New Flags
Flag | Description -- | -- --show-packages | List all packages discovered during attestation processing --show-package | Search for one or more packages by name (comma-separated) --show-package-details | Display package metadata (version, ecosystem, PURL, hashes) --packages-only | Display package information only and skip full SBOM generationImportant Note on
--packages-onlyBy default, package discovery and inspection commands continue execution and generate the full SBOM after displaying the requested package information.
If you only need package information and want to skip SPDX/CycloneDX generation, use the
--packages-onlyflag.This is useful when:
Motivation
SBOM outputs are often large files containing hundreds or thousands of packages, making it difficult to quickly locate a specific package or inspect its metadata.
Currently, users typically need to generate a full SPDX/CycloneDX document and manually search through the output to verify package presence or investigate package information.
This feature provides a lightweight workflow for package discovery and metadata inspection directly from witness attestations.
Usage Examples
List all discovered packages
Search specific packages
Search and inspect package metadata
Search, inspect, and skip SBOM generation
Sample Output
Future Work
A potential follow-up enhancement would be support for displaying the SPDX/CycloneDX representation of selected packages directly.
Example:
This would allow users to inspect the SBOM entry associated with a specific package without generating or searching the entire SBOM document.
Notes
This change is additive and does not modify the existing SBOM generation workflow. Existing commands and output formats continue to work as before.