feat: add --summary CLI flag to output high-level SBOM metrics#26
feat: add --summary CLI flag to output high-level SBOM metrics#26corepacket wants to merge 1 commit into
Conversation
|
LGTM, but some minor nits:
|
|
@absol27 Thanks for the feedback — just confirming the updated plan:
I’ll proceed with this unless you’d like anything adjusted. |
|
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
|
Hello @absol27, could you please take a look? I’ve updated the PR. |
|
Sorry @corepacket missed the notification.
The summary report with the --summary flag LGTM. I think some of these haven't been addressed. When the summary flag isn't used, we still want a brief report[count of packages and files instead of names]. Details when --summary flag is used, and maybe a --silent or --quiet flag to suppress any stdout. Also can you please rebase onto the latest main and make sure those changes are preserved. |
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