feat(csaf): index vendor CSAF advisories daily (#515, part B) (#520)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy Agent (push) Successful in 5m38s

This commit was merged in pull request #520.
This commit is contained in:
sharang committed 2026-10-06 16:33:00 +00:00
1 parent dc9ca8dcd8
commit ff570bac66
5 files changed
+888

No files matched your search

+30
View File
@@ -210,6 +210,35 @@ The answers are attached to the alert (`exploitation`) and to the SBOM's referen
**Registry metadata (#508):** the nuget.org, npm and Maven lookups also fetch each package's project URL (the SBOM's component creator), so they now ask for packages that already have a license too, once per package version and within the same per-scan bounds; the cache fills the rest over later scans. Only URLs are kept, never maintainer names or emails. GitHub, Go-module and Swift purls give their repository page without any request.
## Vendor CSAF advisories (#515)
Industrial vendors publish their security advisories in CSAF 2.0. Prüfwerk
keeps an index of them, shared by all tenants (admin database,
`csaf_advisories`), refreshed daily and once after the agent starts:
| Provider | Advisories | Default |
|---|---|---|
| CERT@VDE's vendor providers (`<vendor>.csaf-tp.certvde.com`): CODESYS, WAGO, Phoenix Contact, Pilz, Festo, Helmholz, Weidmüller, Murrelektronik, Janitza, Beckhoff, Lenze, TURCK, Hilscher | each vendor's | on |
| Siemens ProductCERT | about 840 | on |
| CISA ICS (OT) | about 3,950; the last two years are read | off |
Only the TLP:WHITE feeds are read. An advisory is fetched when it is new or
newer than the stored one; its SHA-512 must match the hash file the provider
publishes beside it (an advisory without one is stored and counted as
unverified); the PGP signatures are not checked. A run fetches at most 400
advisories within 15 minutes, newest first, so the first fill spans a few
runs. Scans never fetch; they match the target's components against the index
(#515, part C).
`PW_CSAF_PROVIDERS` chooses the providers: unset or `default` (CERT@VDE's
vendors and Siemens), `off`, or a comma list of `default`, `siemens`, `cisa`
and vendor names (`codesys,wago`). `CSAF_FEED_SCHEDULE` sets when the daily
run starts (cron with seconds, default `0 30 3 * * *`).
**Terms:** Siemens allows using and redistributing its advisories with a link
to the original, which every alert carries; CISA's are US government works;
CERT@VDE's vendors publish theirs with a liability disclaimer.
## nuget.org -- NuGet Licenses
Licenses of NuGet packages that no `.nuspec` in the tree gives, and the project URL (`projectUrl`) of every package, are read from the [nuget.org registration API](https://learn.microsoft.com/nuget/api/registration-base-url-resource) (`api.nuget.org`). Only the package id and version are sent, never for an id a `nuget.config` routes to another feed (see [.NET projects](/guide/dotnet-en)). The lookup is bounded per scan (8 requests at once, 10 s per request, 60 s and 300 uncached packages in total); answers are cached for all tenants. Set `NUGET_LICENSE_LOOKUP=false` to keep the agent from contacting nuget.org.
@@ -352,6 +381,7 @@ Every connection the agent opens, in one place. **Guarded** means: the HTTP clie
| `api.nuget.org` (registration, catalog) | NuGet package ids and versions, not for ids a `nuget.config` routes to another feed | `pipeline/sbom/nuget_license.rs` | guarded | 10 s per request, 5 s connect, body ≤ 2 MiB, 8 at once, 60 s and 300 uncached packages per scan | `NUGET_LICENSE_LOOKUP=false` |
| `registry.npmjs.org` | npm package names and versions, not for a registry or scope `.npmrc`/`.yarnrc.yml` routes elsewhere | `pipeline/sbom/registry_license.rs` | guarded | as nuget.org (bounds per scan; answers cached for all tenants) | `REGISTRY_LICENSE_LOOKUP=false` |
| `repo1.maven.org`, `dl.google.com` (POMs) | Maven group, artifact and version (and parent POMs), not when the build names a non-public repository | `pipeline/sbom/registry_license.rs` | guarded | as nuget.org | `REGISTRY_LICENSE_LOOKUP=false` |
| `<vendor>.csaf-tp.certvde.com` (CERT@VDE's vendor providers), `cert-portal.siemens.com` (Siemens ProductCERT); with `cisa`: `www.cisa.gov`, `raw.githubusercontent.com` | nothing (GETs of public advisories) | `pipeline/csaf_feed.rs` | guarded | 60 s per request, body ≤ 16 MiB, 4 at once, 400 advisories and 15 min per run; daily and once after start | `PW_CSAF_PROVIDERS=off` |
| Package registries (Go proxy, npm, PyPI, Maven Central) | package names and versions | Syft (`pipeline/sbom/syft.rs`, remote license lookups) and lockfile generation (`npm`, `cargo`, `pip-compile` in `pipeline/sbom/mod.rs`) | not guarded: subprocesses with their own HTTP | Syft 10 min per scan | lockfile generation follows the execution policy |
### Tenant-chosen addresses