govulncheck

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package govulncheck ingests `govulncheck -json` output and normalizes it into findingspec Findings (security domain, type "sca"). Its distinguishing value is call-graph reachability: govulncheck reports whether a vulnerable symbol is actually called, which populates security.Reachability — a primary prioritization signal. It depends only on govulncheck's stable JSON shape.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(r io.Reader, opts Options) (*findingspec.FindingSet, error)

Parse decodes a govulncheck JSON stream and returns a normalized FindingSet, one finding per vulnerability (OSV id).

Types

type Finding

type Finding struct {
	OSV          string  `json:"osv"`
	FixedVersion string  `json:"fixed_version"`
	Trace        []Frame `json:"trace"`
}

Finding is a govulncheck finding: an OSV id and a call/import trace.

type Frame

type Frame struct {
	Module   string `json:"module"`
	Version  string `json:"version"`
	Package  string `json:"package"`
	Function string `json:"function"`
	Receiver string `json:"receiver"`
}

Frame is one entry in a finding's trace. A frame with a Function indicates a call-level (reachable) finding; module/package-only frames indicate the package is required/imported but not called.

type OSVAffected

type OSVAffected struct {
	Package OSVPackage `json:"package"`
}

type OSVEntry

type OSVEntry struct {
	ID         string         `json:"id"`
	Summary    string         `json:"summary"`
	Details    string         `json:"details"`
	Aliases    []string       `json:"aliases"`
	References []OSVReference `json:"references"`
	Affected   []OSVAffected  `json:"affected"`
	Severity   []OSVSeverity  `json:"severity"`
}

OSVEntry is the subset of the OSV record govulncheck emits.

type OSVPackage

type OSVPackage struct {
	Ecosystem string `json:"ecosystem"`
	Name      string `json:"name"`
}

type OSVReference

type OSVReference struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

type OSVSeverity

type OSVSeverity struct {
	Type  string `json:"type"`
	Score string `json:"score"`
}

OSVSeverity carries a CVSS vector (Score is the vector string, per OSV schema).

type Options

type Options struct {
	// MaxPaths caps the number of example call paths recorded per vulnerability
	// (default 3).
	MaxPaths int
}

Options configures conversion.

Jump to

Keyboard shortcuts

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