[codex] Add stable JSON run summary fields#26
Merged
Conversation
stacknil
commented
Apr 29, 2026
Owner
Author
stacknil
left a comment
There was a problem hiding this comment.
Reviewed. Scope is clean.
I’m treating this as the v0.6 baseline for machine-readable JSON consumption:
- base summary remains count-only
- summary.policy is conditional on policy usage
- summary.enrichment is conditional on PyPI/Scorecard enrichment usage
- unchanged is intentionally omitted because unchanged components are not modeled
- no CLI, Markdown, workflow, version, network, or CVE behavior changes
Approved to merge after required review gate is satisfied.
This was referenced Apr 30, 2026
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.
Design
This PR extends the existing
summaryobject insbom-diff-and-riskJSON reports with stable machine-readable run fields.The base summary remains compact and count-only:
added,removed,changed, andrisk_counts.unchangedis intentionally not added because the current diff model does not track unchanged components.summary.policyis emitted only when a policy was applied. It contains policy status and violation counts:status,blocking,warning, andsuppressed.summary.enrichmentis emitted only when PyPI provenance or OpenSSF Scorecard enrichment was used. It contains enrichment mode plus provider-specific component counts and status-count maps. This does not add CLI flags, network behavior, or CVE lookup.Files Changed
tools/sbom-diff-and-risk/src/sbom_diff_risk/report_json.pytools/sbom-diff-and-risk/tests/test_reports.pytools/sbom-diff-and-risk/tests/test_provenance_reporting.pytools/sbom-diff-and-risk/tests/test_scorecard_reporting.pytools/sbom-diff-and-risk/examples/sample-policy-fail-report.jsontools/sbom-diff-and-risk/examples/sample-policy-warn-report.jsontools/sbom-diff-and-risk/examples/sample-provenance-report.jsontools/sbom-diff-and-risk/examples/sample-scorecard-report.jsonValidation
Local validation completed:
Results:
summary.policyappears only when policy is appliedsummary.enrichmentappears only when PyPI or Scorecard enrichment is usedOut of Scope
unchangedcount because unchanged components are not tracked by the current diff model