matcher

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulletinToFinding added in v1.0.1

func BulletinToFinding(b *vulners.Bulletin, componentRef string) model.Finding

BulletinToFinding converts a Vulners Bulletin into a Finding.

func NormalizeComponent

func NormalizeComponent(c model.Component) model.Component

NormalizeComponent prepares a component for vulnerability matching.

Types

type Enricher

type Enricher struct {
	// contains filtered or unexported fields
}

Enricher enriches govulncheck findings with Vulners intel data.

func NewEnricher

func NewEnricher(intelClient intel.Client, logger *slog.Logger) *Enricher

NewEnricher creates a new Enricher.

func (*Enricher) Enrich

func (e *Enricher) Enrich(ctx context.Context, findings []model.Finding) []model.Finding

Enrich takes govulncheck findings and adds Vulners exploit/severity data. It batch-fetches bulletins for efficiency when possible.

func (*Enricher) WithAIScore

func (e *Enricher) WithAIScore(enabled bool) *Enricher

WithAIScore enables on-demand AI score enrichment for findings that lack one.

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

Matcher resolves components to vulnerability findings.

func NewMatcher

func NewMatcher(intelClient intel.Client, logger *slog.Logger) *Matcher

NewMatcher creates a new Matcher.

func (*Matcher) Match

func (m *Matcher) Match(ctx context.Context, components []model.Component) ([]model.Finding, error)

Match queries the Vulners API for vulnerabilities affecting the given components.

Jump to

Keyboard shortcuts

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