Tier 1 recipe lint for Yocto layer trees (no build), on top of the detection and matrix from #550.
What runs
oelint-adv 9.11.2 (BSD-2-Clause, pinned in Dockerfile.agent, own small block). It gets a rule file that holds only the security rules, so no style rules run: oelint.var.badimagefeature.{debug-tweaks,allow-empty-password,empty-root-password,serial-autologin-root,allow-root-login,tools-debug,dbg-pkgs,dev-pkgs}, oelint.vars.srcurichecksum, oelint.vars.autorev, oelint.vars.srcurigittag, oelint.task.network, oelint.vars.insaneskip. It runs through tool_cmd (env_clear, kill on drop, 10 min timeout) with OELINT_SKIP_CONFIG set, so a .oelint.cfg in the repo cannot switch rules off. The output is read as gitlab-codequality JSON. Each layer is read with the oldest release its LAYERSERIES_COMPAT names (srcurigittag only exists up to Walnascar). If oelint-adv does not complete, the run records the skipped stage recipe_lint (ToolFailed), and tool_of_stage maps it to oelint-adv.
Our own rules (yocto-config, a Rust pass in pipeline/recipe_lint/rules.rs):
a password in EXTRA_USERS_PARAMS (-p/-P/--password, value hidden in the snippet);
http:// or protocol=http in SRC_URI;
PermitRootLogin yes or PasswordAuthentication yes in a shipped sshd_config*;
certificates shipped under recipes-* (info);
a distro conf or local.conf.sample without security_flags.inc. This follows require/include, so Poky-based distros pass.
Private keys are left to gitleaks, so they are not reported twice.
Upstream layers (identified by BBFILE_COLLECTIONS: core/yocto/meta-openembedded/BSP vendors…) are not linted. The run records them under the skipped stage recipe_lint_upstream (VendorCode).
The stage is gated on the tree's languages: .bb/.bbappend/.bbclass now count as bitbake, so the CRA status can assess the bound controls.
CRA
Findings have the scan type recipe_lint, and their description names the CRA Annex I requirement: (2)(b) secure by default, (2)(j) attack surface, or (2)(f) integrity.
In the control map they bind by rule id with language bitbake:
RECIPE_LINT = None in the matrix. The dashboard gets the findings type filter entry and the tool names (DE/EN), plus the upstream stage text.
Docs: rule list in docs/guide/yocto.md; short entries in docs/reference/tools.md and docs/features/control-mapping.md.
Nightly fixture yocto-layer: the image recipe (debug-tweaks, allow-empty-password, usermod -p), an http recipe without a checksum and with a network task, an AUTOREV recipe, sshd_config with PermitRootLogin yes, and a distro without flags. Baseline updated with the exact rule ids, and recipe_lint is removed from the skipped stages.
Needs a product decision
Attack surface → cra-ai-2. The control map keeps cra-ai-2 not code-checkable, and a test pins that, so the attack-surface findings (network task, http fetch) bind to cra-ai-6 instead. Should cra-ai-2 get bindings?
oelint.vars.insaneskip and certificates are unmapped (informational).
Inline # nooelint: suppressions in a customer recipe are honoured, as with oelint-adv itself.
The upstream layer list is a fixed set of collection names. A customer fork of a BSP layer under the same collection name is skipped.
Coordination
The recipe-inventory branch also adds recipes-core/images/pump-image.bb. This PR's version is a superset of theirs (same header), plus allow-empty-password and EXTRA_USERS_PARAMS. The Dockerfile block pins oelint-parser 8.13.2 / regex / deprecated at the same versions as theirs; the duplicate goes on rebase.
Tests
recipe_lint: layers, release, upstream, vendor; the oelint report parser and rule file; every own rule with positive and negative cases.
The fixture checked against the baseline, for our rules, and for real oelint-adv when it is on PATH (skips otherwise; ran locally with 9.11.2).
Control-map bindings; the Rust tables matched against the LUT.
Matrix and plan; languages; tool_of_stage; dashboard tool names.
Tier 1 recipe lint for Yocto layer trees (no build), on top of the detection and matrix from #550.
## What runs
- **oelint-adv 9.11.2** (BSD-2-Clause, pinned in `Dockerfile.agent`, own small block). It gets a rule file that holds only the security rules, so no style rules run: `oelint.var.badimagefeature.{debug-tweaks,allow-empty-password,empty-root-password,serial-autologin-root,allow-root-login,tools-debug,dbg-pkgs,dev-pkgs}`, `oelint.vars.srcurichecksum`, `oelint.vars.autorev`, `oelint.vars.srcurigittag`, `oelint.task.network`, `oelint.vars.insaneskip`. It runs through `tool_cmd` (`env_clear`, kill on drop, 10 min timeout) with `OELINT_SKIP_CONFIG` set, so a `.oelint.cfg` in the repo cannot switch rules off. The output is read as `gitlab-codequality` JSON. Each layer is read with the oldest release its `LAYERSERIES_COMPAT` names (`srcurigittag` only exists up to Walnascar). If oelint-adv does not complete, the run records the skipped stage `recipe_lint` (ToolFailed), and `tool_of_stage` maps it to `oelint-adv`.
- **Our own rules** (`yocto-config`, a Rust pass in `pipeline/recipe_lint/rules.rs`):
- a password in `EXTRA_USERS_PARAMS` (`-p`/`-P`/`--password`, value hidden in the snippet);
- `http://` or `protocol=http` in `SRC_URI`;
- `PermitRootLogin yes` or `PasswordAuthentication yes` in a shipped `sshd_config*`;
- certificates shipped under `recipes-*` (info);
- a distro conf or `local.conf.sample` without `security_flags.inc`. This follows `require`/`include`, so Poky-based distros pass.
- Private keys are left to gitleaks, so they are not reported twice.
- **Upstream layers** (identified by `BBFILE_COLLECTIONS`: core/yocto/meta-openembedded/BSP vendors…) are not linted. The run records them under the skipped stage `recipe_lint_upstream` (VendorCode).
- The stage is gated on the tree's languages: `.bb/.bbappend/.bbclass` now count as `bitbake`, so the CRA status can assess the bound controls.
## CRA
- Findings have the scan type `recipe_lint`, and their description names the CRA Annex I requirement: (2)(b) secure by default, (2)(j) attack surface, or (2)(f) integrity.
- In the control map they bind by rule id with language `bitbake`:
- **cra-ai-1**: image features, sshd, security flags;
- **cra-ai-8**: empty-password features, `EXTRA_USERS_PARAMS`;
- **cra-ai-6**: checksum, AUTOREV, tag, network task, http fetch.
## Elsewhere
- `RECIPE_LINT = None` in the matrix. The dashboard gets the findings type filter entry and the tool names (DE/EN), plus the upstream stage text.
- Docs: rule list in `docs/guide/yocto.md`; short entries in `docs/reference/tools.md` and `docs/features/control-mapping.md`.
- Nightly fixture `yocto-layer`: the image recipe (debug-tweaks, allow-empty-password, `usermod -p`), an http recipe without a checksum and with a network task, an AUTOREV recipe, `sshd_config` with PermitRootLogin yes, and a distro without flags. Baseline updated with the exact rule ids, and `recipe_lint` is removed from the skipped stages.
## Needs a product decision
1. **Attack surface → cra-ai-2.** The control map keeps cra-ai-2 not code-checkable, and a test pins that, so the attack-surface findings (network task, http fetch) bind to cra-ai-6 instead. Should cra-ai-2 get bindings?
2. **`oelint.vars.insaneskip` and certificates are unmapped** (informational).
3. **Inline `# nooelint:` suppressions** in a customer recipe are honoured, as with oelint-adv itself.
4. **The upstream layer list is a fixed set of collection names.** A customer fork of a BSP layer under the same collection name is skipped.
## Coordination
The recipe-inventory branch also adds `recipes-core/images/pump-image.bb`. This PR's version is a superset of theirs (same header), plus `allow-empty-password` and `EXTRA_USERS_PARAMS`. The Dockerfile block pins oelint-parser 8.13.2 / regex / deprecated at the same versions as theirs; the duplicate goes on rebase.
## Tests
- recipe_lint: layers, release, upstream, vendor; the oelint report parser and rule file; every own rule with positive and negative cases.
- The fixture checked against the baseline, for our rules, and for real oelint-adv when it is on PATH (skips otherwise; ran locally with 9.11.2).
- Control-map bindings; the Rust tables matched against the LUT.
- Matrix and plan; languages; tool_of_stage; dashboard tool names.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Recipe lint over a Yocto layer tree, without a build:
- oelint-adv 9.11.2 (BSD-2-Clause, pinned in the agent image) runs with a
rule file holding only its security rules (bad image features, missing
checksums, AUTOREV, git tags, network tasks, INSANE_SKIP), with an empty
environment, OELINT_SKIP_CONFIG and a 10-minute timeout. Each layer is read
with the oldest release its LAYERSERIES_COMPAT names. A run that does not
complete is recorded as the skipped stage recipe_lint.
- Our own rules (yocto-config): passwords in EXTRA_USERS_PARAMS (value
hidden), http:// in SRC_URI, PermitRootLogin/PasswordAuthentication yes in a
shipped sshd_config, certificates shipped with a recipe (info), and a distro
or local.conf.sample without security_flags.inc (following require/include).
- Upstream layers (Poky, OpenEmbedded, BSP vendors, by BBFILE_COLLECTIONS) are
not linted and are named as a skipped stage.
- Findings carry the type recipe_lint, the CRA Annex I requirement, and bind
by rule id to cra-ai-1, cra-ai-8 and cra-ai-6 in the control map; .bb files
count as the language bitbake, so those controls can be assessed.
- The scan matrix turns recipe_lint on; the dashboard lists the type in the
findings filter and names both tools; docs list the rules; the nightly
fixture gains an insecure image, recipes, distro and sshd_config.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
kas layouts keep only the customer's layer in the repository; a distro that
requires a BSP or Poky include fetched at build time may well get the
security flags from it. Such an include cannot be followed, so nothing is
claimed; an include in the repository is still followed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
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.
Tier 1 recipe lint for Yocto layer trees (no build), on top of the detection and matrix from #550.
What runs
Dockerfile.agent, own small block). It gets a rule file that holds only the security rules, so no style rules run:oelint.var.badimagefeature.{debug-tweaks,allow-empty-password,empty-root-password,serial-autologin-root,allow-root-login,tools-debug,dbg-pkgs,dev-pkgs},oelint.vars.srcurichecksum,oelint.vars.autorev,oelint.vars.srcurigittag,oelint.task.network,oelint.vars.insaneskip. It runs throughtool_cmd(env_clear, kill on drop, 10 min timeout) withOELINT_SKIP_CONFIGset, so a.oelint.cfgin the repo cannot switch rules off. The output is read asgitlab-codequalityJSON. Each layer is read with the oldest release itsLAYERSERIES_COMPATnames (srcurigittagonly exists up to Walnascar). If oelint-adv does not complete, the run records the skipped stagerecipe_lint(ToolFailed), andtool_of_stagemaps it tooelint-adv.yocto-config, a Rust pass inpipeline/recipe_lint/rules.rs):EXTRA_USERS_PARAMS(-p/-P/--password, value hidden in the snippet);http://orprotocol=httpinSRC_URI;PermitRootLogin yesorPasswordAuthentication yesin a shippedsshd_config*;recipes-*(info);local.conf.samplewithoutsecurity_flags.inc. This followsrequire/include, so Poky-based distros pass.BBFILE_COLLECTIONS: core/yocto/meta-openembedded/BSP vendors…) are not linted. The run records them under the skipped stagerecipe_lint_upstream(VendorCode)..bb/.bbappend/.bbclassnow count asbitbake, so the CRA status can assess the bound controls.CRA
recipe_lint, and their description names the CRA Annex I requirement: (2)(b) secure by default, (2)(j) attack surface, or (2)(f) integrity.bitbake:EXTRA_USERS_PARAMS;Elsewhere
RECIPE_LINT = Nonein the matrix. The dashboard gets the findings type filter entry and the tool names (DE/EN), plus the upstream stage text.docs/guide/yocto.md; short entries indocs/reference/tools.mdanddocs/features/control-mapping.md.yocto-layer: the image recipe (debug-tweaks, allow-empty-password,usermod -p), an http recipe without a checksum and with a network task, an AUTOREV recipe,sshd_configwith PermitRootLogin yes, and a distro without flags. Baseline updated with the exact rule ids, andrecipe_lintis removed from the skipped stages.Needs a product decision
oelint.vars.insaneskipand certificates are unmapped (informational).# nooelint:suppressions in a customer recipe are honoured, as with oelint-adv itself.Coordination
The recipe-inventory branch also adds
recipes-core/images/pump-image.bb. This PR's version is a superset of theirs (same header), plusallow-empty-passwordandEXTRA_USERS_PARAMS. The Dockerfile block pins oelint-parser 8.13.2 / regex / deprecated at the same versions as theirs; the duplicate goes on rebase.Tests
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
12c3c38d0btoeffcbd535c