Documentation
¶
Index ¶
- Constants
- type AggregationEvent
- func NewClusterImageScanSessionStartedEvent(jobId, clusterName, customerId string, timeStarted time.Time) AggregationEvent
- func NewClusterRiskScanV2Event(...) AggregationEvent
- func NewGitRepositoryRiskScanEvent(customerGUID, jodID, reportGUID, clusterName string, eventTime time.Time) AggregationEvent
- func NewImageScanEventHookNotify(customerGUID, jobId string, scanTime time.Time) AggregationEvent
- func NewRegistryImageScanSessionStartedEvent(jobId string, customerId string, timeStarted time.Time) AggregationEvent
- type AlertChannelEvent
- func NewAlertChannelCreatedEvent(customerGUID, name string, channel notifications.AlertChannel) AlertChannelEvent
- func NewAlertChannelDeletedEvent(customerGUID, name, provider string) AlertChannelEvent
- func NewAlertChannelUpdatedEvent(customerGUID, name string, channel notifications.AlertChannel) AlertChannelEvent
- type AttackChainCreated
- type AttackChainResolved
- type EventBase
- type HelmInstalledEvent
- type IgnoreRuleEvent
- type IgnoreRuleExpirationType
- type IgnoreRuleType
- type LoginEvent
- type NetworkPolicyGenerated
- type NodeStatusEvent
- type PodInTroubleConditionEvent
- type PodInTroubleContainerEvent
- type PodInTroubleEvent
- type ScanWithoutAccessKeyEvent
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 AttackChainResolved ¶ added in v0.0.257
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"`
}
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 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 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
Click to show internal directories.
Click to hide internal directories.