SbomService

Verified against commit 942a18727c (2026-09-26). Re-verify with: grep -rnE 'Map(Get|Post|Put|Delete|Group)\(' src/SbomService/StellaOps.SbomService --include=*.cs && ls src/SbomService/__Libraries/StellaOps.SbomService.Persistence/Migrations/*.sql && grep -n -A3 '^ sbomservice:' devops/release/bundle/docker-compose.yml

The estate-wide service, database, compose and bundle wiring is generated in the service inventory; this dossier describes the module and defers to that inventory for the service list.

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

Status: Implemented and shipped in the release bundle (compose service sbomservice). Source: src/SbomService/ Domain: SBOM collection is classified under the Scanner fact-collection domain; the implementation stays in the top-level src/SbomService/ root (see src/SbomService/AGENTS.md).

Purpose

SbomService is the system of record for Software Bills of Materials. It stores uploaded and scanner-produced SBOMs in a tenant-scoped, append-only ledger and serves temporal (point-in-time and range) ledger queries, version diffs, dependency-path queries, raw-document export, and artifact lineage graphs.

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.

Supported JSON upload formats (validated in SbomUploadService through SbomFormatSupport): CycloneDX 1.4, 1.5, 1.6, 1.7 and SPDX 2.3 and 3.0. Other versions are rejected with a validation error. Detection keys off bomFormat (CycloneDX) and spdxVersion (SPDX).

Components

Deployable:

Libraries:

Tests:

Deployment

Authentication and 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. Named policies are defined in Auth/SbomPolicies.cs and registered in Program.cs:

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

API surface

All routes are minimal-API endpoints mapped in Program.cs, Endpoints/SbomVersionStreamEndpoints.cs, and Services/RegistrySourceEndpointExtensions.cs. Health, readiness, OpenAPI, and build-info routes are anonymous. The generated api-reference.md is produced from a live OpenAPI capture and can lag the source; see architecture.md for the full contract.

Health and metadata:

SBOM upload, retrieval, and ledger:

Version stream (mapped only with durable PostgreSQL and SbomService:VersionStream:Enabled=true; absent by default):

SBOM queries:

Artifact links:

Registry sources (route group /api/v1/registry-sources):

Lineage graph and compare:

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

Configuration

Configuration is bound from appsettings.json plus environment variables prefixed SBOM_ (and the unprefixed host environment). Most keys live under the SbomService root.

Persistence

PostgreSQL database stellaops_sbomservice, schema sbom. Migrations are embedded SQL in src/SbomService/__Libraries/StellaOps.SbomService.Persistence/Migrations/ (excluding _archived/) and applied on startup through AddStartupMigrations(...); forward-only. The shared Eventing reliability migrations are applied in the same database. The ordered list and what each migration does are in architecture.md.

Doctor

Doctor/SbomServiceDoctorChecks.cs provides:

Observability

Dependencies

Consumers