feat(scan): per-target excluded paths, left out of the whole scan
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 / Agent integration (pull_request) Successful in 3m39s
CI / Check (pull_request) Successful in 17m39s
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 / Agent integration (pull_request) Successful in 3m39s
CI / Check (pull_request) Successful in 17m39s
A target's settings can now name directories and files to leave out of every scan stage (scan_config.exclude_paths), on top of the test data the scan detects itself (#820): no code findings, no SBOM components, no CVEs. - Paths are relative to the tree, /-separated, without wildcards; a directory is left out with everything in it. normalise_exclude_paths (compliance-core) trims, normalises and refuses absolute paths, .., .git, wildcards, over-long paths and more than 50 entries. The API applies it while reading the PATCH body, so an invalid path is refused with 422 and a message naming it; the dashboard editor uses the same function and shows the reason in German or English. - The scan prunes the configured paths first, then detects test data in what is left. prune now removes files as well as directories, and never a path that passes a symbolic link (src/link/x with src/link pointing elsewhere is left alone). - The run notes what was left out (SkipCode::ExcludedPaths, stage excluded_paths), including configured paths not found in the tree. - Findings an earlier scan stored there close as NowExcluded, with their own issue comment. - Dashboard: "Von der Prüfung ausgenommen" in the target editor, one path per line. Docs: guide/repositories and guide/scanning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e01d2146e9
commit
f01ccdf893
17 files changed
+596
-74
No files matched your search
@@ -211,11 +211,32 @@ can:
|
||||
- enter or change the password of a password-protected archive;
|
||||
- upload another file under **Datei hinzufügen**: an archive (zip, tar, tar.gz),
|
||||
a PLC project or a firmware image. It is uploaded at once and checked by the
|
||||
next scan.
|
||||
next scan;
|
||||
- leave directories or files out of every scan under **Von der Prüfung
|
||||
ausgenommen** (see below).
|
||||
|
||||
Click **Speichern** (Save) to keep the changes. Changes take effect with the next
|
||||
scan.
|
||||
|
||||
### Leaving Paths out of the Scan
|
||||
|
||||
Under **Von der Prüfung ausgenommen**, enter one directory or file per line,
|
||||
relative to the root of the repository or archive, for example `docs/samples`
|
||||
or `tools/legacy.py`. A directory is left out with everything in it. Wildcards
|
||||
are not supported, and a path must stay inside the tree (no leading `/`, no
|
||||
`..`, not `.git`); at most 50 paths.
|
||||
|
||||
What is left out produces nothing: no code findings, no SBOM components and no
|
||||
CVEs. The scan run lists it under **Ausgenommene Pfade**, together with any
|
||||
path that was not found in the tree. Findings an earlier scan reported there
|
||||
are closed with the reason that the path is now excluded, and so are their
|
||||
issues. Test data (`fixtures`, `testdata` and similar) is left out
|
||||
automatically; see [Scanning](/guide/scanning).
|
||||
|
||||
Through the API, send the list as `scan_config.exclude_paths` with
|
||||
`PATCH /api/v1/targets/{id}`. It replaces the stored list; an invalid path is
|
||||
refused with 422 and a message naming it.
|
||||
|
||||
## Connecting an Issue Tracker
|
||||
|
||||
New findings can be created as issues in GitHub, GitLab, Gitea or Jira. The
|
||||
|
||||
@@ -29,7 +29,9 @@ names while the scan runs.
|
||||
`test-fixtures` or `test_fixtures` (at any depth) hold sample projects and
|
||||
lockfiles that are not what the product ships, so they produce no code
|
||||
findings, no SBOM components and no CVEs. `tests/`, `spec/` and
|
||||
`examples/` are scanned as usual.
|
||||
`examples/` are scanned as usual. Paths the target's settings exclude are
|
||||
left out the same way (see
|
||||
[Leaving Paths out of the Scan](/guide/repositories#leaving-paths-out-of-the-scan)).
|
||||
3. **Build the SBOM** (*SBOM erstellen*) -- the components from lockfiles
|
||||
(Syft), plus libraries copied into a firmware tree (FreeRTOS, FreeRTOS+TCP,
|
||||
lwIP, Mbed TLS, wolfSSL, FatFs), whose versions are read from their headers.
|
||||
@@ -161,6 +163,7 @@ as a clean result: the CRA requirements it checks show as **Nicht geprüft**.
|
||||
| **Git-Submodule** | Nicht ausgecheckt, daher nicht geprüft: *(names)* | Change SSH submodule URLs to HTTPS; see [Git Submodules](/guide/repositories#git-submodules). |
|
||||
| **Herstellercode (HAL, CMSIS, Drittanbieter)** | Hersteller- und Fremdcode ohne Codeanalyse, in der Stückliste enthalten: *(directories)* | Nothing; for information. |
|
||||
| **Testdaten (fixtures, testdata)** | Testdaten, von der ganzen Prüfung ausgenommen (Codeanalyse, Stückliste, CVEs): *(directories)* | Nothing; for information. Findings an earlier scan reported there are closed as test data. |
|
||||
| **Ausgenommene Pfade** | In den Einstellungen des Prüfobjekts ausgenommen, von der ganzen Prüfung ausgenommen (Codeanalyse, Stückliste, CVEs): *(paths)* | Nothing; for information. Change the list under **Bearbeiten**. |
|
||||
| e.g. **Statische Codeanalyse (Semgrep)**, **C/C++-Analyse (cppcheck)** | *(tool)* wurde nicht fertig; was es prüft, gilt als nicht bewertet. | Start the scan again; if it recurs, contact support. |
|
||||
| **Abhängigkeiten (SBOM)** | *(manifest)* ohne Lockfile: Die Versionen der Abhängigkeiten und ihre CVEs sind nicht bekannt. | Commit the lockfile (see below). |
|
||||
| e.g. **Firmware-Binäranalyse**, **Container-Analyse**, **Mobile-App-Analyse** | e.g. Firmware-Images werden noch nicht entpackt … | Nothing analyses these files yet; scan the source code instead. |
|
||||
|
||||
Reference in new issue
Block a user