Documentation ¶
Index ¶
- Constants
- Variables
- func GetBinArgs(t interface{}) map[string]string
- func ResourceTypeToNeo4j(t ScanResource) string
- func ResourceTypeToString(t ScanResource) string
- type Action
- type ActionID
- type AgentBeat
- type AgentControls
- type CloudComplianceScanBenchmark
- type CloudComplianceScanDetails
- type CloudScanNodeDetails
- type DisableAgentPluginRequest
- type EnableAgentPluginRequest
- type RefreshResourcesRequest
- type ScanResource
- type SendAgentDiagnosticLogsRequest
- type StartAgentUpgradeRequest
- type StartCloudComplianceScanRequest
- type StartComplianceScanRequest
- type StartMalwareScanRequest
- type StartSecretScanRequest
- type StartVulnerabilityScanRequest
- type StopCloudComplianceScanRequest
- type StopComplianceScanRequest
- type StopMalwareScanRequest
- type StopSecretScanRequest
- type StopVulnerabilityScanRequest
- type ThreatIntelInfo
- func (ThreatIntelInfo) GetAction() ActionID
- func (ThreatIntelInfo) GetLabel() string
- func (e ThreatIntelInfo) GetNodeID() string
- func (e ThreatIntelInfo) HasPolicies() bool
- func (e ThreatIntelInfo) SetEmptyUpdatedAts(now time.Time) ThreatIntelInfo
- func (e ThreatIntelInfo) SetNodeID(nodeID string) ThreatIntelInfo
- type WorkloadAllocator
Constants ¶
View Source
const ( CLOUD_AGENT = "cloud_agent" K8S = "k8s" HOST = "host" )
View Source
const ContextAllocatorKey = "scan-workload-allocator"
Variables ¶
View Source
var ErrCtxAllocatorNotFound = errors.New("error allocator context key not found")
View Source
var ErrNotEnoughRoom = errors.New("not enough room")
Functions ¶
func GetBinArgs ¶
func ResourceTypeToNeo4j ¶
func ResourceTypeToNeo4j(t ScanResource) string
func ResourceTypeToString ¶
func ResourceTypeToString(t ScanResource) string
Types ¶
type ActionID ¶
type ActionID int
const ( StartVulnerabilityScan ActionID = iota StartSecretScan StartComplianceScan StartMalwareScan StartAgentUpgrade SendAgentDiagnosticLogs StartAgentPlugin StopAgentPlugin UpgradeAgentPlugin StopSecretScan StopMalwareScan StopVulnerabilityScan StopComplianceScan UpdateAgentThreatIntel RefreshResources StartCloudComplianceScan StopCloudComplianceScan CloudScannerJobCount CloudScannerResourceRefreshCount )
type AgentControls ¶
type AgentControls struct { BeatRateSec int32 `json:"beatrate" required:"true"` Commands []Action `json:"commands" required:"true"` }
func (AgentControls) ToBytes ¶
func (ac AgentControls) ToBytes() ([]byte, error)
type CloudComplianceScanDetails ¶
type CloudComplianceScanDetails struct { ScanId string `json:"scan_id" required:"true"` AccountId string `json:"account_id" required:"true"` ScanTypes []string `json:"scan_types" required:"true"` Benchmarks []CloudComplianceScanBenchmark `json:"benchmarks" required:"true"` }
type CloudScanNodeDetails ¶
type DisableAgentPluginRequest ¶
type DisableAgentPluginRequest struct {
PluginName string `json:"plugin_name" required:"true"`
}
type RefreshResourcesRequest ¶
type RefreshResourcesRequest struct { NodeId string `json:"node_id" required:"true"` AccountID string `json:"account_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` }
type ScanResource ¶
type ScanResource int
const ( Container ScanResource = iota Image Host CloudAccount KubernetesCluster RegistryAccount Pod )
func StringToResourceType ¶
func StringToResourceType(s string) ScanResource
type SendAgentDiagnosticLogsRequest ¶
type SendAgentDiagnosticLogsRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` UploadURL string `json:"upload_url" required:"true"` FileName string `json:"file_name" required:"true"` Tail string `json:"tail" required:"true"` }
type StartCloudComplianceScanRequest ¶
type StartCloudComplianceScanRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` BinArgs map[string]string `json:"bin_args" required:"true"` ScanDetails CloudComplianceScanDetails `json:"scan_details" required:"true"` }
type StartComplianceScanRequest ¶
type StartComplianceScanRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` BinArgs map[string]string `json:"bin_args" required:"true"` }
type StartMalwareScanRequest ¶
type StartMalwareScanRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` BinArgs map[string]string `json:"bin_args" required:"true"` }
type StartSecretScanRequest ¶
type StartSecretScanRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` BinArgs map[string]string `json:"bin_args" required:"true"` }
type StartVulnerabilityScanRequest ¶
type StartVulnerabilityScanRequest struct { NodeID string `json:"node_id" required:"true"` NodeType ScanResource `json:"node_type" required:"true"` BinArgs map[string]string `json:"bin_args" required:"true"` }
type StopCloudComplianceScanRequest ¶
type StopCloudComplianceScanRequest StartSecretScanRequest
type StopComplianceScanRequest ¶
type StopComplianceScanRequest StartSecretScanRequest
type StopMalwareScanRequest ¶
type StopMalwareScanRequest StartSecretScanRequest
type StopSecretScanRequest ¶
type StopSecretScanRequest StartSecretScanRequest
type StopVulnerabilityScanRequest ¶
type StopVulnerabilityScanRequest StartSecretScanRequest
type ThreatIntelInfo ¶
type ThreatIntelInfo struct { SecretsRulesURL string `json:"secret_scanner_rules_url" required:"true"` SecretsRulesHash string `json:"secret_scanner_rules_hash" required:"true"` MalwareRulesURL string `json:"malware_scanner_rules_url" required:"true"` MalwareRulesHash string `json:"malware_scanner_rules_hash" required:"true"` CloudPostureControlsURL string `json:"cloud_posture_controls_url" required:"true"` CloudPostureControlsHash string `json:"cloud_posture_controls_hash" required:"true"` UpdatedAt int64 `json:"updated_at" required:"true"` }
func (ThreatIntelInfo) GetAction ¶
func (ThreatIntelInfo) GetAction() ActionID
func (ThreatIntelInfo) GetLabel ¶
func (ThreatIntelInfo) GetLabel() string
func (ThreatIntelInfo) GetNodeID ¶
func (e ThreatIntelInfo) GetNodeID() string
func (ThreatIntelInfo) HasPolicies ¶
func (e ThreatIntelInfo) HasPolicies() bool
func (ThreatIntelInfo) SetEmptyUpdatedAts ¶
func (e ThreatIntelInfo) SetEmptyUpdatedAts(now time.Time) ThreatIntelInfo
func (ThreatIntelInfo) SetNodeID ¶
func (e ThreatIntelInfo) SetNodeID(nodeID string) ThreatIntelInfo
type WorkloadAllocator ¶
type WorkloadAllocator struct {
// contains filtered or unexported fields
}
func NewWorkloadAllocator ¶
func NewWorkloadAllocator(maxWorkload int32) *WorkloadAllocator
func (*WorkloadAllocator) Free ¶
func (wa *WorkloadAllocator) Free()
func (*WorkloadAllocator) MaxAllocable ¶
func (wa *WorkloadAllocator) MaxAllocable() int32
func (*WorkloadAllocator) Reserve ¶
func (wa *WorkloadAllocator) Reserve(delta int32)
Click to show internal directories.
Click to hide internal directories.