Skip to content

Commit 3cd2236

Browse files
authored
[codex] Reflow summary-json CI cookbook Markdown
Reflow summary-json CI cookbook Markdown prose lines while preserving meaning and code examples. Docs formatting only; no runtime, tests, examples, workflows, package metadata, release tag, or publishing status changes.
1 parent 7a577d1 commit 3cd2236

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

tools/sbom-diff-and-risk/docs/summary-json-ci-cookbook.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Summary JSON CI cookbook
22

3-
This page shows how to consume `--summary-json PATH` in CI without changing the `sbom-diff-risk` analysis model.
3+
This page shows how to consume `--summary-json PATH` in CI without changing
4+
the `sbom-diff-risk` analysis model.
45

5-
`--summary-json` writes a compact machine-readable JSON object. It is the same object as `report.json["summary"]`, and is useful for CI dashboards, job summaries, and small local gates where a repository wants to set its own thresholds.
6+
`--summary-json` writes a compact machine-readable JSON object. It is the same
7+
object as `report.json["summary"]`, and is useful for CI dashboards, job
8+
summaries, and small local gates where a repository wants to set its own
9+
thresholds.
610

711
## Minimal command
812

@@ -14,11 +18,13 @@ sbom-diff-risk compare \
1418
--summary-json outputs/summary.json
1519
```
1620

17-
The full report remains available at `outputs/report.json`. The compact summary-only object is written to `outputs/summary.json`.
21+
The full report remains available at `outputs/report.json`. The compact
22+
summary-only object is written to `outputs/summary.json`.
1823

1924
## Python consumer
2025

21-
This example reads the summary and applies an explicit local threshold. The threshold is chosen by the caller; it is not a built-in package safety verdict.
26+
This example reads the summary and applies an explicit local threshold. The
27+
threshold is chosen by the caller; it is not a built-in package safety verdict.
2228

2329
```python
2430
import json
@@ -41,7 +47,8 @@ if risk_counts.get("new_package", 0) > max_new_packages:
4147

4248
## PowerShell consumer
4349

44-
This example uses `ConvertFrom-Json` and applies the same kind of explicit local threshold.
50+
This example uses `ConvertFrom-Json` and applies the same kind of explicit
51+
local threshold.
4552

4653
```powershell
4754
$summary = Get-Content outputs/summary.json -Raw | ConvertFrom-Json
@@ -65,7 +72,8 @@ if ($newPackageCount -gt $maxNewPackages) {
6572
- `summary.policy` appears only when policy evaluation is applied.
6673
- `summary.enrichment` appears only when PyPI or Scorecard enrichment is used.
6774
- `unchanged` is absent because unchanged components are not modeled.
68-
- Absence of `summary.policy` or `summary.enrichment` means the feature was not used, not that it failed.
75+
- Absence of `summary.policy` or `summary.enrichment` means the feature was
76+
not used, not that it failed.
6977
- Consumers should treat new unrecognized fields as additive data.
7078

7179
## Non-claims

0 commit comments

Comments
 (0)