bean

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BLOCK       string = "BLOCK"
	WHITELISTED        = "WHITELISTED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageScanExecutionDetail

type ImageScanExecutionDetail struct {
	ImageScanDeployInfoId int                `json:"imageScanDeployInfoId"`
	AppId                 int                `json:"appId,omitempty"`
	EnvId                 int                `json:"envId,omitempty"`
	AppName               string             `json:"appName,omitempty"`
	EnvName               string             `json:"envName,omitempty"`
	ArtifactId            int                `json:"artifactId,omitempty"`
	Image                 string             `json:"image,omitempty"`
	PodName               string             `json:"podName,omitempty"`
	ReplicaSet            string             `json:"replicaSet,omitempty"`
	Vulnerabilities       []*Vulnerabilities `json:"vulnerabilities,omitempty"`
	SeverityCount         *SeverityCount     `json:"severityCount,omitempty"`
	ExecutionTime         time.Time          `json:"executionTime,omitempty"`
	ScanEnabled           bool               `json:"scanEnabled,notnull"`
	Scanned               bool               `json:"scanned,notnull"`
	ObjectType            string             `json:"objectType,notnull"`
	ScanToolId            int                `json:"scanToolId,omitempty""`
}

type ImageScanFilter

type ImageScanFilter struct {
	Offset  int    `json:"offset"`
	Size    int    `json:"size"`
	CVEName string `json:"cveName"`
	AppName string `json:"appName"`
	// ObjectName deprecated
	ObjectName     string    `json:"objectName"`
	EnvironmentIds []int     `json:"envIds"`
	ClusterIds     []int     `json:"clusterIds"`
	Severity       []int     `json:"severity"`
	SortOrder      SortOrder `json:"sortOrder"`
	SortBy         SortBy    `json:"sortBy"` // sort by objectName,envName,lastChecked
}

type ImageScanHistoryListingResponse

type ImageScanHistoryListingResponse struct {
	Offset                   int                         `json:"offset"`
	Size                     int                         `json:"size"`
	Total                    int                         `json:"total"`
	ImageScanHistoryResponse []*ImageScanHistoryResponse `json:"scanList"`
}

type ImageScanHistoryResponse

type ImageScanHistoryResponse struct {
	ImageScanDeployInfoId int            `json:"imageScanDeployInfoId"`
	AppId                 int            `json:"appId"`
	EnvId                 int            `json:"envId"`
	Name                  string         `json:"name"`
	Type                  string         `json:"type"`
	Environment           string         `json:"environment"`
	LastChecked           *time.Time     `json:"lastChecked"`
	Image                 string         `json:"image,omitempty"`
	SeverityCount         *SeverityCount `json:"severityCount,omitempty"`
}

type ImageScanRequest

type ImageScanRequest struct {
	ScanExecutionId       int    `json:"ScanExecutionId"`
	ImageScanDeployInfoId int    `json:"imageScanDeployInfo"`
	AppId                 int    `json:"appId"`
	EnvId                 int    `json:"envId"`
	ObjectId              int    `json:"objectId"`
	ArtifactId            int    `json:"artifactId"`
	Image                 string `json:"image"`
	ImageScanFilter
}

type SeverityCount

type SeverityCount struct {
	Critical int `json:"critical"`
	High     int `json:"high"`
	Medium   int `json:"medium"`
	Low      int `json:"low"`
	Unknown  int `json:"unknown"`
}

type SortBy

type SortBy string

type SortOrder

type SortOrder string
const (
	Asc  SortOrder = "ASC"
	Desc SortOrder = "DESC"
)

type Vulnerabilities

type Vulnerabilities struct {
	CVEName    string `json:"cveName"`
	Severity   string `json:"severity"`
	Package    string `json:"package,omitempty"`
	CVersion   string `json:"currentVersion"`
	FVersion   string `json:"fixedVersion"`
	Permission string `json:"permission"`
	Target     string `json:"target"`
	Class      string `json:"class"`
	Type       string `json:"type"`
}

func (*Vulnerabilities) IsCritical

func (vul *Vulnerabilities) IsCritical() bool

func (*Vulnerabilities) IsHigh

func (vul *Vulnerabilities) IsHigh() bool

func (*Vulnerabilities) IsLow

func (vul *Vulnerabilities) IsLow() bool

func (*Vulnerabilities) IsMedium

func (vul *Vulnerabilities) IsMedium() bool

func (*Vulnerabilities) IsUnknown

func (vul *Vulnerabilities) IsUnknown() bool

Jump to

Keyboard shortcuts

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