Documentation ¶
Index ¶
- func GetFixVersion(vulnerability Vulnerability) string
- func PrintIgnoredVulnerabilities(vulnerabilities []MergedVulnerability)
- type CVSS
- type CvssMetrics
- type DiffInfo
- type Distro
- type Fix
- type Info
- type Match
- type Matches
- type MergedResults
- func (m *MergedResults) Merge(other *Results) *MergedResults
- func (m *MergedResults) SetHash(hash string)
- func (m *MergedResults) SetName(name string)
- func (m *MergedResults) SetSource(src Source)
- func (m *MergedResults) SetType(srcType string)
- func (m *MergedResults) ToSlice() [][]MergedVulnerability
- type MergedVulnerability
- type Package
- type Results
- type Source
- type Vulnerability
- type VulnerabilityKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFixVersion ¶
func GetFixVersion(vulnerability Vulnerability) string
TODO can be multiple fix version?
func PrintIgnoredVulnerabilities ¶
func PrintIgnoredVulnerabilities(vulnerabilities []MergedVulnerability)
Types ¶
type CVSS ¶
type CVSS struct { Version string `json:"version"` Vector string `json:"vector"` Metrics CvssMetrics `json:"metrics"` VendorMetadata interface{} `json:"vendorMetadata"` }
type CvssMetrics ¶
type Distro ¶
type Distro struct { Name string `json:"name"` // Name of the Linux distribution Version string `json:"version"` // Version of the Linux distribution (major or major.minor version) IDLike []string `json:"idLike"` // the ID_LIKE field found within the /etc/os-release file }
Distro provides information about a detected Linux distribution.
type Match ¶
type Match struct {
Vulnerability Vulnerability `json:"vulnerability"`
}
type MergedResults ¶
type MergedResults struct { MergedVulnerabilitiesByKey map[VulnerabilityKey][]MergedVulnerability Source Source }
func NewMergedResults ¶
func NewMergedResults() *MergedResults
func (*MergedResults) Merge ¶
func (m *MergedResults) Merge(other *Results) *MergedResults
func (*MergedResults) SetHash ¶
func (m *MergedResults) SetHash(hash string)
func (*MergedResults) SetName ¶
func (m *MergedResults) SetName(name string)
func (*MergedResults) SetSource ¶
func (m *MergedResults) SetSource(src Source)
func (*MergedResults) SetType ¶
func (m *MergedResults) SetType(srcType string)
func (*MergedResults) ToSlice ¶
func (m *MergedResults) ToSlice() [][]MergedVulnerability
ToSlice returns MergedResults in a slice format and not by key.
type MergedVulnerability ¶
type MergedVulnerability struct { ID string `json:"id"` // Merged vulnerability ID used in DiffInfo - THIS IS NOT THE CVE ID Vulnerability Vulnerability `json:"vulnerability"` ScannersInfo []Info `json:"scanners"` Diffs []DiffInfo `json:"diffs"` }
func SortBySeverityAndCVSS ¶
func SortBySeverityAndCVSS(vulnerabilities []MergedVulnerability) []MergedVulnerability
SortBySeverityAndCVSS sorts vulnerabilities by severity, CVSSv3.1, CVSSv3.0 and CVSSv2.0.
func (*MergedVulnerability) AppendDiffInfo ¶
func (mv *MergedVulnerability) AppendDiffInfo(diff DiffInfo) *MergedVulnerability
func (*MergedVulnerability) AppendScannerInfo ¶
func (mv *MergedVulnerability) AppendScannerInfo(info Info) *MergedVulnerability
type Results ¶
type Vulnerability ¶
type Vulnerability struct { ID string `json:"id"` Description string `json:"description,omitempty"` Links []string `json:"links"` Distro Distro `json:"distro"` CVSS []CVSS `json:"cvss"` Fix Fix `json:"fix"` Severity string `json:"severity,omitempty"` Package Package `json:"package"` LayerID string `json:"layerID"` Path string `json:"path"` }
type VulnerabilityKey ¶
type VulnerabilityKey string // Unique identification of a vulnerability ID per package (name and version)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.