Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllSeverities = []Severity{ NegligibleSeverity, LowSeverity, MediumSeverity, HighSeverity, CriticalSeverity, }
Functions ¶
This section is empty.
Types ¶
type Cvss ¶
type Metadata ¶
type Metadata struct { ID string Severity string Links []string Description string CvssV2 *Cvss CvssV3 *Cvss }
func NewMetadata ¶
func NewMetadata(m *v1.VulnerabilityMetadata) (*Metadata, error)
type MetadataProvider ¶
type MetadataStoreAdapter ¶
type MetadataStoreAdapter struct {
// contains filtered or unexported fields
}
func NewMetadataStoreProvider ¶
func NewMetadataStoreProvider(store v1.VulnerabilityMetadataStoreReader) *MetadataStoreAdapter
func (*MetadataStoreAdapter) GetMetadata ¶
func (pr *MetadataStoreAdapter) GetMetadata(id, recordSource string) (*Metadata, error)
type Provider ¶
type Provider interface { ProviderByDistro ProviderByLanguage ProviderByCPE }
type ProviderByCPE ¶
type ProviderByCPE interface {
GetByCPE(cpe.CPE) ([]*Vulnerability, error)
}
type ProviderByDistro ¶
type ProviderByLanguage ¶
type Set ¶
type Set map[string]struct{}
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 StoreAdapter ¶
type StoreAdapter struct {
// contains filtered or unexported fields
}
func NewProviderFromStore ¶
func NewProviderFromStore(store v1.VulnerabilityStoreReader) *StoreAdapter
func (*StoreAdapter) GetByCPE ¶
func (pr *StoreAdapter) GetByCPE(requestCPE cpe.CPE) ([]*Vulnerability, error)
func (*StoreAdapter) GetByDistro ¶
func (pr *StoreAdapter) GetByDistro(d distro.Distro, p *pkg.Package) ([]*Vulnerability, error)
func (*StoreAdapter) GetByLanguage ¶
func (pr *StoreAdapter) GetByLanguage(l pkg.Language, p *pkg.Package) ([]*Vulnerability, error)
type Vulnerability ¶
type Vulnerability struct { Constraint version.Constraint CPEs []cpe.CPE ID string RecordSource string FixedInVersion string }
func NewVulnerability ¶
func NewVulnerability(vuln v1.Vulnerability) (*Vulnerability, error)
func (Vulnerability) String ¶
func (v Vulnerability) String() string
Click to show internal directories.
Click to hide internal directories.