Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaVersion = grypeDB.SchemaVersion
Variables ¶
View Source
var AllSeverities = []Severity{ NegligibleSeverity, LowSeverity, MediumSeverity, HighSeverity, CriticalSeverity, }
Functions ¶
This section is empty.
Types ¶
type Cvss ¶
type Cvss struct {
Version string
Vector string
Metrics CvssMetrics
VendorMetadata interface{}
}
type CvssMetrics ¶ added in v0.13.0
func NewCvssMetrics ¶ added in v0.13.0
func NewCvssMetrics(baseScore, exploitabilityScore, impactScore float64) CvssMetrics
type Metadata ¶
type Metadata struct {
ID string
DataSource string
Namespace string
Severity string
URLs []string
Description string
Cvss []Cvss
}
func NewMetadata ¶
func NewMetadata(m *grypeDB.VulnerabilityMetadata) (*Metadata, error)
type MetadataProvider ¶
type MetadataStoreAdapter ¶
type MetadataStoreAdapter struct {
// contains filtered or unexported fields
}
func NewMetadataStoreProvider ¶
func NewMetadataStoreProvider(store grypeDB.VulnerabilityMetadataStoreReader) *MetadataStoreAdapter
func (*MetadataStoreAdapter) GetMetadata ¶
func (pr *MetadataStoreAdapter) GetMetadata(id, namespace string) (*Metadata, error)
type Provider ¶
type Provider interface {
ProviderByDistro
ProviderByLanguage
ProviderByCPE
}
type ProviderByCPE ¶
type ProviderByCPE interface {
GetByCPE(syftPkg.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 grypeDB.VulnerabilityStoreReader) *StoreAdapter
func (*StoreAdapter) GetByCPE ¶
func (pr *StoreAdapter) GetByCPE(requestCPE syftPkg.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 syftPkg.Language, p pkg.Package) ([]Vulnerability, error)
type Vulnerability ¶
type Vulnerability struct {
Constraint version.Constraint
CPEs []pkg.CPE
ID string
Namespace string
Fix Fix
Advisories []Advisory
RelatedVulnerabilities []Reference
}
func NewVulnerability ¶
func NewVulnerability(vuln grypeDB.Vulnerability) (*Vulnerability, error)
func (Vulnerability) String ¶
func (v Vulnerability) String() string
Click to show internal directories.
Click to hide internal directories.