Lieferkette: the graph API (nodes, edges, CVE state) #1051

Closed
opened 2026-11-19 08:31:44 +00:00 by sharang · 0 comments
Owner

Part of #1050.

GET /api/v1/supply-chain returns the workspace's supply chain as nodes and edges, for the dashboard to draw.

  • Projects: compliance_core::models::Project reads the registry's level (family, product, component) and parent_id. The registry has had them since tenant-registry 0020. Topic projects are not part of the graph.
  • Nodes:
    • suppliers, by the name in target.supplier, one node per supplier name;
    • targets;
    • product projects.
      Every node has a stable key: supplier:<name>, target:<id>, project:<id>.
  • Edges:
    • supplier → target, with how its SBOM arrives: upload (with the date), invite (an active link from #1027), release (#1028, later), or ended. Each edge carries the last version and when it arrived;
    • target → project, for each entry in project_ids that is a product project;
    • project → parent project.
  • CVE state: each target node carries its open and critical CVE counts. A project carries the counts of its parts, each CVE counted once.
  • No registry (dev): without a registry, targets show without projects.

Done when: a workspace with shared components (one target in two products) gets a correct DAG with every node's counts, and the counts agree with the machine overview (#1037).

Part of #1050. `GET /api/v1/supply-chain` returns the workspace's supply chain as nodes and edges, for the dashboard to draw. - **Projects:** `compliance_core::models::Project` reads the registry's `level` (`family`, `product`, `component`) and `parent_id`. The registry has had them since tenant-registry 0020. Topic projects are not part of the graph. - **Nodes:** - suppliers, by the name in `target.supplier`, one node per supplier name; - targets; - product projects. Every node has a stable key: `supplier:<name>`, `target:<id>`, `project:<id>`. - **Edges:** - supplier → target, with how its SBOM arrives: `upload` (with the date), `invite` (an active link from #1027), `release` (#1028, later), or `ended`. Each edge carries the last version and when it arrived; - target → project, for each entry in `project_ids` that is a product project; - project → parent project. - **CVE state:** each target node carries its open and critical CVE counts. A project carries the counts of its parts, each CVE counted once. - **No registry (dev):** without a registry, targets show without projects. **Done when:** a workspace with shared components (one target in two products) gets a correct DAG with every node's counts, and the counts agree with the machine overview (#1037).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#1051