Skip to content

Silent failures + undocumented external-tool deps (gh) in verify #16

Closed

Description

@scttfrdmn

Two related ergonomics/correctness gaps in the verify path's reliance on external CLIs:

  1. Silent SLSA skip when gh is missing. verifySLSA returns level 0 with no diagnostic if gh isn't installed — indistinguishable from "attestation absent". The operator can't tell why --min-slsa-level failed.
  2. gh is undocumented as a requirement. vet sbom help documents the syft requirement; vet verify --source needs the gh CLI but never says so (cmd/vet/main.go).

Also: internal/sbom has no test file — Generate (syft) and the --attest (cosign attest) paths are uncovered, even with the mockable Runner the rest of vet uses.

Fix

  • Surface a clear warning/error when a required tool (gh, syft, cosign) is absent for a requested check, rather than a silent level-0 / skip.
  • Document the gh dependency in vet verify help and the README, alongside syft/cosign.
  • Add internal/sbom tests using the Runner mock (generation + attest paths, missing-syft failure).

Refs: internal/verify/verify.go verifySLSA; cmd/vet/main.go verify help; internal/sbom (no tests).

Activity

  1. added
    bug
    priority:low
    on Jun 9, 2026
  2. added a commit that references this issue on Jun 9, 2026
  3. scttfrdmn commented on Jun 9, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed in #18 (merged):

    • Silent SLSA skip → verifySLSA now returns a sentinel errGHMissing when gh is absent; Verify sets SLSAToolMissing and fails closed under --min-slsa-level with a clear reason. CLI prints 'gh CLI not installed' distinctly.
    • Undocumented gh dependency → documented (with cosign + syft) in the vet verify help and a new README Required external tools table, including the fail-closed behavior.
    • internal/sbom had no tests → added: syft invocation, --attest→cosign (image-only), missing-syft error, CycloneDX format.
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

    bugpriority:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions