search

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyCPEMatch = errors.New("attempted CPE match against package with no CPEs")

Functions

func ByCriteria

func ByCriteria(store vulnerability.Provider, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType, criteria ...Criteria) ([]match.Match, error)

func ByPackageCPE

func ByPackageCPE(store vulnerability.ProviderByCPE, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType) ([]match.Match, error)

ByPackageCPE retrieves all vulnerabilities that match the generated CPE

func ByPackageDistro

func ByPackageDistro(store vulnerability.ProviderByDistro, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType) ([]match.Match, error)

func ByPackageLanguage

func ByPackageLanguage(store vulnerability.ProviderByLanguage, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType) ([]match.Match, error)

Types

type CPEPackageParameter added in v0.63.0

type CPEPackageParameter struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type CPEParameters

type CPEParameters struct {
	Namespace string              `json:"namespace"`
	CPEs      []string            `json:"cpes"`
	Package   CPEPackageParameter `json:"package"`
}

func (*CPEParameters) Merge

func (i *CPEParameters) Merge(other CPEParameters) error

type CPEResult

type CPEResult struct {
	VulnerabilityID   string   `json:"vulnerabilityID"`
	VersionConstraint string   `json:"versionConstraint"`
	CPEs              []string `json:"cpes"`
}

func (CPEResult) Equals

func (h CPEResult) Equals(other CPEResult) bool

type Criteria

type Criteria string
var (
	ByCPE          Criteria = "by-cpe"
	ByLanguage     Criteria = "by-language"
	ByDistro       Criteria = "by-distro"
	CommonCriteria          = []Criteria{
		ByLanguage,
	}
)

Jump to

Keyboard shortcuts

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