vulnerability

package
v0.86.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advisory added in v0.13.0

type Advisory struct {
	ID   string
	Link string
}

type Cvss

type Cvss struct {
	Source         string
	Type           string
	Version        string
	Vector         string
	Metrics        CvssMetrics
	VendorMetadata interface{}
}

type CvssMetrics added in v0.13.0

type CvssMetrics struct {
	BaseScore           float64
	ExploitabilityScore *float64
	ImpactScore         *float64
}

func NewCvssMetrics added in v0.13.0

func NewCvssMetrics(baseScore, exploitabilityScore, impactScore float64) CvssMetrics

type Fix added in v0.13.0

type Fix struct {
	Versions []string
	State    FixState
}

type FixState added in v0.86.0

type FixState string
const (
	FixStateUnknown  FixState = "unknown"
	FixStateFixed    FixState = "fixed"
	FixStateNotFixed FixState = "not-fixed"
	FixStateWontFix  FixState = "wont-fix"
)

func AllFixStates added in v0.72.0

func AllFixStates() []FixState

type Metadata

type Metadata struct {
	ID          string
	DataSource  string
	Namespace   string
	Severity    string
	URLs        []string
	Description string
	Cvss        []Cvss
}

type MetadataProvider

type MetadataProvider interface {
	GetMetadata(id, namespace string) (*Metadata, error)
}

type Provider

type Provider interface {
	Get(id, namespace string) ([]Vulnerability, error)
	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(syftPkg.Language, pkg.Package) ([]Vulnerability, error)
}

type Reference added in v0.13.0

type Reference struct {
	ID        string
	Namespace string
}

type Severities added in v0.59.0

type Severities []Severity

func (Severities) Len added in v0.59.0

func (s Severities) Len() int

func (Severities) Less added in v0.59.0

func (s Severities) Less(i, j int) bool

func (Severities) Swap added in v0.59.0

func (s Severities) Swap(i, j int)

type Severity

type Severity int
const (
	UnknownSeverity Severity = iota
	NegligibleSeverity
	LowSeverity
	MediumSeverity
	HighSeverity
	CriticalSeverity
)

func AllSeverities

func AllSeverities() []Severity

func ParseSeverity

func ParseSeverity(severity string) Severity

func (Severity) String

func (f Severity) String() string

type Vulnerability

type Vulnerability struct {
	PackageName            string
	Constraint             version.Constraint
	PackageQualifiers      []qualifier.Qualifier
	CPEs                   []cpe.CPE
	ID                     string
	Namespace              string
	Fix                    Fix
	Advisories             []Advisory
	RelatedVulnerabilities []Reference
}

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