feat: add --summary CLI flag to output high-level SBOM metrics#26
Open
corepacket wants to merge 1 commit intoSBOMit:masterfrom
Open
feat: add --summary CLI flag to output high-level SBOM metrics#26corepacket wants to merge 1 commit intoSBOMit:masterfrom
corepacket wants to merge 1 commit intoSBOMit:masterfrom
Conversation
Member
|
LGTM, but some minor nits:
|
Author
|
@absol27 Thanks for the feedback — just confirming the updated plan:
I’ll proceed with this unless you’d like anything adjusted. |
Member
|
Looks great, that's the summary of the plan! |
5f738f1 to
884631c
Compare
This commit updates the summary flag logic to: - Make the brief summary the default output. - Repurpose the --summary flag to output the detailed per-ecosystem package list. - Improve unclassified vs file ecosystem detection. Signed-off-by: corepacket <bnwankhede_b24@it.vjti.ac.in>
884631c to
0f9e729
Compare
Author
|
Hello @absol27, could you please take a look? I’ve updated the PR. |
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
Fixes #27
This PR introduces a new
--summaryCLI flag to thesbomit generatecommand to act as an immediate, lightweight observability dashboard. Instead of having to inspect massive raw JSON SBOM outputs, users can now pass this flag to see a high-level aggregation of their attestation-enriched dependencies directly in their terminal.What's Changed
--summaryboolean flag incmd/generate.go.pkg/generator/summary.gologic to iterate through the generatedsbom.Documentnodes.ecosystemstring prefix directly from the node's PURL (e.g., extractingpypifrompkg:pypi/...).pkg/generator/summary_test.goensuring precise ecosystem identification and total package counts.Example Output
Running:
./sbomit generate sample-attestation.json --summary