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
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
- 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
This commit is contained in:
1 parent
ac50880b25
commit
ecf0e34e8c
10 files changed
+366
-70
No files matched your search
+14
-4
@@ -61,12 +61,14 @@ rules only, none of its style rules:
|
||||
| `oelint.vars.srcurichecksum` (download without `SRC_URI[sha256sum]`) | medium | (2)(f) integrity | CRA-AI-6 |
|
||||
| `oelint.vars.autorev` (`SRCREV = "${AUTOREV}"`) | medium | (2)(f) | CRA-AI-6 |
|
||||
| `oelint.vars.srcurigittag` (git `tag=` instead of a commit; up to Walnascar) | low | (2)(f) | CRA-AI-6 |
|
||||
| `oelint.task.network` (a task with `[network] = "1"`) | medium | (2)(j) attack surface | CRA-AI-6 |
|
||||
| `oelint.task.network` (a task with `[network] = "1"`) | medium | (2)(j) attack surface | CRA-AI-2 |
|
||||
| `oelint.vars.insaneskip` (QA checks skipped) | low | informational | none |
|
||||
|
||||
A `.oelint.cfg` in the repository is ignored, so it cannot switch rules off;
|
||||
`# nooelint:` comments in a recipe do suppress a finding there, as oelint-adv
|
||||
intends. If oelint-adv does not complete, the run lists **Rezept-Prüfung (Yocto)**
|
||||
intends. Suppressed findings are not shown, so the run counts them and lists
|
||||
"N Befunde sind per Kommentar in den Rezepten (# nooelint) unterdrückt" under
|
||||
**Rezept-Prüfung: unterdrückte Befunde**. If oelint-adv does not complete, the run lists **Rezept-Prüfung (Yocto)**
|
||||
under **Nicht ausgeführt**, and the controls it checks count as not assessed.
|
||||
|
||||
**Our own rules** (`yocto-config`):
|
||||
@@ -74,7 +76,7 @@ under **Nicht ausgeführt**, and the controls it checks count as not assessed.
|
||||
| Rule | Finds | Severity | CRA Annex I | Control |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `yocto-extrausers-password` | `useradd`/`usermod` with `-p`/`-P`/`--password` in `EXTRA_USERS_PARAMS` (a hash, clear text or an empty password; `'*'` and `'!'` lock the account and are fine, a `${VARIABLE}` is not judged). The value is hidden in the finding. | high | (2)(b) | CRA-AI-8 |
|
||||
| `yocto-src-uri-http` | `http://` or `protocol=http` in `SRC_URI` | medium | (2)(j) | CRA-AI-6 |
|
||||
| `yocto-src-uri-http` | `http://` or `protocol=http` in `SRC_URI` | medium | (2)(j) | CRA-AI-2 |
|
||||
| `yocto-sshd-root-login` | `PermitRootLogin yes` in an `sshd_config*` shipped under `recipes-*` | high | (2)(b) | CRA-AI-1 |
|
||||
| `yocto-sshd-password-auth` | `PasswordAuthentication yes` there | medium | (2)(b) | CRA-AI-1 |
|
||||
| `yocto-distro-no-security-flags` | a `conf/distro/*.conf` that does not require `security_flags.inc`, itself or through the includes in the repository | medium | (2)(b) | CRA-AI-1 |
|
||||
@@ -89,7 +91,15 @@ such a distro is not reported; an include in the repository is followed.
|
||||
**Upstream layers** (OpenEmbedded-Core and Poky, meta-openembedded, and widely
|
||||
used security, virtualisation and BSP layers, recognised by their
|
||||
`BBFILE_COLLECTIONS`) are not linted: their findings are upstream's. The run names
|
||||
them under **Nicht ausgeführt** as "Upstream-Layer".
|
||||
them under **Nicht ausgeführt** as "Upstream-Layer". A layer is recognised by its
|
||||
collection name, not its contents: a fork of an upstream layer that keeps the
|
||||
upstream collection name (`core`, `openembedded-layer`, `freescale-layer`, …) is
|
||||
skipped too. Give your fork its own collection name to have it linted.
|
||||
|
||||
CRA-AI-2 (minimal attack surface) is otherwise outside static scans. On a Yocto
|
||||
layer tree, recipe lint checks it (network access in build tasks, plain-http
|
||||
fetches), so the CRA status assesses it there; for every other target it stays
|
||||
"not code-checkable".
|
||||
|
||||
## Recipe inventory
|
||||
|
||||
|
||||
Reference in new issue
Block a user