Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TrivyClient ¶
type TrivyClient struct{}
TrivyClient struct
func (*TrivyClient) ClearCache ¶
func (c *TrivyClient) ClearCache(ctx context.Context) ([]byte, error)
ClearCache clears local trivy image cache
func (*TrivyClient) UpdateDatabase ¶
func (c *TrivyClient) UpdateDatabase(ctx context.Context) ([]byte, error)
UpdateDatabase fetches the trivy vulnerability database
type TrivyResponse ¶
type TrivyResponse struct { ArtifactName string `json:"ArtifactName"` ArtifactType string `json:"ArtifactType"` Results []struct { Target string `json:"Target"` Vulnerabilities []TrivyVulnerability `json:"Vulnerabilities"` } `json:"Results"` }
TrivyResponse top level struct to unmarshal the required fields from the json output file
type TrivyVulnerability ¶
type TrivyVulnerability struct { VulnerabilityID string `json:"VulnerabilityID"` PkgName string `json:"PkgName"` InstalledVersion string `json:"InstalledVersion"` FixedVersion string `json:"FixedVersion"` Title string `json:"Title"` Description string `json:"Description"` Severity string `json:"Severity"` References []string `json:"References"` }
TrivyVulnerability sub struct to unmarshal the required fields from the json output file
Click to show internal directories.
Click to hide internal directories.