fix(yocto): recipe lint binds attack-surface findings to cra-ai-2 and counts suppressed findings #554

Merged
sharang merged 1 commits from fix/yocto-recipe-lint-followups into main 2026-10-09 16:49:28 +00:00
Owner

Follow-ups to #552, as decided.

  1. cra-ai-2 (attack surface).
    • oelint.task.network and yocto-src-uri-http now bind to cra-ai-2 instead of cra-ai-6. They keep their Annex I (2)(j) text.
    • cra-ai-2 stays not_code_checkable. control_statuses assesses a not-code-checkable control like a covered one only where one of its bindings applies to the scanned languages, so today it is assessed on Yocto trees (bitbake) and stays "not code-checkable" everywhere else.
    • architectural_controls_are_not_code_checkable now allows exactly these two recipe_lint bindings for cra-ai-2, and none for cra-ai-3/4/5.
    • New test attack_surface_is_assessed_on_a_yocto_tree_only covers four cases: a Yocto tree, other trees, a failed oelint-adv run, and a finding against cra-ai-2.
  2. insaneskip and certificate findings stay unmapped; nothing changes.
  3. # nooelint suppressions stay honoured and are now counted.
    • oelint-adv drops suppressed findings without a trace, so the count is derived: the suppressions of our 13 rule ids (or oelint.var.badimagefeature) in the linted recipes and includes, minus those oelint-adv reports as not needed. For that, oelint.file.inlinesuppress_na is added to the rule file.
    • A count above zero is logged at INFO and recorded on the run as stage recipe_lint_suppressed, with the new SkipCode::SuppressedInSource. It reads "N findings are suppressed by comments in the recipes (# nooelint) and are not shown" (DE/EN).
    • It is not mapped in tool_of_stage, so it never makes a control "not assessed".
    • Note: the dashboard shows it among the skipped stages ("Nicht ausgeführt"), the only per-run note mechanism there is.
  4. Docs. docs/guide/yocto.md now says that upstream layers are recognised by collection name, so a fork that keeps the upstream name is skipped. It also covers the suppression count and cra-ai-2. docs/features/control-mapping.md is updated to match.

The fixture and Dockerfile are untouched, to stay clear of #551.

Tests:

  • recipe_lint: 20 tests. They include suppressed_findings_are_counted (real oelint-adv 9.11.2; it skips when the tool is absent) and suppressions_of_our_rules_are_counted_as_oelint_adv_reads_them.
  • evidence::compliance: 10.
  • control-map: 15.
  • Dashboard: skipped_reason tests.
  • Clippy with the CI flags passes for every crate, and fmt is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Follow-ups to #552, as decided. 1. **cra-ai-2 (attack surface).** - `oelint.task.network` and `yocto-src-uri-http` now bind to cra-ai-2 instead of cra-ai-6. They keep their Annex I (2)(j) text. - cra-ai-2 stays `not_code_checkable`. `control_statuses` assesses a not-code-checkable control like a covered one only where one of its bindings applies to the scanned languages, so today it is assessed on Yocto trees (`bitbake`) and stays "not code-checkable" everywhere else. - `architectural_controls_are_not_code_checkable` now allows exactly these two recipe_lint bindings for cra-ai-2, and none for cra-ai-3/4/5. - New test `attack_surface_is_assessed_on_a_yocto_tree_only` covers four cases: a Yocto tree, other trees, a failed oelint-adv run, and a finding against cra-ai-2. 2. insaneskip and certificate findings stay unmapped; nothing changes. 3. **`# nooelint` suppressions stay honoured and are now counted.** - oelint-adv drops suppressed findings without a trace, so the count is derived: the suppressions of our 13 rule ids (or `oelint.var.badimagefeature`) in the linted recipes and includes, minus those oelint-adv reports as not needed. For that, `oelint.file.inlinesuppress_na` is added to the rule file. - A count above zero is logged at INFO and recorded on the run as stage `recipe_lint_suppressed`, with the new `SkipCode::SuppressedInSource`. It reads "N findings are suppressed by comments in the recipes (# nooelint) and are not shown" (DE/EN). - It is not mapped in `tool_of_stage`, so it never makes a control "not assessed". - Note: the dashboard shows it among the skipped stages ("Nicht ausgeführt"), the only per-run note mechanism there is. 4. **Docs.** `docs/guide/yocto.md` now says that upstream layers are recognised by collection name, so a fork that keeps the upstream name is skipped. It also covers the suppression count and cra-ai-2. `docs/features/control-mapping.md` is updated to match. The fixture and Dockerfile are untouched, to stay clear of #551. Tests: - recipe_lint: 20 tests. They include `suppressed_findings_are_counted` (real oelint-adv 9.11.2; it skips when the tool is absent) and `suppressions_of_our_rules_are_counted_as_oelint_adv_reads_them`. - evidence::compliance: 10. - control-map: 15. - Dashboard: `skipped_reason` tests. - Clippy with the CI flags passes for every crate, and fmt is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed fix/yocto-recipe-lint-followups from 98da083fc8 to 8800920a5e 2026-10-09 16:25:11 +00:00 Compare
sharang added 1 commit 2026-10-09 16:39:38 +00:00
fix(yocto): recipe lint binds attack-surface findings to cra-ai-2 and counts suppressed findings
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 8m54s
ecf0e34e8c
- oelint.task.network and yocto-src-uri-http bind to cra-ai-2 (attack
  surface) instead of cra-ai-6. cra-ai-2 stays not code-checkable; the CRA
  status assesses it only where one of its bindings applies to the scanned
  languages, which today means a Yocto layer tree (bitbake). The test that
  pinned cra-ai-2 as binding-free now allows exactly these two.
- `# nooelint` suppressions stay honoured, and are counted: the suppressions
  of our rules in the linted recipes, less those oelint-adv reports as not
  needed (oelint.file.inlinesuppress_na, now in the rule file). A count above
  zero is logged at INFO and recorded on the run as the stage
  recipe_lint_suppressed with the new SkipCode::SuppressedInSource; the
  dashboard words it in German and English.
- docs/guide/yocto.md: upstream layers are recognised by collection name, so
  a fork that keeps it is skipped; the suppression note; cra-ai-2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed fix/yocto-recipe-lint-followups from 8800920a5e to ecf0e34e8c 2026-10-09 16:39:38 +00:00 Compare
sharang merged commit 8d6be32c83 into main 2026-10-09 16:49:28 +00:00
Sign in to join this conversation.