Skip to content

vet verify --check-cves is a no-op: CVE gating silently passes vulnerable artifacts #13

Closed

Description

@scttfrdmn

Impact (security-relevant)

vet verify --check-cves critical (and high) appears to enforce a CVE policy but does nothing — it passes every artifact, including ones with critical CVEs. A policy author who writes --check-cves critical gets a false sense of enforcement.

Evidence

internal/verify/verify.go — checkCVEs is stubbed to always return clean:

func (v *Verifier) checkCVEs(_ context.Context, sbomPath string) (critical, high bool, err error) {
    // Simplified: ... Full implementation reads SBOM packages and queries OSV.
    if sbomPath == "" { return false, false, fmt.Errorf("no SBOM path provided") }
    return false, false, nil  // <-- always clean
}

The gate then keys on these always-false values:

case "critical": if result.CVECritical { policyFailures = append(..., "critical CVEs found") }

So CVECritical/CVEHigh are never true → no failure is ever raised. The real query path, QueryOSV (HTTP POST to api.osv.dev), exists but is never called — it's orphaned.

Fix

Wire checkCVEs to: parse the stored SBOM (SPDX/CycloneDX) into a package list, batch-query OSV (/v1/querybatch), and set CVECritical/CVEHigh from real severities via the existing QueryOSV shape. Until it's real, fail closed or loudly: if --check-cves is requested but the check can't run (no SBOM, or unimplemented), the gate should error/deny rather than silently pass. Relates to the SBOM-content-parsing gap (separate issue).

Refs: internal/verify/verify.go checkCVEs + QueryOSV; the gate semantics it feeds.

Activity

  1. added
    bug
    priority:high
    on Jun 9, 2026
  2. scttfrdmn commented on Jun 9, 2026

    @scttfrdmn
    ContributorAuthor

    Depends on #15 — real CVE checking needs the SBOM parsed into a package list first. Sequence: #15 (parse SBOM) → #13 (query OSV from the package list, fail-closed until then).

  3. added a commit that references this issue on Jun 9, 2026
  4. scttfrdmn commented on Jun 9, 2026

    @scttfrdmn
    ContributorAuthor

    Fixed in #17 (merged). checkCVEs now parses the SBOM (#15) and queries OSV per package, setting CVECritical/CVEHigh from real severities; queryOSV is wired in (no longer orphaned). The false-pass is closed: --check-cves that cannot run (no SBOM / parse error / OSV unreachable) now fails closed with an explicit policy reason rather than silently passing. Covered by an end-to-end regression test (--check-cves + no SBOM → DENY).

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:high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions