Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVSSDetails ¶ added in v0.17.0
type Capability ¶
type Error ¶
Error holds the information about an error, including metadata about its JSON structure.
type ScanReport ¶
type ScanRequest ¶
func (ScanRequest) GetImageRef ¶
func (c ScanRequest) GetImageRef() (imageRef string, insecureRegistry bool, err error)
GetImageRef returns Docker image reference for this ScanRequest. Example: core.harbor.domain/scanners/mysql@sha256:3b00a364fb74246ca119d16111eb62f7302b2ff66d51e373c2bb209f8a1f3b9e
type ScanResponse ¶
type ScanResponse struct {
ID string `json:"id"`
}
type ScannerAdapterMetadata ¶
type ScannerAdapterMetadata struct { Scanner Scanner `json:"scanner"` Capabilities []Capability `json:"capabilities"` Properties map[string]string `json:"properties"` }
type Severity ¶
type Severity int64
Severity represents the severity of a image/component in terms of vulnerability.
const ( SevUnknown Severity SevLow SevMedium SevHigh SevCritical )
Sevxxx is the list of severity of image after scanning.
func (Severity) MarshalJSON ¶
MarshalJSON marshals the Severity enum value as a quoted JSON string.
func (*Severity) UnmarshalJSON ¶
UnmarshalJSON unmarshals quoted JSON string to the Severity enum value.
type VulnerabilityItem ¶
type VulnerabilityItem struct { ID string `json:"id"` Pkg string `json:"package"` Version string `json:"version"` FixVersion string `json:"fix_version,omitempty"` Severity Severity `json:"severity"` Description string `json:"description"` Links []string `json:"links"` Layer *Layer `json:"layer"` // Not defined by Scanners API PreferredCVSS *CVSSDetails `json:"preferred_cvss,omitempty"` CweIDs []string `json:"cwe_ids,omitempty"` VendorAttributes map[string]interface{} `json:"vendor_attributes,omitempty"` }
VulnerabilityItem is an item in the vulnerability result returned by vulnerability details API.