types

package
v0.0.0-...-c30fbfa Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceTypeToModels

func ResourceTypeToModels(typ ResourceType) models.ResourceType

Types

type ApplicationVulnerabilityScan

type ApplicationVulnerabilityScan struct {
	// resources
	Resources []*ResourceVulnerabilityScan `json:"resources"`
}

func ApplicationVulnerabilityScanFromRuntimeScan

func ApplicationVulnerabilityScanFromRuntimeScan(scanResults []*_types.ImageScanResult) *ApplicationVulnerabilityScan

type AttackComplexity

type AttackComplexity string
const (
	// AttackComplexityLOW captures enum value "LOW".
	AttackComplexityLOW AttackComplexity = "LOW"

	// AttackComplexityHIGH captures enum value "HIGH".
	AttackComplexityHIGH AttackComplexity = "HIGH"
)

type AttackVector

type AttackVector string
const (

	// AttackVectorNETWORK captures enum value "NETWORK".
	AttackVectorNETWORK AttackVector = "NETWORK"

	// AttackVectorADJACENT captures enum value "ADJACENT".
	AttackVectorADJACENT AttackVector = "ADJACENT"

	// AttackVectorLOCAL captures enum value "LOCAL".
	AttackVectorLOCAL AttackVector = "LOCAL"

	// AttackVectorPHYSICAL captures enum value "PHYSICAL".
	AttackVectorPHYSICAL AttackVector = "PHYSICAL"
)

type Availability

type Availability string
const (

	// AvailabilityNONE captures enum value "NONE".
	AvailabilityNONE Availability = "NONE"

	// AvailabilityLOW captures enum value "LOW".
	AvailabilityLOW Availability = "LOW"

	// AvailabilityHIGH captures enum value "HIGH".
	AvailabilityHIGH Availability = "HIGH"
)

type CISDockerBenchmarkResult

type CISDockerBenchmarkResult struct {
	Code         string `json:"code,omitempty"`
	Level        int64  `json:"level,omitempty"`
	Descriptions string `json:"descriptions"`
}

func CISDockerBenchmarkResultsFromBackendAPI

func CISDockerBenchmarkResultsFromBackendAPI(in []*models.CISDockerBenchmarkCodeInfo) []*CISDockerBenchmarkResult

type CVSS

type CVSS struct {
	// cvss v3 metrics
	CvssV3Metrics *CVSSV3Metrics `json:"cvssV3Metrics,omitempty"`

	// cvss v3 vector
	CvssV3Vector *CVSSV3Vector `json:"cvssV3Vector,omitempty"`
}

func (*CVSS) GetBaseScore

func (c *CVSS) GetBaseScore() float64

func (*CVSS) GetCVSSSeverity

func (c *CVSS) GetCVSSSeverity() models.VulnerabilitySeverity

func (*CVSS) ToCVSSBackendAPI

func (c *CVSS) ToCVSSBackendAPI() *models.CVSS

type CVSSV3Metrics

