broadcastevents

package
v0.0.493 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IgnoreRuleTypeMisconfiguration IgnoreRuleType = "misconfiguration"
	IgnoreRuleTypeVulnerability    IgnoreRuleType = "vulnerability"

	IgnoreRuleExpirationTypeNone IgnoreRuleExpirationType = "none"
	IgnoreRuleExpirationTypeDate IgnoreRuleExpirationType = "date"
	IgnoreRuleExpirationTypeFix  IgnoreRuleExpirationType = "fix"

	AlertChannelPrefix = "AlertChannel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationEvent

type AggregationEvent struct {
	EventBase        `json:",inline"`
	JobID            string `json:"jobID"`
	K8sVendor        string `json:"k8sVendor,omitempty"`
	K8sVersion       string `json:"k8sVersion,omitempty"`
	KSVersion        string `json:"kubescapeVersion,omitempty"`
	HelmChartVersion string `json:"helmChartVersion,omitempty"`
	ReportGUID       string `json:"reportGUID,omitempty"`
	ClusterName      string `json:"clusterName,omitempty"`
	WorkerNodesCount int    `json:"workerNodesCount,omitempty"`
}

func NewClusterImageScanSessionStartedEvent

func NewClusterImageScanSessionStartedEvent(jobId, clusterName, customerId string, timeStarted time.Time) AggregationEvent

func NewClusterRiskScanV2Event

func NewClusterRiskScanV2Event(customerGUID, jobID, reportGUID, clusterName, kubescapeVersion, cloudProvider, K8sVersion, helmVersion string, numOfWorkerNodes int, scanTime time.Time) AggregationEvent

func NewGitRepositoryRiskScanEvent

func NewGitRepositoryRiskScanEvent(customerGUID, jodID, reportGUID, clusterName string, eventTime time.Time) AggregationEvent

func NewImageScanEventHookNotify

func NewImageScanEventHookNotify(customerGUID, jobId string, scanTime time.Time) AggregationEvent

func NewRegistryImageScanSessionStartedEvent

func NewRegistryImageScanSessionStartedEvent(jobId string, customerId string, timeStarted time.Time) AggregationEvent

type AlertChannelEvent

type AlertChannelEvent struct {
	EventBase        `json:",inline"`
	Name             string `json:"name"`
	Type             string `json:"type"`
	AllClusters      *bool  `json:"allClusters,omitempty"`
	NewVulnerability string `json:"new vulnerability is detected in your cluster,omitempty"`
	NewFix           string `json:"new fix is available for vulnerability,omitempty"`
	Compliance       string `json:"compliance score has decreased,omitempty"`
	NewAdmin         string `json:"new cluster admin was added,omitempty"`
}

func NewAlertChannelCreatedEvent

func NewAlertChannelCreatedEvent(customerGUID, name string, channel notifications.AlertChannel) AlertChannelEvent

func NewAlertChannelDeletedEvent

func NewAlertChannelDeletedEvent(customerGUID, name, provider string) AlertChannelEvent

func NewAlertChannelUpdatedEvent added in v0.0.232

func NewAlertChannelUpdatedEvent(customerGUID, name string, channel notifications.AlertChannel) AlertChannelEvent

type AttackChainCreated added in v0.0.257

type AttackChainCreated struct {
	EventBase     `json:",inline"`
	ClusterName   string `json:"clusterName"`
	ACId          string `json:"ACId"`
	ACType        string `json:"ACType"`
	ACFirstSeeing string `json:"ACFirstSeeing"`
}

type AttackChainResolved added in v0.0.257

type AttackChainResolved struct {
	EventBase     `json:",inline"`
	ClusterName   string `json:"clusterName"`
	ACId          string `json:"ACId"`
	ACType        string `json:"ACType"`
	ACFirstSeeing string `json:"ACFirstSeeing"`
}

type EventBase

type EventBase struct {
	CustomerGUID string    `json:"customerGUID"`
	EventName    string    `json:"eventName"`
	EventTime    time.Time `json:"eventTime"`
	// The date (year,month,day of month) of the event
	EventDate          string `json:"eventDate,omitempty"`
	EventMonth         string `json:"eventMonth,omitempty"`
	EventWeekOfTheYear int    `json:"eventWeekOfTheYear,omitempty"`
}

func NewBaseEvent

func NewBaseEvent(customerGUID, eventName string, eventTime *time.Time) EventBase

type HelmInstalledEvent

