feat(yocto): recipes an image recipe installs are marked as in the image (declared)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 10m32s

The recipe helper now also reads the image recipes (inherit core-image/image,
or *-image*.bb / an image bbappend that declares installs), local.conf.sample
and distro configurations: IMAGE_INSTALL and CORE_IMAGE_EXTRA_INSTALL with
=, ?=, +=, :append, the old _append and :remove, and IMAGE_FEATURES /
EXTRA_IMAGE_FEATURES. Package groups in the tree are read with their
RDEPENDS/RRECOMMENDS per package, and each recipe with the packages its
PACKAGES names. Still oelint-parser, nothing executed; the recipe inventory
itself is unchanged (checked against Poky's meta: 834 identical recipes).

The agent maps the declared names to recipes (recipe name, PACKAGES,
default -dev/-dbg/... packages), expands package groups one level and maps
IMAGE_FEATURES to OE-Core's FEATURE_PACKAGES groups only where they are in
the tree. Components get SbomEntry.in_image {basis: declared, images}, an
evidence line, a CycloneDX property pruefwerk:component:in_image and the
SPDX package comment. Names not in the tree are listed on the run
(image_install, SkipCode::NotInTree); no component is invented.

The SBOM list sorts in-image components first and filters by in_image; the
dashboard shows an "Im Image (deklariert)" badge and filter whose tooltip
says it is read from the recipes, not resolved by bitbake.

The nightly fixture's image installs a package group (packagegroup-pump ->
pump-web-ui of pump-web); pump-fw stays in no image. Baseline updated; the
nine recipe-lint findings are unchanged. Drops the .pyc committed by #551.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
Sharang ParnerkarandClaude Opus 5.5 committed 2026-10-09 19:45:52 +02:00
1 parent 42b25719ec
commit e2e95e636b
24 files changed
+1416 -77

No files matched your search

+59 -5
View File
@@ -38,6 +38,7 @@ searched.
| Firmware SBOM (Firmwerk) | not run: listed under **Nicht ausgeführt** as "Yocto build analysis is planned (tier 2)" |
| Recipe lint (oelint-adv and our own rules) | runs over your layers, see below |
| Recipe inventory | runs: SBOM components and NVD CVEs from the recipes, `CVE_STATUS` and `CVE:` patches as VEX; see [Recipe inventory](#recipe-inventory) |
| In the image (declared) | runs: the recipes your image recipes install are marked; see [Im Image (deklariert)](#im-image-deklariert) |
| Image SBOM / CVE | needs build artefacts (SPDX / manifest), planned (tier 2) |
| DAST | opt-in, with an http(s) address of the running device |
| Penetration test | not offered until an image can be booted in an emulation sandbox |
@@ -122,10 +123,10 @@ Image recipes, package groups and tools built only for the build host
checked on a target's components (SBOM, known vulnerabilities) are
**Teilweise bewertet** (*partly assessed*, "recipe inventory only, not the
image SBOM") until an image SBOM can be imported (tier 2). Layer overrides between layers,
`PACKAGECONFIG`, the distro and machine configuration and what an image
actually installs are not resolved, so the inventory lists every recipe in the
tree: more than an image contains, and nothing from layers that are not in the
tree. The components say so wherever they appear: the **Yocto-Rezept** badge in
`PACKAGECONFIG` and the distro and machine configuration are not resolved, so
the inventory lists every recipe in the tree: more than an image contains, and
nothing from layers that are not in the tree. The recipes an image recipe names
are marked, see [Im Image (deklariert)](#im-image-deklariert). The components say so wherever they appear: the **Yocto-Rezept** badge in
the SBOM view, the component property `pruefwerk:component:source` in the
CycloneDX export and the package `comment` in the SPDX export (both read
"Yocto recipe inventory (not the image SBOM)"), and the component's evidence
@@ -162,10 +163,63 @@ analysis `detail`. `CVE_STATUS_GROUPS` count like single `CVE_STATUS` flags. The
again on every scan and withdraws one the recipe no longer makes; a statement
a person made is never replaced.
## Im Image (deklariert)
The inventory keeps every recipe, but marks those your image recipes say they
install: **Im Image (deklariert)** (*In the image (declared)*). It is read from
the recipes as they are written, with the same parser and without a build; it
is what the image recipes declare, not what BitBake would resolve.
**What is read.** Image recipes are the `.bb` files that inherit `core-image`,
`image` (or another image class) or set `IMAGE_INSTALL` / `IMAGE_FEATURES`,
files named `*-image*.bb` that declare what to install, and a `*-image*.bbappend`
of an image that is not in the tree (`core-image-minimal.bbappend`). From them,
and from every `conf/local.conf.sample` and `conf/distro/*.conf`:
- `IMAGE_INSTALL` and `CORE_IMAGE_EXTRA_INSTALL` with every operation: `=`,
`?=`, `+=`, `:append` and the older `_append`, `:remove`;
- `IMAGE_FEATURES` and `EXTRA_IMAGE_FEATURES`.
A local.conf.sample or distro configuration counts for every image recipe in
the tree (with none, the component names the configuration file instead).
**How a name becomes a recipe.**
| The image names | Marked |
|---|---|
| a recipe (`busybox`) | that recipe |
| a package a recipe's `PACKAGES` names (`pump-web-ui`) | that recipe |
| a default package (`busybox-dev`, `-dbg`, `-doc`, `-locale`, `-src`, `-staticdev`, `-ptest`) | its recipe |
| a package group in the tree (`packagegroup-pump`) | what that package's `RDEPENDS` and `RRECOMMENDS` name, one level: a package group inside it is not expanded |
| an image feature (`ssh-server-dropbear`) | its package group from OpenEmbedded-Core's `FEATURE_PACKAGES_*` (`packagegroup-core-ssh-dropbear`), if that package group is in the tree |
**Where it shows.** A badge **Im Image (deklariert)** next to the component in
the SBOM view, whose tooltip names the images and says it is read from the
recipes, not resolved by bitbake; a filter of the same name; and the SBOM list
puts these components first. The component's evidence line names the images,
the CycloneDX export carries the property `pruefwerk:component:in_image`
(`declared: pump-image`), and the SPDX export adds it to the package `comment`.
What an image names that is neither a recipe nor a package group in the tree
(`packagegroup-core-boot` from Poky, a feature whose package group is not in
the tree, a feature such as `splash` whose packages a variable chooses) is
listed on the run under **Im Image (deklariert)**; no component is invented for
it.
**What is not resolved.** Overrides (`IMAGE_INSTALL:append:qemux86` counts as
if it applied to every machine), `PACKAGECONFIG`, installs that depend on
`DISTRO_FEATURES` or other inline Python (a package only one branch of
`${@bb.utils.contains(...)}` names is left out; the Python is never run), variables the tree does not set (`${CORE_IMAGE_BASE_INSTALL}`), package
groups more than one level deep, `RPROVIDES` and virtual packages, a
`FEATURE_PACKAGES_*` of your own, `BAD_RECOMMENDATIONS`, and which distro a
build selects (every distro configuration counts). Nothing is built, and no
recipe from a layer that is not in the tree is marked. The CRA state of the
SBOM requirement stays **Teilweise bewertet** until an image SBOM from a build
can be imported (tier 2).
## 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. **Recipe lint**: done, see above |
| **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 |
| **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 |