Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSpec ¶
FormatSpec returns the format string for CLI display.
func NormalizeFormat ¶
NormalizeFormat maps user-facing format names to spec versions or output type. Returns (specVersion, isRawJSON).
func ValidSpecVersions ¶
func ValidSpecVersions() []string
ValidSpecVersions returns the list of supported CycloneDX spec versions.
Types ¶
type Advisory ¶
type Advisory struct {
URL string `json:"url,omitempty"`
}
Advisory is an external advisory reference.
type Affect ¶
type Affect struct {
Ref string `json:"ref"`
}
Affect identifies a component affected by a vulnerability.
type Analysis ¶
type Analysis struct {
State string `json:"state,omitempty"`
}
Analysis contains vulnerability analysis state.
type BOM ¶
type BOM struct {
BOMFormat string `json:"bomFormat"`
SpecVersion string `json:"specVersion"`
SerialNumber string `json:"serialNumber"`
Version int `json:"version"`
Metadata *Metadata `json:"metadata,omitempty"`
Components []Component `json:"components,omitempty"`
Vulnerabilities []Vulnerability `json:"vulnerabilities,omitempty"`
}
BOM is the top-level CycloneDX Bill of Materials.
func BuildFromScanTasks ¶
BuildFromScanTasks creates a CycloneDX BOM from completed scan tasks.
type Component ¶
type Component struct {
Type string `json:"type"`
BOMRef string `json:"bom-ref,omitempty"`
Name string `json:"name"`
Version string `json:"version,omitempty"`
Scope string `json:"scope,omitempty"`
Purl string `json:"purl,omitempty"`
Properties []Property `json:"properties,omitempty"`
}
Component represents a software component.
type Rating ¶
type Rating struct {
Score float64 `json:"score"`
Severity string `json:"severity,omitempty"`
Method string `json:"method,omitempty"`
Source *Source `json:"source,omitempty"`
}
Rating is a vulnerability scoring entry.
type Tools ¶
type Tools struct {
Components []Component `json:"components,omitempty"`
}
Tools holds tool information in CycloneDX format.
type Vulnerability ¶
type Vulnerability struct {
BOMRef string `json:"bom-ref,omitempty"`
ID string `json:"id"`
Source *Source `json:"source,omitempty"`
Ratings []Rating `json:"ratings,omitempty"`
Description string `json:"description,omitempty"`
Affects []Affect `json:"affects,omitempty"`
Analysis *Analysis `json:"analysis,omitempty"`
Properties []Property `json:"properties,omitempty"`
Advisories []Advisory `json:"advisories,omitempty"`
}
Vulnerability represents a CycloneDX vulnerability entry.