feat(yocto): build output in the wizard and the guide (#150) (#855)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m4s
CI / Deploy Dashboard (push) Successful in 6m16s
CI / Deploy Agent (push) Successful in 8m27s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m4s
CI / Deploy Dashboard (push) Successful in 6m16s
CI / Deploy Agent (push) Successful in 8m27s
This commit was merged in pull request #855.
This commit is contained in:
1 parent
c2fbffd2c6
commit
7f5ddf69fc
5 files changed
+75
-13
No files matched your search
+51
-1
@@ -299,10 +299,60 @@ recipe from a layer that is not in the tree is marked. The CRA state of the
|
||||
SBOM requirement stays **Teilweise geprüft** until an image SBOM from a build
|
||||
can be imported (tier 2).
|
||||
|
||||
## Im Image (gebaut): the build's own output
|
||||
|
||||
A build knows what it installed. Upload what it wrote about the image, and
|
||||
Prüfwerk takes that over the declared marking. Add each file to the target as
|
||||
**Build-Ergebnisse (Yocto: Image-SPDX .spdx.tar.zst, cve-check .json)**, in the
|
||||
wizard or under **Datei hinzufügen** on the target:
|
||||
|
||||
- **The image SPDX archive**: `tmp/deploy/images/<machine>/<image>.spdx.tar.zst`.
|
||||
Yocto's `create-spdx` class (the default) writes it with every build. Since
|
||||
Scarthgap (5.0) it is SPDX 2.2; Prüfwerk reads it as it is.
|
||||
- **The cve-check report** (optional): `tmp/deploy/images/<machine>/<image>.json`,
|
||||
written when the build inherits `cve-check` (`INHERIT += "cve-check"` in
|
||||
`local.conf`).
|
||||
|
||||
**What the SPDX gives.** One component per recipe that has packages in the image
|
||||
(BusyBox's `busybox`, `busybox-syslog` and `busybox-udhcpc` are one component),
|
||||
with the version the build used, the declared licence and the CPE. These carry
|
||||
the badge **Im Image** with the tooltip *installed by the build*. They are joined
|
||||
with the recipe inventory by recipe name: the version the build used wins over the
|
||||
`PV` in the tree (`busybox_1.35.0.bb` in the layer, 1.36.1 built), and both
|
||||
evidence lines stay. For an image the SPDX covers, a recipe the image recipes
|
||||
declare but the build did not install loses its declared marking. Recipes that
|
||||
only the build lists (from Poky or another layer not in the tree) are added. The
|
||||
CVEs the recipes' patches fixed (*CVEs fixed* in the SPDX) are stated as
|
||||
**fixed** (VEX).
|
||||
|
||||
**What cve-check adds.** Yocto's verdict on every CVE it checked comes first:
|
||||
|
||||
| cve-check | VEX statement |
|
||||
|---|---|
|
||||
| Patched (also `fixed-version`, `cpe-stable-backport`, `backported-patch`) | fixed |
|
||||
| Ignored `not-applicable-config`, `not-applicable-platform` | not affected (vulnerable code not present) |
|
||||
| Ignored `cpe-incorrect` | not affected (component not present) |
|
||||
| Ignored `disputed`, `upstream-wontfix`, `ignored` | under investigation, with the recipe's note |
|
||||
| Unpatched | none: the CVE stays open |
|
||||
|
||||
A CVE cve-check found unpatched that Prüfwerk's own NVD match did not is added
|
||||
with the description and score from the report.
|
||||
|
||||
**Volume.** A real image includes the kernel (`linux-yocto`), and NVD records
|
||||
thousands of CVEs for it. The build's SPDX and cve-check mark almost all of them
|
||||
as patched, so they arrive as **fixed**; the ones Yocto reports unpatched stay
|
||||
open.
|
||||
|
||||
**On the run.** A file that is neither an image SPDX archive nor a cve-check
|
||||
report is listed under **Build-SPDX (Yocto-Image)** and skipped. So is a package
|
||||
the image lists without its document in the archive. A new upload starts a new
|
||||
scan. A target needs the layer tree (git or archive) next to the build output
|
||||
for now.
|
||||
|
||||
## What is planned
|
||||
|
||||
| Tier | Input | Analysis |
|
||||
| --- | --- | --- |
|
||||
| **1: layer tree** (in progress) | the layers in git, no build | **Recipe inventory**: every recipe's name, version, `SRC_URI`, `CVE_PRODUCT` and `CVE_STATUS`, matched against NVD; labelled as a recipe inventory, not the image's SBOM; the recipes an image recipe installs marked as declared. **Recipe lint**: done, see above |
|
||||
| **2: build artefacts** | `tmp/deploy/spdx` (SPDX 3.0, or 2.2 up to Scarthgap), `*.vex.json`, the image `.manifest`, the kernel `.config` | **SPDX import** into the SBOM view and CycloneDX export; **sbom-cve-check** with the Yocto VEX annotations; kernel CVEs filtered by the configuration; a nightly re-check without a rebuild |
|
||||
| **2: build artefacts** (in progress) | the image `.spdx.tar.zst` (SPDX 2.2), the cve-check `.json`; later SPDX 3.0, `*.vex.json`, the kernel `.config` | **Done:** the image SPDX joins the SBOM (installed by the build), the cve-check verdicts become VEX, see *Im Image (gebaut)*. **Planned:** SPDX 3.0 (Styhead and later), kernel CVEs filtered by the configuration, a target with build output only |
|
||||
| **3: image / rootfs** | `.wic`, tar, ext4, squashfs | unpacking, ELF hardening of every binary, secrets and default credentials in the root filesystem; DAST and pentest only for a qemu build in an isolated sandbox |
|
||||
Reference in new issue
Block a user