vulnerability

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	ProviderByDistro
	ProviderByLanguage
	ProviderByCPE
}

type ProviderByCPE

type ProviderByCPE interface {
	GetByCPE(cpe.CPE) ([]*Vulnerability, error)
}

type ProviderByDistro

type ProviderByDistro interface {
	GetByDistro(distro.Distro, *pkg.Package) ([]*Vulnerability, error)
}

type ProviderByLanguage

type ProviderByLanguage interface {
	GetByLanguage(pkg.Language, *pkg.Package) ([]*Vulnerability, error)
}

type Set

type Set map[string]struct{}

func NewSet

func NewSet() Set

func (Set) Add

func (s Set) Add(v *Vulnerability)

func (Set) Contains

func (s Set) Contains(v *Vulnerability) bool

func (Set) Remove

func (s Set) Remove(v *Vulnerability)

type StoreProvider

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

func NewProviderFromStore

func NewProviderFromStore(store v1.VulnerabilityStoreReader) *StoreProvider

func (*StoreProvider) GetByCPE

func (pr *StoreProvider) GetByCPE(requestCPE cpe.CPE) ([]*Vulnerability, error)

func (*StoreProvider) GetByDistro

func (pr *StoreProvider) GetByDistro(d distro.Distro, p *pkg.Package) ([]*Vulnerability, error)

func (*StoreProvider) GetByLanguage

func (pr *StoreProvider) GetByLanguage(l pkg.Language, p *pkg.Package) ([]*Vulnerability, error)

type Vulnerability

type Vulnerability struct {
	Constraint version.Constraint
	CPEs       []cpe.CPE
	ID         string
}

func NewVulnerability

func NewVulnerability(vuln v1.Vulnerability) (*Vulnerability, error)

func (Vulnerability) String

func (v Vulnerability) String() string

Jump to

Keyboard shortcuts

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