SbomService

The canonical SBOM repository for Stella Ops — storage, versioning, lineage, and the artifact association graph.

Status: Implemented Source: src/SbomService/ Owner: Scanner Guild

Purpose

SbomService is the system of record for Software Bills of Materials in the Stella Ops vulnerability scanner. It provides SBOM storage, versioning, and lineage tracking over a canonical repository that supports the CycloneDX and SPDX formats, including temporal (point-in-time and range) ledger queries, version diffing, dependency-path queries, and artifact lineage graph analysis.

The service also owns the artifact association graph for source snapshots, build runs, OCI image digests, SBOM documents, scan jobs, detector reports, findings, and evidence bundles. See artifact-links-api.md for the API contract and CLI/UI workflow.

Supported SBOM formats (validated at upload by SbomNormalizationService/SbomUploadService): CycloneDX 1.4, 1.5, 1.6 and SPDX 2.3 and 3.0. Other versions are rejected with a validation error. Detection keys off bomFormat (CycloneDX) and spdxVersion (SPDX).

Components

Services:

Libraries:

Tests:

Note: the MVC controllers under Controllers/ (LineageController, LineageStreamController, RegistrySourceController, RegistryWebhookController) remain present in source, but Program.cs does not call AddControllers()/MapControllers(). The live HTTP surface is the set of minimal-API endpoints registered in Program.cs. Registry-source management is live through RegistrySourceEndpointExtensions.MapRegistrySourceEndpoints(...); lineage-stream controller routes remain controller-only until explicitly mapped.

Authentication & Authorization

SbomService validates Authority bearer tokens and Router-generated signed identity envelopes through the shared resource-server pipeline. Raw x-tenant-id/x-user-id headers cannot authenticate a request. Four named policies are defined in Auth/SbomPolicies.cs; each requires an authenticated principal plus its canonical scope:

The authenticated stellaops:tenant claim is the sole tenant authority. Existing body/query tenant fields are compatibility assertions only: omitted uses the authenticated tenant, equal is accepted, and mismatch is rejected. Authenticated subject identity also overrides caller-supplied actor fields.

API surface (minimal APIs in Program.cs)

All routes require the policy noted; health/OpenAPI are anonymous.

Health & metadata:

SBOM upload & ledger:

SBOM queries:

Artifact links (association graph):

Registry sources:

Lineage graph & compare:

Internal/operational (Sbom.Internal / sbom:operate):

Configuration

Configuration is bound from appsettings.json plus environment variables prefixed SBOM_. Keys live under the SbomService configuration root.

Key settings:

Persistence

PostgreSQL schema sbom (SbomServiceDataSource.DefaultSchemaName = "sbom"). Migrations are embedded SQL applied via AddStartupMigrations(...) (forward-only, auto-migrate on startup):

The Lineage library carries its own migration (00001_InitialSchema.sql) for sbom.sbom_lineage_edges, sbom.sbom_verdict_links, and vex.vex_deltas.

Observability

Dependencies

Current Status

Implemented with a PostgreSQL storage backend (schema sbom). Supports SBOM ingestion, versioning (ledger with point-in-time/range/diff queries), artifact lineage graphs, deterministic replay verification, the artifact association graph, and a resolver/inventory feed for downstream policy/scanner consumers. The host expects durable PostgreSQL-backed state for all canonical runtime stores; fixture-backed and in-memory repositories are injected only by explicit test/local-harness configuration.