Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationVulnerabilities ¶
type ApplicationVulnerabilities []*EnvironmentVulnerabilities
ApplicationVulnerabilities holds vulnerability scan summaries for an application
swagger:model ApplicationVulnerabilities
type ComponentVulnerabilities ¶
type ComponentVulnerabilities map[string]ImageWithLastScan
ComponentVulnerabilities defines a map where key is component or job name and value is a summary of vulnerabilities
type EnvironmentVulnerabilities ¶
type EnvironmentVulnerabilities struct { // Name of environment // // required: true // Example: dev Name string `json:"name"` // Information about component vulnerabilities // // required: false Components ComponentVulnerabilities `json:"components"` // Information about job vulnerabilities // // required: false Jobs ComponentVulnerabilities `json:"jobs"` }
EnvironmentVulnerabilities holds vulnerability scan summaries for components and jobs
swagger:model EnvironmentVulnerabilities
type Image ¶
type Image struct { // Name of image // // required: true // Example: quay.io/oauth2-proxy/oauth2-proxy:v7.1.3 ImageName string `json:"image"` // Base image // // required: false // Example: alpine:3.13.2 BaseImage string `json:"baseImage"` }
Image holds name of image the base image
swagger:model Image
type ImageScan ¶
type ImageScan struct { // Date and time of scan // // required: true // Example: 2022-05-05T14:26:45+02:00 ScanTime time.Time `json:"scanTime"` // Flag indicating if scan succeeded or not // // required: true // Example: true ScanSuccess bool `json:"scanSuccess"` // Count of vulnerabilities grouped by severity // // required: false VulnerabilitySummary map[string]int `json:"vulnerabilitySummary,omitempty"` // List of vulnerabilities // // required: false Vulnerabilities []Vulnerability `json:"vulnerabilities,omitempty"` }
ImageScan holdes information about a spcific vulnerability scan for an image
swagger:model ImageScan
type ImageWithLastScan ¶
type ImageWithLastScan struct { // Image holds information about the image // swagger:allOf Image // ImageScan holds information about the last scan // swagger:allOf *ImageScan }
ImageWithLastScan holds information about vulnerabilities found in the last scan for an image
swagger:model ImageWithLastScan
type Vulnerability ¶
type Vulnerability struct { // Name of the vulnerabile package // // required: true // example: bash PackageName string `json:"packageName"` // Version of the affected package // // required: true // example: 5.0-4 Version string `json:"version"` // Title of the vulnerability // // required: false // example: bash: when effective UID is not equal to its real UID the saved UID is not dropped Title string `json:"title"` // A detailed description of the vulnerability // // required: false // example: An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID... Description string `json:"description"` // The severity of the vulnerability // // required: true // Enum: CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN // example: HIGH Severity string `json:"severity"` // The date the vulnerability was published // // required: false // format: date-time // example: 2021-03-26T17:15:00Z PublishedDate time.Time `json:"publishedDate"` // A list of CWEs referencing the vulnerability // // required: false // type: "array" // example: ["CWE-273"] CWE []string `json:"cwe"` // A list of CVEs referencing the vulnerability // // required: false // type: "array" // example: ["CVE-2019-18276"] CVE []string `json:"cve"` // The CVSS value of the vulnerability // // required: false // example: 7.8 CVSS *float32 `json:"cvss"` // A list of URLs with more information about the vulnerability // // required: false // type: "array" // example: ["https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18276","https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff"] References []string `json:"references"` }
Vulnerability holds detailed information about a vulnerability
swagger:model Vulnerability
func (*Vulnerability) FromDto ¶
func (m *Vulnerability) FromDto(dto *repositoryModels.VulnerabilityDto)
FromDto populates the Vulnerability object with values from VulnerabilityDto