type CVSSV3Metrics struct {
	// base score
	BaseScore float64 `json:"baseScore,omitempty"`

	// exploitability score
	ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`

	// impact score
	ImpactScore float64 `json:"impactScore,omitempty"`
}

type CVSSV3Vector

type CVSSV3Vector struct {
	// attack complexity
	AttackComplexity AttackComplexity `json:"attackComplexity,omitempty"`

	// attack vector
	AttackVector AttackVector `json:"attackVector,omitempty"`

	// availability
	Availability Availability `json:"availability,omitempty"`

	// confidentiality
	Confidentiality Confidentiality `json:"confidentiality,omitempty"`

	// integrity
	Integrity Integrity `json:"integrity,omitempty"`

	// privileges required
	PrivilegesRequired PrivilegesRequired `json:"privilegesRequired,omitempty"`

	// scope
	Scope Scope `json:"scope,omitempty"`

	// user interaction
	UserInteraction UserInteraction `json:"userInteraction,omitempty"`

	// vector
	Vector string `json:"vector,omitempty"`
}

type Confidentiality

type Confidentiality string
const (

	// ConfidentialityNONE captures enum value "NONE".
	ConfidentialityNONE Confidentiality = "NONE"

	// ConfidentialityLOW captures enum value "LOW".
	ConfidentialityLOW Confidentiality = "LOW"

	// ConfidentialityHIGH captures enum value "HIGH".
	ConfidentialityHIGH Confidentiality = "HIGH"
)

type Integrity

type Integrity string
const (

	// IntegrityNONE captures enum value "NONE".
	IntegrityNONE Integrity = "NONE"

	// IntegrityLOW captures enum value "LOW".
	IntegrityLOW Integrity = "LOW"

	// IntegrityHIGH captures enum value "HIGH".
	IntegrityHIGH Integrity = "HIGH"
)

type PackageInfo

type PackageInfo struct {
	// language
	Language string `json:"language,omitempty"`

	// license
	License string `json:"license,omitempty"`

	// name
	Name string `json:"name,omitempty"`

	// version
	Version string `json:"version,omitempty"`
}

func PkgFromBackendAPI

func PkgFromBackendAPI(info *models.PackageInfo) *PackageInfo

func PkgFromRuntimeScan

func PkgFromRuntimeScan(info *runtime_scan_models.PackageInfo) *PackageInfo

type PackageVulnerabilityScan

type PackageVulnerabilityScan struct {
	// cvss
	Cvss *CVSS `json:"cvss,omitempty"`

	// description
	Description string `json:"description,omitempty"`

	// fix version
	FixVersion string `json:"fixVersion,omitempty"`

	// links
	Links []string `json:"links"`

	// package
	Package *PackageInfo `json:"package,omitempty"`

	// scanners
	Scanners []string `json:"scanners"`

	// severity
	Severity VulnerabilitySeverity `json:"severity,omitempty"`

	// vulnerability name
	VulnerabilityName string `json:"vulnerabilityName,omitempty"`
}

func PackageVulnerabilitiesScanFromBackendAPI

func PackageVulnerabilitiesScanFromBackendAPI(in []*models.PackageVulnerabilityScan) []*PackageVulnerabilityScan

type PrivilegesRequired

type PrivilegesRequired string
const (

	// PrivilegesRequiredNONE captures enum value "NONE".
	PrivilegesRequiredNONE PrivilegesRequired = "NONE"

	// PrivilegesRequiredLOW captures enum value "LOW".
	PrivilegesRequiredLOW PrivilegesRequired = "LOW"

	// PrivilegesRequiredHIGH captures enum value "HIGH".
	PrivilegesRequiredHIGH PrivilegesRequired = "HIGH"
)

type ResourceInfo

type ResourceInfo struct {
	// resource hash
	ResourceHash string `json:"resourceHash,omitempty"`

	// resource name
	ResourceName string `json:"resourceName,omitempty"`

	// resource type
	ResourceType ResourceType `json:"resourceType,omitempty"`
}

func ResourceInfoFromBackendAPI

func ResourceInfoFromBackendAPI(in *models.ResourceInfo) *ResourceInfo

func ResourceInfoFromRuntimeScan

func ResourceInfoFromRuntimeScan(in *runtime_scan_models.ResourceInfo) *ResourceInfo

type ResourceType

type ResourceType string
const (

	// ResourceTypeIMAGE captures enum value "IMAGE".
	ResourceTypeIMAGE ResourceType = "IMAGE"

	// ResourceTypeDIRECTORY captures enum value "DIRECTORY".
	ResourceTypeDIRECTORY ResourceType = "DIRECTORY"

	// ResourceTypeFILE captures enum value "FILE".
	ResourceTypeFILE ResourceType = "FILE"
)

type ResourceVulnerabilityScan

type ResourceVulnerabilityScan struct {
	// cis docker benchmark results
	CisDockerBenchmarkResults []*CISDockerBenchmarkResult `json:"cisDockerBenchmarkResults"`

	// package vulnerabilities
	PackageVulnerabilities []*PackageVulnerabilityScan `json:"packageVulnerabilities"`

	// resource
	Resource *ResourceInfo `json:"resource,omitempty"`
}

type Scope

type Scope string
const (

	// ScopeUNCHANGED captures enum value "UNCHANGED".
	ScopeUNCHANGED Scope = "UNCHANGED"

	// ScopeCHANGED captures enum value "CHANGED".
	ScopeCHANGED Scope = "CHANGED"
)

type UserInteraction

type UserInteraction string
const (

	// UserInteractionNONE captures enum value "NONE".
	UserInteractionNONE UserInteraction = "NONE"

	// UserInteractionREQUIRED captures enum value "REQUIRED".
	UserInteractionREQUIRED UserInteraction = "REQUIRED"
)

type VulnerabilitySeverity

type VulnerabilitySeverity string
const (

	// VulnerabilitySeverityCRITICAL captures enum value "CRITICAL".
	VulnerabilitySeverityCRITICAL VulnerabilitySeverity = "CRITICAL"

	// VulnerabilitySeverityHIGH captures enum value "HIGH".
	VulnerabilitySeverityHIGH VulnerabilitySeverity = "HIGH"

	// VulnerabilitySeverityMEDIUM captures enum value "MEDIUM".
	VulnerabilitySeverityMEDIUM VulnerabilitySeverity = "MEDIUM"

	// VulnerabilitySeverityLOW captures enum value "LOW".
	VulnerabilitySeverityLOW VulnerabilitySeverity = "LOW"

	// VulnerabilitySeverityNEGLIGIBLE captures enum value "NEGLIGIBLE".
	VulnerabilitySeverityNEGLIGIBLE VulnerabilitySeverity = "NEGLIGIBLE"
)

Jump to

Keyboard shortcuts

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