You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: tools/sbom-diff-and-risk/docs/summary-json-ci-cookbook.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,12 @@
1
1
# Summary JSON CI cookbook
2
2
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.
4
5
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.
6
10
7
11
## Minimal command
8
12
@@ -14,11 +18,13 @@ sbom-diff-risk compare \
14
18
--summary-json outputs/summary.json
15
19
```
16
20
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`.
18
23
19
24
## Python consumer
20
25
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.
22
28
23
29
```python
24
30
import json
@@ -41,7 +47,8 @@ if risk_counts.get("new_package", 0) > max_new_packages:
41
47
42
48
## PowerShell consumer
43
49
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
0 commit comments