Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SeverityNames = []string{
"UNKNOWN",
"LOW",
"MEDIUM",
"HIGH",
"CRITICAL",
}
)
Functions ¶
func CompareSeverityString ¶
Types ¶
type Advisories ¶
type Advisories struct { FixedVersion string `json:",omitempty"` // For backward compatibility Entries []Advisory `json:",omitempty"` }
Advisories saves fixed versions for each arches/vendorIDs e.g. this is required when CVE has different fixed versions for different arches
type Advisory ¶
type Advisory struct { VulnerabilityID string `json:",omitempty"` // CVE-ID or vendor ID VendorIDs []string `json:",omitempty"` // e.g. RHSA-ID and DSA-ID Arches []string `json:",omitempty"` // It is filled only when FixedVersion is empty since it is obvious the state is "Fixed" when FixedVersion is not empty. // e.g. Will not fix and Affected State string `json:",omitempty"` // Trivy DB has "vulnerability" bucket and severities are usually stored in the bucket per a vulnerability ID. // In some cases, the advisory may have multiple severities depending on the packages. // For example, CVE-2015-2328 in Debian has "unimportant" for mongodb and "low" for pcre3. // e.g. https://security-tracker.debian.org/tracker/CVE-2015-2328 Severity Severity `json:",omitempty"` // Versions for os package FixedVersion string `json:",omitempty"` AffectedVersion string `json:",omitempty"` // Only for Arch Linux // MajorVersion ranges for language-specific package // Some advisories provide VulnerableVersions only, others provide PatchedVersions and UnaffectedVersions VulnerableVersions []string `json:",omitempty"` PatchedVersions []string `json:",omitempty"` UnaffectedVersions []string `json:",omitempty"` // DataSource holds where the advisory comes from DataSource *DataSource `json:",omitempty"` // Custom is basically for extensibility and is not supposed to be used in OSS Custom interface{} `json:",omitempty"` }
type AdvisoryDetail ¶
type CVSSVector ¶
type DataSource ¶
type LastUpdated ¶
type VendorCVSS ¶
type VendorSeverity ¶
type Vulnerability ¶
type Vulnerability struct { Title string `json:",omitempty"` Description string `json:",omitempty"` Severity string `json:",omitempty"` // Selected from VendorSeverity, depending on a scan target CweIDs []string `json:",omitempty"` // e.g. CWE-78, CWE-89 VendorSeverity VendorSeverity `json:",omitempty"` CVSS VendorCVSS `json:",omitempty"` References []string `json:",omitempty"` PublishedDate *time.Time `json:",omitempty"` // Take from NVD LastModifiedDate *time.Time `json:",omitempty"` // Take from NVD // Custom is basically for extensibility and is not supposed to be used in OSS Custom interface{} `json:",omitempty"` }
type VulnerabilityDetail ¶
type VulnerabilityDetail struct { ID string `json:",omitempty"` // e.g. CVE-2019-8331, OSVDB-104365 CvssScore float64 `json:",omitempty"` CvssVector string `json:",omitempty"` CvssScoreV3 float64 `json:",omitempty"` CvssVectorV3 string `json:",omitempty"` Severity Severity `json:",omitempty"` SeverityV3 Severity `json:",omitempty"` CweIDs []string `json:",omitempty"` // e.g. CWE-78, CWE-89 References []string `json:",omitempty"` Title string `json:",omitempty"` Description string `json:",omitempty"` PublishedDate *time.Time `json:",omitempty"` // Take from NVD LastModifiedDate *time.Time `json:",omitempty"` // Take from NVD }
Click to show internal directories.
Click to hide internal directories.