Documentation
¶
Overview ¶
Package vulncheck provides a vulnerability source backed by the VulnCheck API.
Index ¶
- Constants
- type Option
- type Source
- func (s *Source) Get(ctx context.Context, id string) (*vulns.Vulnerability, error)
- func (s *Source) Name() string
- func (s *Source) Query(ctx context.Context, p *purl.PURL) ([]vulns.Vulnerability, error)
- func (s *Source) QueryBatch(ctx context.Context, purls []*purl.PURL) ([][]vulns.Vulnerability, error)
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 WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
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 ¶
New creates a new VulnCheck source. A token must be provided via WithToken for the source to work.
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.
Click to show internal directories.
Click to hide internal directories.