#150, PR 3 of the plan. It builds on #853 (build outputs). Tracker #167.
Why
With INHERIT += "cve-check", a Yocto build writes <image>.json next to the image. For every recipe in the image it lists the CVEs NVD records, each Patched, Ignored (with the CVE_STATUS reason) or Unpatched. That is Yocto's own verdict on everything it checked, wider than the SPDX's "CVEs fixed".
What
pipeline::yocto_cve_check reads the report into recipe, version and issues: status, detail (reason), description (note), NVD summary and CVSS v3. Size is capped at 256 MB.
Upload: the report goes up as a build_output, like the image SPDX. read_build_outputs tells the two apart by content: a JSON object with package/version, or a zstd archive. An unreadable file gets a build_spdx note that names both expected forms.
yocto_build::Built takes the reports. On an alert's CVE:
Yocto's verdict comes first:
Patched becomes fixed.
Ignored maps through the same table as the recipes' CVE_STATUS: not-applicable-* → not_affected, disputed/upstream-wontfix → under_investigation, cpe-incorrect → not_affected (component not present).
Unpatched gives no statement.
The statement text names the reason and the recipe's note.
Then the SPDX's fixed list.
Then the recipe in the tree.
Unpatched CVEs the NVD match missed (another version range, or a CPE that NVD's API matches differently) are added as alerts through record_nvd, with NVD's description and score from the report. This only happens for recipe components of the scan.
yocto_inventory::status_statement is now pub(crate).
Fixture
fixtures/yocto/core-image-minimal-qemuarm64.rootfs.cve.json is a trimmed copy of the real report from the ferrite build (scarthgap 5.0.21, cve-check run on 04.11.). It covers:
glibc: Patched, cpe-stable-backport, Ignored disputed, and 3 Unpatched;
busybox: Patched;
zlib: Patched and Ignored not-applicable-config.
Summaries are shortened; there is no personal data.
Tests
Unit tests:
parsing and statuses;
recognising the file by its first bytes;
refusing an SPDX document;
verdict order: the cve-check verdict before the SPDX fixed list and the recipe, Ignored mapped, Unpatched without a statement;
missing Unpatched CVEs added only for known components.
#150, PR 3 of the plan. It builds on #853 (build outputs). Tracker #167.
## Why
With `INHERIT += "cve-check"`, a Yocto build writes `<image>.json` next to the image. For every recipe in the image it lists the CVEs NVD records, each **Patched**, **Ignored** (with the `CVE_STATUS` reason) or **Unpatched**. That is Yocto's own verdict on everything it checked, wider than the SPDX's "CVEs fixed".
## What
- **`pipeline::yocto_cve_check`** reads the report into recipe, version and issues: status, `detail` (reason), `description` (note), NVD summary and CVSS v3. Size is capped at 256 MB.
- **Upload:** the report goes up as a `build_output`, like the image SPDX. `read_build_outputs` tells the two apart by content: a JSON object with `package`/`version`, or a zstd archive. An unreadable file gets a `build_spdx` note that names both expected forms.
- **`yocto_build::Built`** takes the reports. On an alert's CVE:
1. Yocto's verdict comes first:
- Patched becomes `fixed`.
- Ignored maps through the same table as the recipes' `CVE_STATUS`: `not-applicable-*` → `not_affected`, `disputed`/`upstream-wontfix` → `under_investigation`, `cpe-incorrect` → `not_affected` (component not present).
- Unpatched gives no statement.
- The statement text names the reason and the recipe's note.
2. Then the SPDX's fixed list.
3. Then the recipe in the tree.
- **Unpatched CVEs the NVD match missed** (another version range, or a CPE that NVD's API matches differently) are added as alerts through `record_nvd`, with NVD's description and score from the report. This only happens for recipe components of the scan.
- `yocto_inventory::status_statement` is now `pub(crate)`.
## Fixture
`fixtures/yocto/core-image-minimal-qemuarm64.rootfs.cve.json` is a trimmed copy of the real report from the ferrite build (scarthgap 5.0.21, cve-check run on 04.11.). It covers:
- glibc: Patched, `cpe-stable-backport`, Ignored `disputed`, and 3 Unpatched;
- busybox: Patched;
- zlib: Patched and Ignored `not-applicable-config`.
Summaries are shortened; there is no personal data.
## Tests
- Unit tests:
- parsing and statuses;
- recognising the file by its first bytes;
- refusing an SPDX document;
- verdict order: the cve-check verdict before the SPDX fixed list and the recipe, Ignored mapped, Unpatched without a statement;
- missing Unpatched CVEs added only for known components.
- CI only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
With INHERIT += "cve-check" a build writes <image>.json next to the
image: per recipe the CVEs NVD records for it, each Patched, Ignored
(with the CVE_STATUS reason) or Unpatched. It is uploaded as a build
output like the image SPDX; the scan tells the two apart by content.
- pipeline::yocto_cve_check reads the report (size-capped).
- Built takes the reports: Yocto's verdict on an alert's CVE comes
first (Patched is fixed, Ignored as the reason maps, the same table as
the recipes' CVE_STATUS; the note is kept), then the SPDX's fixed
list, then the recipe in the tree.
- CVEs cve-check found unpatched that the NVD match missed are added as
alerts on the scan's recipe components, with NVD's description and
score from the report.
The fixture is a trimmed copy of a real scarthgap 5.0.21 report for
core-image-minimal (glibc, busybox and zlib with every status).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang
merged commit c2fbffd2c6 into main2026-11-04 23:00:08 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#150, PR 3 of the plan. It builds on #853 (build outputs). Tracker #167.
Why
With
INHERIT += "cve-check", a Yocto build writes<image>.jsonnext to the image. For every recipe in the image it lists the CVEs NVD records, each Patched, Ignored (with theCVE_STATUSreason) or Unpatched. That is Yocto's own verdict on everything it checked, wider than the SPDX's "CVEs fixed".What
pipeline::yocto_cve_checkreads the report into recipe, version and issues: status,detail(reason),description(note), NVD summary and CVSS v3. Size is capped at 256 MB.build_output, like the image SPDX.read_build_outputstells the two apart by content: a JSON object withpackage/version, or a zstd archive. An unreadable file gets abuild_spdxnote that names both expected forms.yocto_build::Builttakes the reports. On an alert's CVE:fixed.CVE_STATUS:not-applicable-*→not_affected,disputed/upstream-wontfix→under_investigation,cpe-incorrect→not_affected(component not present).record_nvd, with NVD's description and score from the report. This only happens for recipe components of the scan.yocto_inventory::status_statementis nowpub(crate).Fixture
fixtures/yocto/core-image-minimal-qemuarm64.rootfs.cve.jsonis a trimmed copy of the real report from the ferrite build (scarthgap 5.0.21, cve-check run on 04.11.). It covers:cpe-stable-backport, Ignoreddisputed, and 3 Unpatched;not-applicable-config.Summaries are shortened; there is no personal data.
Tests
🤖 Generated with Claude Code