feat(csaf): a bought-in component's supplier CSAF advisories, kept per tenant (#1025) #1031

Merged
sharang merged 1 commits from feat/supplier-csaf into main 2026-11-16 22:45:45 +00:00
Owner

The second part of #1025 (epic #1029): a bought-in component's supplier and its CSAF advisories, kept per tenant. It builds on #1030, which is merged.

What changes

  • supplier on a target.
    • Fields: name, product, version and csaf_provider.
    • Set on POST /api/v1/targets and PATCH /api/v1/targets/{id}, as the SupplierInput schema.
    • csaf_provider must be an https URL (provider-metadata.json), else 422. An empty name removes the supplier.
  • Per tenant, not shared.
    • The provider's TLP:WHITE advisories are fetched with the shared feed's code (#515), through the guarded client.
    • They are stored in the tenant's own database (supplier_csaf_advisories), never in the shared index. A provider one tenant names is never matched against another tenant's components.
  • When they are fetched:
    • daily, after the shared index, one tenant after the other
    • once after start
    • right away, in the background, when a target's provider is set
    • with smaller limits than the shared index: 200 advisories, 5 minutes per run
  • Matching in the scan. The bought-in product itself becomes an SBOM entry (manager supplier-product) when the supplier names it with a version and a CSAF provider.
    • The product is matched by the supplier's name and version, only against that supplier's advisories. The same advisory under a shared provider's key does not name it (tested).
    • The component's parts are matched by purl.
    • A match raises a CSAF alert with the supplier's remediation and fixed versions, like the CERT@VDE and Siemens advisories.
  • Docs: the "supplier SBOM" section of the SBOM guide covers the supplier and its advisories.

Not here

  • The supplier's VEX statements (the next PR, as a field of their own).
  • The dashboard fields for the supplier (they need a mockup). Until then, set it through the API.

Checks

  • cargo fmt --check passes, and clippy passes with the CI flags for core, agent, dashboard (server and web) and MCP.
  • Agent: 1093 unit tests pass. New tests cover:
    • the supplier product matched only by its own supplier
    • the product entry only where it can be checked
    • the providers: per tenant, once each, archived targets skipped
    • the input check: https only, an empty name removes the supplier
  • Every integration test binary passes against Mongo 7, including a new API test (set, refused, removed). It uses a .invalid host, so the background refresh reaches no network.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

The second part of #1025 (epic #1029): a bought-in component's supplier and its CSAF advisories, kept per tenant. It builds on #1030, which is merged. ## What changes - **`supplier` on a target.** - Fields: `name`, `product`, `version` and `csaf_provider`. - Set on `POST /api/v1/targets` and `PATCH /api/v1/targets/{id}`, as the `SupplierInput` schema. - `csaf_provider` must be an https URL (`provider-metadata.json`), else 422. An empty `name` removes the supplier. - **Per tenant, not shared.** - The provider's TLP:WHITE advisories are fetched with the shared feed's code (#515), through the guarded client. - They are stored in the tenant's own database (`supplier_csaf_advisories`), never in the shared index. A provider one tenant names is never matched against another tenant's components. - **When they are fetched:** - daily, after the shared index, one tenant after the other - once after start - right away, in the background, when a target's provider is set - with smaller limits than the shared index: 200 advisories, 5 minutes per run - **Matching in the scan.** The bought-in product itself becomes an SBOM entry (manager `supplier-product`) when the supplier names it with a version and a CSAF provider. - The product is matched by the supplier's name and version, only against that supplier's advisories. The same advisory under a shared provider's key does not name it (tested). - The component's parts are matched by purl. - A match raises a CSAF alert with the supplier's remediation and fixed versions, like the CERT@VDE and Siemens advisories. - Docs: the "supplier SBOM" section of the SBOM guide covers the supplier and its advisories. ## Not here - The supplier's VEX statements (the next PR, as a field of their own). - The dashboard fields for the supplier (they need a mockup). Until then, set it through the API. ## Checks - `cargo fmt --check` passes, and clippy passes with the CI flags for core, agent, dashboard (server and web) and MCP. - Agent: 1093 unit tests pass. New tests cover: - the supplier product matched only by its own supplier - the product entry only where it can be checked - the providers: per tenant, once each, archived targets skipped - the input check: https only, an empty name removes the supplier - Every integration test binary passes against Mongo 7, including a new API test (set, refused, removed). It uses a `.invalid` host, so the background refresh reaches no network. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 22:24:37 +00:00
feat(csaf): a bought-in component's supplier CSAF advisories, kept per tenant (#1025)
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 4m20s
CI / Check (pull_request) Successful in 20m20s
e7eae3bafc
A target can now name who supplies it: the supplier, its name for the
product, the version in use and its CSAF provider (`supplier` on create
and update; `provider-metadata.json` must be an https URL, else 422; an
empty name removes it).

The provider's TLP:WHITE advisories are fetched through the guarded
client with the shared feed's code, but stored in the tenant's own
database (`supplier_csaf_advisories`), never in the shared index: a
provider one tenant names is never matched against another tenant's
components. They are refreshed daily after the shared index, once after
start, and right away when a target's provider is set.

A scan matches them against the product itself (an SBOM entry of
manager `supplier-product`, by the supplier's name and version for it,
only in that supplier's advisories) and against its components by purl,
raising CSAF alerts with the supplier's remediation and fixed versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang force-pushed feat/supplier-csaf from 724ed578d2 to e7eae3bafc 2026-11-16 22:24:37 +00:00 Compare
sharang merged commit 7d0ccd7171 into main 2026-11-16 22:45:45 +00:00
sharang deleted branch feat/supplier-csaf 2026-11-16 22:45:45 +00:00
Sign in to join this conversation.