Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "v0.0.5-beta.1" SupportedOS = []string{ "ubuntu-2004", "ubuntu-2204", } TrivyVersion = "0.38.3" )
Functions ¶
This section is empty.
Types ¶
type Month ¶
type Month struct {
Reports map[string]ReportData
}
Month is used in reports parsing. It is contained within a Year and contains multiple ReportData(s).
type ReportData ¶
type ReportData struct {
Name string `json:"name"`
ShortName string `json:"short_name"`
SchemaVersion int `json:"schema_version"`
ArtifactName string `json:"artifact_name"`
ArtifactType string `json:"artifact_type"`
Metadata struct {
OS struct {
Family string `json:"family"`
Name string `json:"name"`
} `json:"os"`
ImageConfig struct {
Architecture string `json:"architecture"`
Created time.Time `json:"created"`
Os string `json:"os"`
Rootfs struct {
Type string `json:"type"`
DiffIds interface{} `json:"diff_ids"`
} `json:"rootfs"`
Config struct {
} `json:"config"`
} `json:"ImageConfig"`
} `json:"metadata"`
Results []struct {
Target string `json:"Target"`
Class string `json:"Class"`
Type string `json:"Type,omitempty"`
Vulnerabilities []struct {
VulnerabilityID string `json:"VulnerabilityID"`
PkgName string `json:"PkgName"`
InstalledVersion string `json:"InstalledVersion"`
Layer struct {
} `json:"Layer"`
SeveritySource string `json:"SeveritySource,omitempty"`
PrimaryURL string `json:"PrimaryURL"`
DataSource struct {
ID string `json:"ID"`
Name string `json:"Name"`
URL string `json:"URL"`
} `json:"DataSource"`
Title string `json:"Title,omitempty"`
Description string `json:"Description"`
Severity string `json:"Severity"`
CweIDs []string `json:"CweIDs,omitempty"`
CVSS struct {
Nvd struct {
V2Vector string `json:"V2Vector,omitempty"`
V3Vector string `json:"V3Vector,omitempty"`
V2Score float64 `json:"V2Score,omitempty"`
V3Score float64 `json:"V3Score,omitempty"`
} `json:"nvd,omitempty"`
Redhat struct {
V3Vector string `json:"V3Vector,omitempty"`
V3Score float64 `json:"V3Score,omitempty"`
V2Vector string `json:"V2Vector,omitempty"`
V2Score float64 `json:"V2Score,omitempty"`
} `json:"redhat,omitempty"`
Ghsa struct {
V3Vector string `json:"V3Vector"`
V3Score float64 `json:"V3Score"`
} `json:"ghsa,omitempty"`
} `json:"CVSS,omitempty"`
References []string `json:"References"`
PublishedDate time.Time `json:"PublishedDate,omitempty"`
LastModifiedDate time.Time `json:"LastModifiedDate,omitempty"`
PkgPath string `json:"PkgPath,omitempty"`
FixedVersion string `json:"FixedVersion,omitempty"`
} `json:"Vulnerabilities,omitempty"`
Secrets []struct {
RuleID string `json:"RuleID"`
Category string `json:"Category"`
Severity string `json:"Severity"`
Title string `json:"Title"`
StartLine int `json:"StartLine"`
EndLine int `json:"EndLine"`
Code struct {
Lines []struct {
Number int `json:"Number"`
Content string `json:"Content"`
IsCause bool `json:"IsCause"`
Annotation string `json:"Annotation"`
Truncated bool `json:"Truncated"`
Highlighted string `json:"Highlighted,omitempty"`
FirstCause bool `json:"FirstCause"`
LastCause bool `json:"LastCause"`
} `json:"Lines"`
} `json:"Code"`
Match string `json:"Match"`
Deleted bool `json:"Deleted"`
Layer struct {
} `json:"Layer"`
} `json:"Secrets,omitempty"`
} `json:"Results"`
}
ReportData is a struct representation of a report that is generated by Trivy. It is used for parsing and generating the static sites.
Click to show internal directories.
Click to hide internal directories.