models

package
v1.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// VulnerabilitySeverityCRITICAL captures enum value "CRITICAL"
	VulnerabilitySeverityCRITICAL string = "CRITICAL"

	// VulnerabilitySeverityHIGH captures enum value "HIGH"
	VulnerabilitySeverityHIGH string = "HIGH"

	// VulnerabilitySeverityMEDIUM captures enum value "MEDIUM"
	VulnerabilitySeverityMEDIUM string = "MEDIUM"

	// VulnerabilitySeverityLOW captures enum value "LOW"
	VulnerabilitySeverityLOW string = "LOW"

	// VulnerabilitySeverityUNKNOWN captures enum value "UNKNOWN"
	VulnerabilitySeverityUNKNOWN string = "UNKNOWN"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationVulnerabilities

type ApplicationVulnerabilities []*EnvironmentVulnerabilities

ApplicationVulnerabilities ApplicationVulnerabilities holds vulnerability scan summaries for an application

swagger:model ApplicationVulnerabilities

func (ApplicationVulnerabilities) ContextValidate

func (m ApplicationVulnerabilities) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this application vulnerabilities based on the context it is used

func (ApplicationVulnerabilities) Validate

func (m ApplicationVulnerabilities) Validate(formats strfmt.Registry) error

Validate validates this application vulnerabilities

type ComponentVulnerabilities

type ComponentVulnerabilities map[string]ImageWithLastScan

ComponentVulnerabilities ComponentVulnerabilities defines a map where key is component or job name and value is a summary of vulnerabilities

swagger:model ComponentVulnerabilities

func (ComponentVulnerabilities) ContextValidate

func (m ComponentVulnerabilities) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this component vulnerabilities based on the context it is used

func (ComponentVulnerabilities) Validate

func (m ComponentVulnerabilities) Validate(formats strfmt.Registry) error

Validate validates this component vulnerabilities

type EnvironmentVulnerabilities

type EnvironmentVulnerabilities struct {

	// Name of environment
	// Example: dev
	// Required: true
	Name *string `json:"name"`

	// components
	Components ComponentVulnerabilities `json:"components,omitempty"`

	// jobs
	Jobs ComponentVulnerabilities `json:"jobs,omitempty"`
}

EnvironmentVulnerabilities EnvironmentVulnerabilities holds vulnerability scan summaries for components and jobs

swagger:model EnvironmentVulnerabilities

func (*EnvironmentVulnerabilities) ContextValidate

func (m *EnvironmentVulnerabilities) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this environment vulnerabilities based on the context it is used

func (*EnvironmentVulnerabilities) MarshalBinary

func (m *EnvironmentVulnerabilities) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*EnvironmentVulnerabilities) UnmarshalBinary

func (m *EnvironmentVulnerabilities) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*EnvironmentVulnerabilities) Validate

func (m *EnvironmentVulnerabilities) Validate(formats strfmt.Registry) error

Validate validates this environment vulnerabilities

type Image

type Image struct {

	// Base image
	// Example: alpine:3.13.2
	BaseImage string `json:"baseImage,omitempty"`

	// Name of image
	// Example: quay.io/oauth2-proxy/oauth2-proxy:v7.1.3
	// Required: true
	ImageName *string `json:"image"`
}

Image Image holds name of image the base image

swagger:model Image

func (*Image) ContextValidate

func (m *Image) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this image based on context it is used

func (*Image) MarshalBinary

func (m *Image) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Image) UnmarshalBinary

func (m *Image) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Image) Validate

func (m *Image) Validate(formats strfmt.Registry) error

Validate validates this image

type ImageScan

type ImageScan struct {

	// Flag indicating if scan succeeded or not
	// Example: true
	// Required: true
	ScanSuccess *bool `json:"scanSuccess"`

	// Date and time of scan
	// Example: 2022-05-05T14:26:45+02:00
	// Required: true
	// Format: date-time
	ScanTime *strfmt.DateTime `json:"scanTime"`

	// List of vulnerabilities
	Vulnerabilities []*Vulnerability `json:"vulnerabilities"`

	// Count of vulnerabilities grouped by severity
	VulnerabilitySummary map[string]int64 `json:"vulnerabilitySummary,omitempty"`
}

ImageScan ImageScan holdes information about a spcific vulnerability scan for an image

swagger:model ImageScan

func (*ImageScan) ContextValidate

func (m *ImageScan) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this image scan based on the context it is used

func (*ImageScan) MarshalBinary

func (m *ImageScan) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ImageScan) UnmarshalBinary

func (m *ImageScan) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ImageScan) Validate

func (m *ImageScan) Validate(formats strfmt.Registry) error

Validate validates this image scan

type ImageWithLastScan

type ImageWithLastScan struct {
	Image

	ImageScan
}

ImageWithLastScan ImageWithLastScan holds information about vulnerabilities found in the last scan for an image

swagger:model ImageWithLastScan

func (*ImageWithLastScan) ContextValidate

func (m *ImageWithLastScan) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this image with last scan based on the context it is used

func (*ImageWithLastScan) MarshalBinary

func (m *ImageWithLastScan) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (ImageWithLastScan) MarshalJSON

func (m ImageWithLastScan) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*ImageWithLastScan) UnmarshalBinary

func (m *ImageWithLastScan) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ImageWithLastScan) UnmarshalJSON

func (m *ImageWithLastScan) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*ImageWithLastScan) Validate

func (m *ImageWithLastScan) Validate(formats strfmt.Registry) error

Validate validates this image with last scan

type Vulnerability

type Vulnerability struct {

	// A list of CVEs referencing the vulnerability
	// Example: ["CVE-2019-18276"]
	CVE []string `json:"cve"`

	// The CVSS value of the vulnerability
	// Example: 7.8
	CVSS float32 `json:"cvss,omitempty"`

	// A list of CWEs referencing the vulnerability
	// Example: ["CWE-273"]
	CWE []string `json:"cwe"`

	// A detailed description of the vulnerability
	// 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,omitempty"`

	// Name of the vulnerabile package
	// Example: bash
	// Required: true
	PackageName *string `json:"packageName"`

	// The date the vulnerability was published
	// Example: 2021-03-26T17:15:00Z
	// Format: date-time
	PublishedDate strfmt.DateTime `json:"publishedDate,omitempty"`

	// A list of URLs with more information about the vulnerability
	// Example: ["https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18276","https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff"]
	References []string `json:"references"`

	// The severity of the vulnerability
	// Example: HIGH
	// Required: true
	// Enum: ["CRITICAL","HIGH","MEDIUM","LOW","UNKNOWN"]
	Severity *string `json:"severity"`

	// Title of the vulnerability
	// Example: bash: when effective UID is not equal to its real UID the saved UID is not dropped
	Title string `json:"title,omitempty"`

	// Version of the affected package
	// Example: 5.0-4
	// Required: true
	Version *string `json:"version"`
}

Vulnerability Vulnerability holds detailed information about a vulnerability

swagger:model Vulnerability

func (*Vulnerability) ContextValidate

func (m *Vulnerability) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this vulnerability based on context it is used

func (*Vulnerability) MarshalBinary

func (m *Vulnerability) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Vulnerability) UnmarshalBinary

func (m *Vulnerability) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Vulnerability) Validate

func (m *Vulnerability) Validate(formats strfmt.Registry) error

Validate validates this vulnerability

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL