Documentation ¶
Index ¶
- Constants
- Variables
- func GetAllOutputFormat() string
- func GetJoinedSeverities() string
- func IsValidSeverity(severity string) bool
- type CIConfiguration
- type CVSS
- type Catalog
- type Configuration
- type EPSS
- type Exploit
- type FailCriteria
- type Fix
- type Format
- type Parameters
- type Property
- type Reference
- type Registry
- type ScanType
- type Vulnerability
Constants ¶
View Source
const ConfigVersion string = "1.0"
View Source
const Version int = 3
Variables ¶
View Source
var Severities = []string{
"unknown",
"negligible",
"low",
"medium",
"high",
"critical",
}
Functions ¶
func GetAllOutputFormat ¶
func GetAllOutputFormat() string
func GetJoinedSeverities ¶
func GetJoinedSeverities() string
func IsValidSeverity ¶
Types ¶
type CIConfiguration ¶
type CIConfiguration struct {
FailCriteria FailCriteria `yaml:"failCriteria"`
}
type CVSS ¶
type CVSS struct { Source string `json:"source"` Method string `json:"method"` Severity string `json:"severity"` Score float64 `json:"score"` Vector string `json:"vector"` ExploitabilityScore float64 `json:"exploitability_score"` }
CVSS : Common Vulnerability Scoring System
type Catalog ¶ added in v1.9.0
type Catalog struct { bun.BaseModel `bun:"table:catalog,alias:c"` ID int64 `json:"id" bun:"id,pk,autoincrement"` Source string `json:"source,omitempty"` SchemaVersion int `json:"schema,omitempty"` Vulnerabilities int `json:"vulnerabilities,omitempty"` UniqueCVECount int `json:"unique_cve_count,omitempty"` GeneratedAt string `json:"generated_at,omitempty"` }
Catalog : Metadata for the vulnerability database
type Configuration ¶
type Configuration struct { Version string `yaml:"version"` MaxFileSize int64 `yaml:"maxFileSize"` Registry Registry `yaml:"registry"` CI CIConfiguration `yaml:"ci"` }
type EPSS ¶ added in v1.9.0
type EPSS struct { URL string `json:"url,omitempty"` Score string `json:"score,omitempty"` Percentile string `json:"percentile,omitempty"` Date string `json:"date,omitempty"` }
EPSS : Exploitability Prediction Scoring System
type Exploit ¶ added in v1.9.0
type Exploit struct { Source string `json:"source"` URL string `json:"url"` Description string `json:"description"` }
Exploit : Proof of Concept (PoC) data or Exploit data
type FailCriteria ¶
type FailCriteria struct { // TODO: Add logic to handle multiple vulnerability id as fail criteria Vulnerabilities []string `yaml:"vulnerability"` Severity string `yaml:"severity"` }
TODO: Add more logic to handle multiple fail criteria
type Parameters ¶
type Vulnerability ¶
type Vulnerability struct { bun.BaseModel `bun:"table:vulnerability,alias:v"` ID int64 `json:"id" bun:"id,pk,autoincrement"` Package string `json:"package,omitempty"` CVE string `json:"cve,omitempty"` Source string `json:"source,omitempty"` Constraints string `json:"constraints,omitempty"` CPE []string `json:"cpes,omitempty"` // Common Platform Enumeration Distro string `json:"distro,omitempty"` Ecosystem string `json:"ecosystem,omitempty"` // Ecosystem is the package manager or the source of the package DistroVersion string `json:"distro_version,omitempty"` Vendor string `json:"vendor,omitempty"` Qualifiers string `json:"qualifiers,omitempty"` // Purl Qualifiers determines the package is qualified for the match analysis based on the source Severity string `json:"severity,omitempty"` CVSS []CVSS `json:"cvss,omitempty"` EPSS EPSS `json:"epss,omitempty"` Description string `json:"description,omitempty"` References []Reference `json:"references,omitempty"` Fixes []string `json:"fix,omitempty"` // Fix is the version that the package should be updated to Advisories []string `json:"advisories,omitempty"` Properties []Property `json:"properties,omitempty"` }
Click to show internal directories.
Click to hide internal directories.