Skip to content

SBOM is checked for existence only, never parsed or validated #15

Closed

Description

@scttfrdmn

SBOMPresent is set by store.HasSBOM, which only os.Stats the file:

func (s *Store) HasSBOM(artifactRef string) bool {
    for _, format := range []string{"spdx", "cyclonedx"} {
        if _, err := os.Stat(s.SBOMPath(artifactRef, format)); err == nil { return true }
    }
    return false
}

So context.workload.sbom_present == true means only "a file is on disk" — not that it's a valid SPDX/CycloneDX document, nor that it lists packages. Nothing in vet ever parses SBOM content.

Fix

Add an SBOM parser (SPDX + CycloneDX) that validates the document and extracts the package list. SBOMPresent should mean "a valid SBOM with ≥1 package", not "a file exists". This parser is also the prerequisite for real CVE checking (#13) — the package list feeds the OSV query. Pure-Go libs exist (e.g. github.com/CycloneDX/cyclonedx-go, SPDX tools), mirroring how nitro added go-cose for COSE.

Refs: internal/store/store.go HasSBOM; blocks #13.

Activity

  1. added
    type:feature
    priority:medium
    on Jun 9, 2026
  2. added 2 commits that reference this issue on Jun 9, 2026
    81c839c
    abf18b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumtype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions