search

package
v0.86.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

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 v5.VulnerabilityProvider, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType, criteria ...Criteria) ([]match.Match, error)

func ByPackageCPE

func ByPackageCPE(store v5.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 v5.ProviderByDistro, d *distro.Distro, p pkg.Package, upstreamMatcher match.MatcherType) ([]match.Match, error)

func ByPackageLanguage

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

Types

type CPEPackageParameter

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