osvdev

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0, BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Overview

Package osvdev queries the OSV.dev API to find vulnerabilities in the inventory packages

Index

Constants

View Source
const (
	// Name is the unique name of this Enricher.
	Name = "vulnmatch/osvdev"
)

Variables

View Source
var ErrInitialQueryTimeout = errors.New("initialQueryTimeout reached")

ErrInitialQueryTimeout is returned if the initial query to OSV.dev partially fails due to timeout

Functions

func NewDefault

func NewDefault() enricher.Enricher

NewDefault creates a new Enricher with the default configuration and OSV.dev client

func NewWithClient

func NewWithClient(c Client, initialQueryTimeout time.Duration) enricher.Enricher

NewWithClient returns an Enricher which uses a specified deps.dev client.

Types

type Client

type Client interface {
	osvdevexperimental.OSVClientInterface
	GetVulnByID(ctx context.Context, id string) (*osvpb.Vulnerability, error)
}

Client is an interface that provides an abstraction on top of the OSV.dev client.

type Enricher

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

Enricher queries the OSV.dev API to find vulnerabilities in the inventory packages

func (*Enricher) Enrich

Enrich queries the OSV.dev API to find vulnerabilities in the inventory packages

func (Enricher) Name

func (Enricher) Name() string

Name of the Enricher.

func (Enricher) RequiredPlugins

func (Enricher) RequiredPlugins() []string

RequiredPlugins returns the plugins that are required to be enabled for this Enricher to run. While it works on the results of other extractors, the Enricher itself can run independently.

func (Enricher) Requirements

func (Enricher) Requirements() *plugin.Capabilities

Requirements of the Enricher. Needs network access so it can query the osv.dev api

func (Enricher) Version

func (Enricher) Version() int

Version of the Enricher.

Directories

Path Synopsis
Package fakeclient contains a mock implementation of the OSV.dev client for testing purposes.
Package fakeclient contains a mock implementation of the OSV.dev client for testing purposes.

Jump to

Keyboard shortcuts

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