type HelmInstalledEvent struct {
	EventBase
	ClusterName string `json:"clusterName"`
	*armotypes.InstallationData
}

func NewHelmInstalledEvent

func NewHelmInstalledEvent(clusterName, customerGUID string, installationData *armotypes.InstallationData) HelmInstalledEvent

type IgnoreRuleEvent

type IgnoreRuleEvent struct {
	EventBase      `json:",inline"`
	IgnoreRuleType IgnoreRuleType           `json:"ignoreRuleType"`
	IgnoredIds     string                   `json:"ids"` // comma separated ids of controls or vulnerabilities
	Resources      int                      `json:"resources"`
	ExpirationType IgnoreRuleExpirationType `json:"expirationType"`
}

func NewPostureExceptionEvent

func NewPostureExceptionEvent(customerGUID, changeMethod string, exception armotypes.PostureExceptionPolicy) IgnoreRuleEvent

func NewVulnerabilityExceptionChangeEvent

func NewVulnerabilityExceptionChangeEvent(customerGUID, changeMethod string, exception armotypes.VulnerabilityExceptionPolicy) IgnoreRuleEvent

type IgnoreRuleExpirationType

type IgnoreRuleExpirationType string

type IgnoreRuleType

type IgnoreRuleType string

type LoginEvent

type LoginEvent struct {
	EventBase         `json:",inline"`
	Email             string `json:"email"`
	UserName          string `json:"userName"`
	PreferredUserName string `json:"preferredUserName"`
}

func NewFeatureFlagsEvent

func NewFeatureFlagsEvent(customerGUID, userEmail, userName, userPreferredName string) LoginEvent

func NewLoginEvent

func NewLoginEvent(customerGUID, email, name, preferredName string) LoginEvent

type NetworkPolicyGenerated added in v0.0.276

type NetworkPolicyGenerated struct {
	EventBase    `json:",inline"`
	WorkloadName string `json:"WorkloadName"`
}

type NodeStatusEvent added in v0.0.450

type NodeStatusEvent struct {
	EventBase    `json:",inline"`
	CustomerName string `json:"customerName"`
	Cluster      string `json:"cluster"`
	NodeName     string `json:"nodeName"`
	AllocatedCPU *int   `json:"allocatedCPU"`
}

func NewNodeStatusEventHookNotify added in v0.0.450

func NewNodeStatusEventHookNotify(customerGUID string, nodeStatus *armotypes.NodeStatus) NodeStatusEvent

type PodInTroubleConditionEvent

type PodInTroubleConditionEvent struct {
	PodInTroubleEvent
	Condition string `json:"condition"`
}

func NewKubescapePodPendingConditionErrorEvent

func NewKubescapePodPendingConditionErrorEvent(clusterName, customerId, objId, condition, reason, message string) PodInTroubleConditionEvent

func NewKubescapePodRunningConditionErrorEvent

func NewKubescapePodRunningConditionErrorEvent(clusterName, customerId, objId, condition, reason, message string) PodInTroubleConditionEvent

type PodInTroubleContainerEvent

type PodInTroubleContainerEvent struct {
	PodInTroubleEvent
	ContainerName string `json:"containerName"`
	ExitCode      int32  `json:"exitCode"`
	RestartCount  int32  `json:"restartCount"`
}

func NewKubescapePodPendingContainerErrorEvent

func NewKubescapePodPendingContainerErrorEvent(clusterName, customerId, objId, conainerName, reason, meassage string, exitCode, restartCount int32) PodInTroubleContainerEvent

func NewKubescapePodRunningContainerErrorEvent

func NewKubescapePodRunningContainerErrorEvent(clusterName, customerId, objId, containerName, reason, message string, exitCode, restartCount int32) PodInTroubleContainerEvent

type PodInTroubleEvent

type PodInTroubleEvent struct {
	EventBase
	ClusterName string `json:"clusterName"`
	ObjId       string `json:"podId"`
	Reason      string `json:"reason"`
	Message     string `json:"message"`
}

type ScanWithoutAccessKeyEvent added in v0.0.260

type ScanWithoutAccessKeyEvent struct {
	EventBase   `json:",inline"`
	ClusterName string `json:"clusterName"`
}

func NewScanWithoutAccessKeyEvent added in v0.0.260

func NewScanWithoutAccessKeyEvent(customerGUID, clusterName string) ScanWithoutAccessKeyEvent

Jump to

Keyboard shortcuts

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