vulncheck

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package vulncheck provides a vulnerability source backed by the VulnCheck API.

Index

Constants

View Source
const (
	DefaultAPIURL  = "https://api.vulncheck.com/v3"
	DefaultTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Source)

Option configures a Source.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL sets a custom API base URL.

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

WithHTTPClient sets a custom HTTP client.

func WithToken

func WithToken(token string) Option

WithToken sets the VulnCheck API token. Required for all requests.

type Source

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

Source implements vulns.Source using the VulnCheck API. Note: VulnCheck requires authentication via bearer token.

func New

func New(opts ...Option) *Source

New creates a new VulnCheck source. A token must be provided via WithToken for the source to work.

func (*Source) Get

func (s *Source) Get(ctx context.Context, id string) (*vulns.Vulnerability, error)

Get fetches a specific vulnerability by ID.

func (*Source) Name

func (s *Source) Name() string

Name returns "vulncheck".

func (*Source) Query

func (s *Source) Query(ctx context.Context, p *purl.PURL) ([]vulns.Vulnerability, error)

Query returns vulnerabilities affecting the package identified by the PURL.

func (*Source) QueryBatch

func (s *Source) QueryBatch(ctx context.Context, purls []*purl.PURL) ([][]vulns.Vulnerability, error)

QueryBatch queries multiple packages. VulnCheck doesn't have a batch API, so this makes individual requests.

Jump to

Keyboard shortcuts

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