govulncheck

command
v0.2.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

govulncheck-filter turns `govulncheck -format json` output into a blocking CI gate with an auditable allowlist. It is invoked by hack/govulncheck.sh, never directly.

Two things it does that plain `govulncheck ./...` cannot:

  1. Reports only findings govulncheck traced to a *called* symbol. The JSON stream carries one finding per reachability level for the same OSV: module-only ("this version is in your module graph"), package-level ("something imports it"), and symbol-level ("this function is reachable in the call graph"). Only the last is a vulnerability in this binary; the first two are inventory. `govulncheck ./...` in text mode already applies that rule, but exits 3 either way, so CI cannot tell the two apart. Here, a finding counts only when trace[0] names a function.

  2. Drops OSV IDs listed in the allowlist (hack/govulncheck-allow.yaml), which is how the residue with no upstream fix stays off the red list without silencing everything else. govulncheck has no native suppression.

Exits 1 when anything survives both filters. A stale allowlist entry - an ID whose module is still in the scanned build but which no longer produces any finding - is a warning only, never a failure: an allowlist that fails closed on its own success would make dependency upgrades punish the upgrader.

Usage:

govulncheck -format json ./... | go run ./hack/govulncheck \
  -allowlist hack/govulncheck-allow.yaml -label ./providers/edges

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL