Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScoreSeverity ¶
ScoreSeverity maps a CVSS score to a severity label.
Types ¶
type Component ¶
type Component struct {
Type string `json:"type"`
Name string `json:"name"`
Version string `json:"version"`
PURL string `json:"purl,omitempty"`
CPE string `json:"cpe,omitempty"`
Locations []string `json:"locations,omitempty"`
Ecosystem string `json:"ecosystem,omitempty"` // "apk", "deb", "rpm", "npm", "go", etc.
}
Component represents a software component in the inventory.
type ExitError ¶
type ExitError struct {
Code ExitCode
}
ExitError wraps an ExitCode so commands can signal a non-zero exit without calling os.Exit directly.
type Finding ¶
type Finding struct {
VulnID string `json:"vulnID"`
Aliases []string `json:"aliases,omitempty"`
Severity string `json:"severity"`
CVSS float64 `json:"cvss,omitempty"`
EPSS *float64 `json:"epss,omitempty"`
AIScore *float64 `json:"aiScore,omitempty"`
HasExploit bool `json:"hasExploit,omitempty"`
WildExploited bool `json:"wildExploited,omitempty"`
ComponentRef string `json:"componentRef"`
Fix string `json:"fix,omitempty"`
References []string `json:"references,omitempty"`
Reachability string `json:"reachability,omitempty"`
}
Finding represents a vulnerability finding for a component.
type OutputFormat ¶
type OutputFormat string
OutputFormat specifies the output format for command results.
const ( OutputJSON OutputFormat = "json" OutputTable OutputFormat = "table" OutputSARIF OutputFormat = "sarif" OutputHTML OutputFormat = "html" OutputCycloneDX OutputFormat = "cyclonedx" OutputMarkdown OutputFormat = "markdown" )
type SeverityLevel ¶
type SeverityLevel int
SeverityLevel represents vulnerability severity for policy filtering.
const ( SeverityNone SeverityLevel = iota SeverityLow SeverityMedium SeverityHigh SeverityCritical )
func ParseSeverity ¶
func ParseSeverity(s string) SeverityLevel
ParseSeverity converts a severity string to SeverityLevel (case-insensitive).
func (SeverityLevel) String ¶
func (s SeverityLevel) String() string
String returns the string representation of a SeverityLevel.
Click to show internal directories.
Click to hide internal directories.