Skip to content

SBOM enrichment endpoint #143

@andrew

Description

@andrew

Add POST /api/sbom/enrich that accepts a CycloneDX or SPDX document and returns it with missing component metadata filled in from the proxy's enrichment data.

Flow:

  1. Parse the body with git-pkgs/sbom.Parse() into the unified *sbom.SBOM model
  2. For each package, look up the PURL in the proxy database (already populated via git-pkgs/enrichment); optionally fall back to a live enrichment.Client.BulkLookup for misses
  3. Fill in LicenseDeclared, Supplier, Checksums (from the artifacts table), and vulnerability references where they're empty
  4. Encode back in the same format that arrived using sbom.Encode()

This matches what jf sbom-enrich does in the JFrog CLI but backed by ecosyste.ms / deps.dev / registry data instead of Xray's proprietary database. Useful for taking a bare SBOM from syft or a build tool and turning it into something with licenses and vuln refs without running a separate scanner.

Both git-pkgs/sbom (not yet a dependency) and git-pkgs/enrichment (already in go.mod) do the heavy lifting here.

UI: a file-upload form on the dashboard that posts to this endpoint and triggers a download of the enriched document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions