apis

package
v0.0.777 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 13 modules, 28 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	VulnerabilityScanCommandVersion   string = "v1"
	ApplicationProfileScanCommandPath string = "scanApplicationProfile"
	ContainerScanCommandPath          string = "scanImage"
	RegistryScanCommandPath           string = "scanRegistryImage"
	SBOMCalculationCommandPath        string = "generateSBOM"
	DBCommandPath                     string = "DBCommand"
	ServerReady                       string = "ready"
)

WebsocketScanCommand api

View Source
const (
	CommandDeprecatedArgsJobParams string = "kubescapeJobParams"
)

Variables

This section is empty.

Functions

func BEHttpRequest

func BEHttpRequest(loginobj *LoginObject, beURL,
	httpverb string,
	endpoint string,
	payload []byte,
	f HTTPReqFunc,
	qryData interface{}) ([]byte, error)

func BackendGetCVEExceptionByDEsignator

func BackendGetCVEExceptionByDEsignator(baseURL string, cusGUID string, designators *identifiers.PortalDesignator) ([]armotypes.VulnerabilityExceptionPolicy, error)

func BasicBEQuery

func BasicBEQuery(req *http.Request, qryData interface{})

func EmptyQuery

func EmptyQuery(req *http.Request, qryData interface{})

func GetBEInfo

func GetBEInfo(cfgFile string) string

func GetOauth2TokenURL

func GetOauth2TokenURL() string

func LoginWithKeycloak

func LoginWithKeycloak(loginDetails CustomerLoginDetails) ([]uuid.UUID, *oidc.IDToken, error)

func MapQuery

func MapQuery(req *http.Request, qryData interface{})

func MapQueryWithoutSortKeys

func MapQueryWithoutSortKeys(req *http.Request, qryData interface{})

func SIDFallback

func SIDFallback(c *Command)

func ValidateBEConnectorMakerInput

func ValidateBEConnectorMakerInput(client *http.Client, baseURL string, loginDetails *CustomerLoginDetails) error

func ValidatePublicBEConnectorMakerInput

func ValidatePublicBEConnectorMakerInput(client *http.Client, baseURL string) error

Types

type AuthenticationCookie

type AuthenticationCookie struct {
	Oauth2Claims  `json:",inline"`
	CustomerGUID  uuid.UUID `json:"customerGuid"`
	Expires       time.Time `json:"expires"`
	Version       int       `json:"version"`
	Authorization string    `json:"authorization,omitempty"`
}

AuthenticationCookie is what it is

type BELoginResponse

type BELoginResponse struct {
	Name              string `json:"name"`
	PreferredUsername string `json:"preferred_username"`
	Email             string `json:"email"`
	CustomerGuid      string `json:"customerGuid"`
	Expires           string `json:"expires"`
	Authorization     string `json:"authorization"`
	Cookies           []*http.Cookie
}

func BELogin

func BELogin(loginDetails *CustomerLoginDetails, login string, cfg string) (*BELoginResponse, error)

func (*BELoginResponse) ToLoginObject

func (r *BELoginResponse) ToLoginObject() *LoginObject

type BackendConnector

type BackendConnector struct {
	BaseURL         string
	BELoginResponse *BELoginResponse
	Credentials     *CustomerLoginDetails
	HTTPClient      *http.Client
}

func MakeBackendConnector

func MakeBackendConnector(client *http.Client, baseURL string, loginDetails *CustomerLoginDetails) (*BackendConnector, error)

func MakePublicBackendConnector

func MakePublicBackendConnector(baseURL string) (*BackendConnector, error)

func (*BackendConnector) GetBaseURL

func (r *BackendConnector) GetBaseURL() string

func (*BackendConnector) GetClient

func (r *BackendConnector) GetClient() *http.Client

func (*BackendConnector) GetLoginObj

func (r *BackendConnector) GetLoginObj() *LoginObject

func (*BackendConnector) HTTPSend

func (r *BackendConnector) HTTPSend(httpverb string,
	endpoint string,
	payload []byte,
	f HTTPReqFunc,
	login bool,
	qryData interface{}) ([]byte, error)

func (*BackendConnector) IsExpired

func (r *BackendConnector) IsExpired() bool

func (*BackendConnector) Login

func (r *BackendConnector) Login() error

type Command

type Command struct {
	// Name of the command
	//
	// Example: updateRules
	CommandName NotificationPolicyType `json:"commandName"`
	// ID of the response
	//
	// Example: 49cfe0a0-9fab-4e54-a6e4-7b27e566d3cd
	ResponseID string `json:"responseID,omitempty"`

	// Designators for the command
	//
	// Designators select the targets to which the command applies.
	Designators []identifiers.PortalDesignator `json:"designators,omitempty"`
	Wlid        string                         `json:"wlid,omitempty"`
	WildWlid    string                         `json:"wildWlid,omitempty"`
	Sid         string                         `json:"sid,omitempty"`
	WildSid     string                         `json:"wildSid,omitempty"`
	// Job tracking context for
	JobTracking JobTracking `json:"jobTracking,omitempty"`

	// Arguments for the command
	Args map[string]interface{} `json:"args,omitempty"`
}

Command describes an individual command for the in-cluster components

func (*Command) DeepCopy

func (c *Command) DeepCopy() *Command

func (*Command) GetArg

func (c *Command) GetArg(key string) interface{}

func (*Command) GetCronJobParams

func (c *Command) GetCronJobParams() *CronJobParams

func (*Command) GetFieldSelector

func (c *Command) GetFieldSelector() map[string]string

func (*Command) GetID

func (c *Command) GetID() string

func (*Command) GetLabels

func (c *Command) GetLabels() map[string]string

func (*Command) Json

func (c *Command) Json() string

func (*Command) SetArg

func (c *Command) SetArg(key string, value interface{})

func (*Command) SetCronJobParams

func (c *Command) SetCronJobParams(cjParams CronJobParams)

func (*Command) SetFieldSelector

func (c *Command) SetFieldSelector(labels map[string]string)

func (*Command) SetLabels

func (c *Command) SetLabels(labels map[string]string)

type Commands

type Commands struct {
	// A list of commands to execute
	//
	// Example: [ { "CommandName": "scanRegistry", "args": { "registryInfo-v1": { "registryName": "quay.io/armosec" } } } ]
	Commands []Command `json:"commands"`
}

Commands contains a collection of commands for the in-cluster components

type Connector

type Connector interface {

	//may used for a more generic httpsend interface based method
	GetBaseURL() string
	GetLoginObj() *LoginObject
	GetClient() *http.Client

	Login() error
	IsExpired() bool

	HTTPSend(httpverb string,
		endpoint string,
		payload []byte,
		f HTTPReqFunc,
		qryData interface{}) ([]byte, error)
}

Connector - interface for any connector (BE/Portal and so on)

type CronJobParams

type CronJobParams struct {
	CronTabSchedule string `json:"cronTabSchedule"`
	JobName         string `json:"name,omitempty"`
}

CronJobParams parmas for cronJob

type CustomerLoginDetails

type CustomerLoginDetails struct {
	Email        string    `json:"email"`
	Password     string    `json:"password"`
	CustomerName string    `json:"customer,omitempty"`
	CustomerGUID uuid.UUID `json:"customerGuid,omitempty"`
}

CustomerLoginDetails is what it is

type DBCommand

type DBCommand struct {
	Commands map[string]interface{} `json:"commands"`
}

type HTTPReqFunc

type HTTPReqFunc func(req *http.Request, qryData interface{})

HTTPReqFunc allows you to insert query params and more to aggregation message while using update aggregator

type ImageScanCommand added in v0.0.176

type ImageScanCommand interface {
	GetWlid() string
	GetImageHash() string
	GetCreds() *registry.AuthConfig
	GetCredentialsList() []registry.AuthConfig
	SetCredentialsList([]registry.AuthConfig)
	GetArgs() map[string]interface{}
	SetArgs(map[string]interface{})
	GetSession() SessionChain
	SetSession(SessionChain)
	GetImageTag() string
	SetImageTag(string)
	GetJobID() string
	SetJobID(string)
	GetParentJobID() string
	SetParentJobID(string)
}

type ImageScanParams added in v0.0.176

type ImageScanParams struct {
	// A list of credentials for private Container Registries that store images to be scanned
	Credentialslist []registry.AuthConfig `json:"credentialsList,omitempty"`
	// Arguments to pass to the scan command
	//
	// Example: {"useHTTP": true, "skipTLSVerify": true, "registryName": "", "repository": "", "tag": ""}
	Args map[string]interface{} `json:"args,omitempty"`
	// Current session context
	//
	// Used for correlating requests in the logs.
	Session SessionChain `json:"session,omitempty"`
	// Tag of the image to scan
	//
	// Example: nginx:latest
	ImageTag string `json:"imageTag"`
	// ID of the scanning Job
	//
	// Example: 7b04592b-665a-4e47-a9c9-65b2b3cabb49
	JobID string `json:"jobID,omitempty"`
	// ID of the Parent Job — a job that initiated the current job
	//
	// Example: 825f0a9e-34a9-4727-b81a-6e1bf3a63725
	ParentJobID string `json:"parentJobID,omitempty"`
}

type JobTracking

type JobTracking struct {
	// ID of the current job
	//
	// Example: 0f2c8611-ba99-40e5-af21-2bc3823e3283
	JobID string `json:"jobID,omitempty"`
	// ID of the parent job
	//
	// Example: 6ecfe560-104c-4e7b-8cd3-ee3cbc3b58fb
	ParentID string `json:"parentAction,omitempty"`
	// Number of the last action
	//
	// Example: 2
	LastActionNumber int `json:"numSeq,omitempty"`
	// Timestamp of the latest action
	Timestamp time.Time `json:"timestamp,omitempty"`
}

JobTracking describes a context in which the job is executing It is used to track job execution source and context: what spawned it, when and under what circumstances.

type LoginAux

type LoginAux struct {
	Referer string
	Url     string
}

func GetLoginStruct

func GetLoginStruct() (LoginAux, error)

type LoginObject

type LoginObject struct {
	Authorization string `json:"authorization"`
	GUID          string
	Cookies       []*http.Cookie
	Expires       string
}

func Login

func Login(loginDetails CustomerLoginDetails) (*LoginObject, error)

func (*LoginObject) IsExpired

func (r *LoginObject) IsExpired() bool

type NotificationPolicyType

type NotificationPolicyType string

Supported NotificationTypes

swagger:enum NotificationPolicyType

const (
	TypeValidateRules NotificationPolicyType = "validateRules"
	// Execute a posture scan
	TypeExecPostureScan NotificationPolicyType = "execPostureScan"
	TypeUpdateRules     NotificationPolicyType = "updateRules"
	TypeRunKubescapeJob NotificationPolicyType = "runKubescapeJob"
	// Trigger a Kubescape scan
	TypeRunKubescape NotificationPolicyType = "kubescapeScan"
	// Create a CronJob that runs a Kubescape scan
	TypeSetKubescapeCronJob NotificationPolicyType = "setKubescapeCronJob"
	// Update a CronJob that runs a Kubescape scan
	TypeUpdateKubescapeCronJob NotificationPolicyType = "updateKubescapeCronJob"
	// Delete a CronJob that runs a Kubescape scan
	TypeDeleteKubescapeCronJob NotificationPolicyType = "deleteKubescapeCronJob"
	// Create a CronJob that runs a Vulnerability Scan
	TypeSetVulnScanCronJob NotificationPolicyType = "setVulnScanCronJob"
	// Update a CronJob that runs a Vulnerability Scan
	TypeUpdateVulnScanCronJob NotificationPolicyType = "updateVulnScanCronJob"
	// Delete a CronJob that runs a Vulnerability Scan
	TypeDeleteVulnScanCronJob NotificationPolicyType = "deleteVulnScanCronJob"
	// Trigger an image scan
	TypeScanImages NotificationPolicyType = "scan"
	// Trigger an Application Profile scan
	TypeScanApplicationProfile NotificationPolicyType = "scanApplicationProfile"
	// Trigger a relevancy image scan
	TypeCalculateSBOM NotificationPolicyType = "calculateSBOM"
	// Trigger a registry scan
	TypeScanRegistry NotificationPolicyType = "scanRegistry"
	// Trigger a v2 registry scan
	TypeScanRegistryV2 NotificationPolicyType = "scanRegistryV2"
	// Create a CronJob that runs registry scans
	TypeSetRegistryScanCronJob NotificationPolicyType = "setRegistryScanCronJob"
	// Update a CronJob that runs registry scans
	TypeUpdateRegistryScanCronJob NotificationPolicyType = "updateRegistryScanCronJob"
	// Delete a CronJob that runs registry scans
	TypeDeleteRegistryScanCronJob NotificationPolicyType = "deleteRegistryScanCronJob"
	TypeTestRegistryConnectivity  NotificationPolicyType = "testRegistryConnectivity"
	// Trigger an operator cluster operation (post-scan remediation, e.g.
	// annotate/quarantine/cordon). The concrete operation is carried in
	// Command.Args as an OperatorActionArgs; see operatoraction.go.
	TypeOperatorAction NotificationPolicyType = "operatorAction"
)

type Oauth2Claims

type Oauth2Claims struct {
	Sub               string   `json:"sub"`
	Name              string   `json:"name"`
	PreferredUserName string   `json:"preferred_username"`
	CAGroups          []string `json:"ca_groups"`
	Email             string   `json:"email"`
}

Oauth2Claims returns in claims section of Oauth2 verification process

type Oauth2Customer

type Oauth2Customer struct {
	CustomerName string `json:"customerName"`
	CustomerGUID string `json:"customerGUID"`
}

Oauth2Customer returns inside the "ca_groups" field in claims section of Oauth2 verification process

type OperatorActionArgs added in v0.0.720

type OperatorActionArgs struct {
	// Action is the operation to perform.
	Action OperatorActionType `json:"action"`
	// Target is an explicit single object to act on (optional if Selector is set).
	Target *OperatorActionTarget `json:"target,omitempty"`
	// Selector resolves targets from stored findings (optional if Target is set).
	Selector *OperatorActionSelector `json:"selector,omitempty"`
	// FindingRef references the scan-result CRD that justifies the action, for
	// audit (e.g. "workloadconfigurationscansummaries/payments/api").
	FindingRef string `json:"findingRef,omitempty"`
	// DryRun gates real cluster writes. nil (absent) or true means plan-only;
	// only an explicit false applies the change. See IsDryRun.
	DryRun *bool `json:"dryRun,omitempty"`
	// TTL optionally schedules an automatic revert after the given duration
	// (e.g. "24h").
	TTL string `json:"ttl,omitempty"`
	// Reason is a human-readable justification recorded in the audit trail.
	Reason string `json:"reason,omitempty"`
	// Patch is the raw patch body for the "patch" action (required when
	// Action == OperatorActionPatch). See OperatorActionPatchBody for its
	// accepted wire shapes. Must be object-shaped: RFC 6902 JSON Patch
	// arrays are not supported.
	Patch OperatorActionPatchBody `json:"patch,omitempty"`
	// PatchType selects the patch action's patch type: "strategic" (the
	// default when empty) or "merge". Ignored for every other action.
	PatchType string `json:"patchType,omitempty"`
}

OperatorActionArgs is the typed schema for Command.Args when Command.CommandName == TypeOperatorAction.

Either a fully-specified Target or a findings-driven Selector is provided; when both are present the Selector resolves an additional target set.

Safe-by-default: DryRun is a *bool so its zero value (nil / absent on the wire) means dry-run. The operator therefore treats any request that does not carry an explicit DryRun=false as a plan-only dry-run. Only an explicit DryRun=false (the CLI's --confirm) performs a real cluster write. Use IsDryRun to interpret the field rather than dereferencing it directly.

func OperatorActionArgsFromMap added in v0.0.720

func OperatorActionArgsFromMap(m map[string]interface{}) (OperatorActionArgs, error)

OperatorActionArgsFromMap parses a generic Command.Args map back into the typed action args.

func (OperatorActionArgs) IsDryRun added in v0.0.720

func (a OperatorActionArgs) IsDryRun() bool

IsDryRun reports whether the action should be treated as a plan-only dry-run. It returns true unless DryRun was explicitly set to false, so a request that omits the field can never silently perform a real cluster write.

func (OperatorActionArgs) ToArgs added in v0.0.720

func (a OperatorActionArgs) ToArgs() (map[string]interface{}, error)

ToArgs serializes the typed action args into the generic Command.Args map.

type OperatorActionPatchBody added in v0.0.761

type OperatorActionPatchBody string

OperatorActionPatchBody is the wire body for OperatorActionArgs.Patch: a JSON object, encoded as a string.

Its UnmarshalJSON also accepts a raw JSON object directly (not pre-encoded as a string) and stores its JSON text verbatim, so a caller sending an object-shaped "patch" value on the wire — the shape the operator's own extractPatchArgs has always tolerated — still round-trips through OperatorActionArgsFromMap instead of failing its single unmarshal for every field. Any other raw JSON shape (array, number, bool) is rejected, matching the "must be object-shaped" contract below. Marshaling always produces a plain JSON string.

func (*OperatorActionPatchBody) UnmarshalJSON added in v0.0.761

func (p *OperatorActionPatchBody) UnmarshalJSON(data []byte) error

type OperatorActionSelector added in v0.0.720

type OperatorActionSelector struct {
	// Control is the Kubescape control ID to select failing workloads for
	// (e.g. "C-0016").
	Control string `json:"control,omitempty"`
	// MinSeverity is the minimum finding severity to act on (e.g. "High").
	MinSeverity string `json:"minSeverity,omitempty"`
	// Namespace optionally limits the selector to a single namespace.
	Namespace string `json:"namespace,omitempty"`
}

OperatorActionSelector resolves a findings-driven target set from the scan-result CRDs already stored in the cluster (e.g. "workloads failing control C-0016 with severity >= High"). No re-scan is performed.

type OperatorActionTarget added in v0.0.720

type OperatorActionTarget struct {
	Kind      string `json:"kind,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
}

OperatorActionTarget identifies a single concrete object an action operates on.

type OperatorActionType added in v0.0.720

type OperatorActionType string

OperatorActionType enumerates the concrete cluster operations that a TypeOperatorAction command can request. It is carried in OperatorActionArgs.Action and dispatched by the operator to the matching Remediator implementation.

const (
	// OperatorActionAnnotate adds a label/annotation to a workload (the
	// lowest-blast-radius action; shipped first to prove the pipeline).
	OperatorActionAnnotate OperatorActionType = "annotate"
	// OperatorActionQuarantine isolates a workload (deny-all NetworkPolicy +
	// quarantine label).
	OperatorActionQuarantine OperatorActionType = "quarantine"
	// OperatorActionCordon marks a node unschedulable.
	OperatorActionCordon OperatorActionType = "cordon"
	// OperatorActionRevert undoes a previously applied action on a target.
	OperatorActionRevert OperatorActionType = "revert"
	// OperatorActionPatch applies a targeted Strategic Merge Patch or JSON
	// Merge Patch to a workload (Args.Patch / Args.PatchType), for callers
	// that don't have the full workload object and only need to change
	// specific fields. This type only carries the patch body — validating
	// its shape and safety (size limits, supported target kinds, and an
	// escalation-field denylist covering things like hostNetwork,
	// serviceAccountName, and container image/privileged/capabilities
	// changes) is enforced entirely by the consuming operator
	// (kubescape/operator's PatchRemediator), not by this package.
	OperatorActionPatch OperatorActionType = "patch"
)

type PaginationMarks

type PaginationMarks struct {
	ReportNumber int  `json:"chunkNumber"` // serial number of report, used in pagination
	IsLastReport bool `json:"isLastChunk"` //specify this is the last report, used in pagination
}

PaginationMarks for split documents

func (*PaginationMarks) NKeys added in v0.0.220

func (pm *PaginationMarks) NKeys() int

func (*PaginationMarks) UnmarshalJSONObject added in v0.0.220

func (pm *PaginationMarks) UnmarshalJSONObject(dec *gojay.Decoder, key string) (err error)

type RegistryScanCommand added in v0.0.176

type RegistryScanCommand struct {
	ImageScanParams
}

func (*RegistryScanCommand) GetArgs added in v0.0.176

func (r *RegistryScanCommand) GetArgs() map[string]interface{}

func (*RegistryScanCommand) GetCredentialsList added in v0.0.176

func (r *RegistryScanCommand) GetCredentialsList() []registry.AuthConfig

func (*RegistryScanCommand) GetCreds added in v0.0.176

func (r *RegistryScanCommand) GetCreds() *registry.AuthConfig

func (*RegistryScanCommand) GetImageHash added in v0.0.176

func (r *RegistryScanCommand) GetImageHash() string

func (*RegistryScanCommand) GetImageTag added in v0.0.176

func (r *RegistryScanCommand) GetImageTag() string

func (*RegistryScanCommand) GetJobID added in v0.0.176

func (r *RegistryScanCommand) GetJobID() string

func (*RegistryScanCommand) GetParentJobID added in v0.0.176

func (r *RegistryScanCommand) GetParentJobID() string

func (*RegistryScanCommand) GetSession added in v0.0.176

func (r *RegistryScanCommand) GetSession() SessionChain

func (*RegistryScanCommand) GetWlid added in v0.0.176

func (r *RegistryScanCommand) GetWlid() string

func (*RegistryScanCommand) SetArgs added in v0.0.176

func (r *RegistryScanCommand) SetArgs(args map[string]interface{})

func (*RegistryScanCommand) SetCredentialsList added in v0.0.176

func (r *RegistryScanCommand) SetCredentialsList(credentialslist []registry.AuthConfig)

func (*RegistryScanCommand) SetImageTag added in v0.0.176

func (r *RegistryScanCommand) SetImageTag(imageTag string)

func (*RegistryScanCommand) SetJobID added in v0.0.176

func (r *RegistryScanCommand) SetJobID(jobID string)

func (*RegistryScanCommand) SetParentJobID added in v0.0.176

func (r *RegistryScanCommand) SetParentJobID(parentJobID string)

func (*RegistryScanCommand) SetSession added in v0.0.176

func (r *RegistryScanCommand) SetSession(session SessionChain)

type SessionChain

type SessionChain struct {
	// All related job IDs in order from the most distant to the closes relative.
	//
	// For instance: grandparent → parent → current.
	//
	// Example: ["825f0a9e-34a9-4727-b81a-6e1bf3a63725", "c188de09-c6ec-4814-b36a-722dcccea64b"]
	JobIDs []string `json:"jobIDs"`
	// The timestamp of the earliest job
	Timestamp time.Time `json:"timestamp"`
	// ID of the job that started this chain.
	//
	// Example: 825f0a9e-34a9-4727-b81a-6e1bf3a63725
	// swagger:strfmt uuid4
	RootJobID string `json:"rootJobID,omitempty"`
	// Title of the current action being performed
	//
	// Example: vulnerability-scan
	ActionTitle string `json:"action,omitempty"`
}

SessionChain provides the context of a given job.

The goal is to provide context for a given job: its parent jobs, a chain of how the jobs were spawned and some metadata.

Consider a vulnerability scan, for example:

  • The Backend or cluster sends a websocket request with a Job ID, e.g. jobID_1.
  • The Websocket takes all the cluster workloads and for each workload it creates a job with ID `jobID_i`.
  • Then, for each container in `workload_i` it creates a job with ID `jobID_j`.

So when the Websocket sends the scan command, it sends the normal command object (pre Session Chain) to the Vulnerability Scanner

session: {
  "jobIDs": ["jobID_1", "jobID_i", "jobID_j"],
  "timestamp": "<jobID#1 timestamp>",
  "rootJobID": "jobID_1"
}

This Session Chain is needed so that:

  • each scan will hold it's own unique sessionChain.
  • `rootJobID` will allow customers to find their latest scans issues by cluster/other.
  • `jobID`s will allow customers to take all specific workload related for that specific scan.

type SessionChainWrapper

type SessionChainWrapper struct {
	SessionChain `json:",inline"`
	Designators  identifiers.PortalDesignator `json:"designators"`
}

type WebsocketScanCommand

type WebsocketScanCommand struct {
	ImageScanParams
	// ID of a workload that is running the image you want to scan
	//
	// Example: wlid://cluster-marina/namespace-default/deployment-nginx
	Wlid string `json:"wlid"`
	// Has the provided image been previously scanned or not?
	//
	// An image will only be scanned if it has not been scanned previously (value is `false`).
	// If an image has been previously scanned (value is `true`), it will not be scanned again.
	//
	// Example: false
	IsScanned bool `json:"isScanned"`
	// Name of the container that contains an image to be scanned
	//
	// Example: nginx
	ContainerName string `json:"containerName"`
	// The last action received from the Websocket
	//
	// Example: 2
	LastAction int `json:"actionIDN"`
	// Hash of the image to scan
	//
	// Example: bcae378eacedab83da66079d9366c8f5df542d7ed9ab23bf487e3e1a8481375d
	ImageHash string `json:"imageHash"`
	// InstanceID for relevancy scan
	// namespace-<namespace>/<kind>-<name>/<resourceVersion>
	// Example: namespace-default/pod-nginx/75641
	InstanceID *string `json:"instanceID,omitempty"`
	// Deprecated: Credentials to the Container Registry that holds the image to be scanned
	//
	// Kept for backward compatibility
	Credentials *registry.AuthConfig `json:"credentials,omitempty"`
}

WebsocketScanCommand is a command that triggers a scan for vulnerabilities.

func (*WebsocketScanCommand) GetArgs added in v0.0.176

func (c *WebsocketScanCommand) GetArgs() map[string]interface{}

func (*WebsocketScanCommand) GetCredentialsList added in v0.0.176

func (c *WebsocketScanCommand) GetCredentialsList() []registry.AuthConfig

func (*WebsocketScanCommand) GetCreds added in v0.0.176

func (c *WebsocketScanCommand) GetCreds() *registry.AuthConfig

func (*WebsocketScanCommand) GetImageHash added in v0.0.176

func (c *WebsocketScanCommand) GetImageHash() string

func (*WebsocketScanCommand) GetImageTag added in v0.0.176

func (c *WebsocketScanCommand) GetImageTag() string

func (*WebsocketScanCommand) GetJobID added in v0.0.176

func (c *WebsocketScanCommand) GetJobID() string

func (*WebsocketScanCommand) GetParentJobID added in v0.0.176

func (c *WebsocketScanCommand) GetParentJobID() string

func (*WebsocketScanCommand) GetSession added in v0.0.176

func (c *WebsocketScanCommand) GetSession() SessionChain

func (*WebsocketScanCommand) GetWlid added in v0.0.176

func (c *WebsocketScanCommand) GetWlid() string

func (*WebsocketScanCommand) SetArgs added in v0.0.176

func (c *WebsocketScanCommand) SetArgs(args map[string]interface{})

func (*WebsocketScanCommand) SetCredentialsList added in v0.0.176

func (c *WebsocketScanCommand) SetCredentialsList(credentialslist []registry.AuthConfig)

func (*WebsocketScanCommand) SetImageTag added in v0.0.176

func (c *WebsocketScanCommand) SetImageTag(imageTag string)

func (*WebsocketScanCommand) SetJobID added in v0.0.176

func (c *WebsocketScanCommand) SetJobID(jobID string)

func (*WebsocketScanCommand) SetParentJobID added in v0.0.176

func (c *WebsocketScanCommand) SetParentJobID(parentJobID string)

func (*WebsocketScanCommand) SetSession added in v0.0.176

func (c *WebsocketScanCommand) SetSession(session SessionChain)

Jump to

Keyboard shortcuts

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