Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetToolVersion ¶
func GetToolVersion(sbom TrivySbomType) string
SBOM accessors for nexted properties
Types ¶
type TrivyCvss ¶
type TrivyCvss struct {
Azure TrivyCvssEntry `json:"azure"`
CblMariner TrivyCvssEntry `json:"cbl-mariner"`
Nvd TrivyCvssEntry `json:"nvd"`
RedHat TrivyCvssEntry `json:"redhat"`
Ubuntu TrivyCvssEntry `json:"ubuntu"`
}
`json:""`
type TrivyCvssEntry ¶
type TrivyDataSource ¶
type TrivyImageConfig ¶
type TrivyLayer ¶
type TrivyMetadata ¶
type TrivyMetadata struct {
ImageId string `json:"ImageID"`
//Size uint64 `json:"Size"`
OS struct {
Famile string `json:"Family"`
Name string `json:"Name"`
EOSL bool `json:"EOSL"`
} `json:"OS"`
RepoTags []string `json:"RepoTags"`
RepoDigests []string `json:"RepoDigests"`
ImageConfig TrivyImageConfig `json:"ImageConfig"`
Layers []TrivyLayer `json:"Layers"`
}
`json:""`
type TrivyPkgIdentifier ¶
type TrivyResult ¶
type TrivyResult struct {
Target string `json:"Target"`
Class string `json:"Class"`
Type string `json:"Type"`
Vulnerabilities []TrivyVulnerability `json:"Vulnerabilities"`
}
type TrivySbomType ¶
func (*TrivySbomType) FromBytes ¶
func (rx *TrivySbomType) FromBytes(input []byte) error
parse []bytes to model
type TrivyScanType ¶
type TrivyScanType struct {
SchemaVersion int `json:"SchemaVersion"`
CreatedAt time.Time `json:"CreatedAt"`
ArtifactName string `json:"ArtifactName"`
ArtifactType string `json:"ArtifactType"`
Metadata TrivyMetadata `json:"Metadata"`
Results []TrivyResult `json:"Results"`
}
func (*TrivyScanType) ListVulnerabilities ¶
func (rx *TrivyScanType) ListVulnerabilities() []TrivyVulnerability
return complete list of vulnerabilities
func (*TrivyScanType) ReadBytes ¶
func (rx *TrivyScanType) ReadBytes(data []byte) error
parse trivy scan
type TrivyVendorSevurity ¶
type TrivyVulnerability ¶
type TrivyVulnerability struct {
VulnerabilityId string `json:"VulnerabilityID"`
PkgId string `json:"PkgID"`
PkgName string `json:"PkgName"`
PkgIdentifier TrivyPkgIdentifier `json:"PkgIdentifier"`
InstalledVersion string `json:"InstalledVersion"`
FixedVersion string `json:"FixedVersion"`
Status string `json:"Status"`
SeveritySource string `json:"SeveritySource"`
PrimaryURL string `json:"PrimaryURL"`
DataSource TrivyDataSource `json:"DataSource"`
Title string `json:"Title"`
Description string `json:"Description"`
Severity string `json:"Severity"`
CweIds []string `json:"CweIDs"`
VendorSecurity TrivyVendorSevurity `json:"VendorSeverity"`
Cvss TrivyCvss `json:"CVSS"`
References []string `json:"References"`
PublishedDate time.Time `json:"PublishedDate"`
LastModifiedDate time.Time `json:"LastModifiedDate"`
}
Click to show internal directories.
Click to hide internal directories.