Documentation ¶
Index ¶
- Constants
- Variables
- func AddBulkScan(ctx context.Context, tx neo4j.ExplicitTransaction, ...) error
- func AddNewCloudComplianceScan(ctx context.Context, tx neo4j.ExplicitTransaction, scanID string, ...) error
- func AddNewScan(ctx context.Context, tx neo4j.ExplicitTransaction, ...) error
- func FetchPushBack(ctx context.Context) int32
- func GetActiveCloudControls(ctx context.Context, tx neo4j.ExplicitTransaction, complianceTypes []string, ...) ([]controls.CloudComplianceScanBenchmark, error)
- func GetPushBack(ctx context.Context, driver neo4j.DriverWithContext) (int32, error)
- func UpdatePushBack(ctx context.Context, newValue *atomic.Int32, prev int32) error
- func UpdateScanStatus(ctx context.Context, scanType string, scanID string, status, message string) error
- type AgentNotInstalledError
- type AlreadyRunningScanError
- type CacheEntry
- type CloudComplianceIngester
- type CloudComplianceScanStatusIngester
- type CloudResourceIngester
- type ComplianceIngester
- type ComplianceScanStatusIngester
- type Connection
- type DeepfenceSystemScanError
- type EndpointResolvers
- type EndpointResolversCache
- type Ingester
- type KafkaIngester
- func NewCloudComplianceIngester() KafkaIngester[[]ingestersUtil.CloudCompliance]
- func NewCloudComplianceScanStatusIngester() KafkaIngester[[]ingestersUtil.CloudComplianceScanStatus]
- func NewCloudResourceIngester() KafkaIngester[[]ingestersUtil.CloudResource]
- func NewComplianceIngester() KafkaIngester[[]ingestersUtil.Compliance]
- func NewComplianceScanStatusIngester() KafkaIngester[[]ingestersUtil.ComplianceScanStatus]
- func NewMalwareIngester() KafkaIngester[[]map[string]interface{}]
- func NewMalwareScanStatusIngester() KafkaIngester[[]ingestersUtil.MalwareScanStatus]
- func NewSecretIngester() KafkaIngester[[]map[string]interface{}]
- func NewSecretScanStatusIngester() KafkaIngester[[]ingestersUtil.SecretScanStatus]
- func NewVulnerabilityIngester() KafkaIngester[[]ingestersUtil.Vulnerability]
- func NewVulnerabilityStatusIngester() KafkaIngester[[]ingestersUtil.VulnerabilityScanStatus]
- type MalwareIngester
- type MalwareScanStatusIngester
- type NodeNotActiveError
- type NodeNotFoundError
- type RegisterKubernetesScannerRequest
- type ReportIngestionData
- type SecretIngester
- type SecretScanStatusIngester
- type VulnerabilityIngester
- type VulnerabilityStatusIngester
Constants ¶
View Source
const ( RedisNetworkMapKey = "network_map" RedisIPPortPIDMapKey = "ipportpid_map" )
Variables ¶
View Source
var (
PushBack atomic.Int32
)
Functions ¶
func AddBulkScan ¶
func AddBulkScan(ctx context.Context, tx neo4j.ExplicitTransaction, scanType utils.Neo4jScanType, bulkScanID string, scanIDs []string) error
func AddNewScan ¶
func AddNewScan(ctx context.Context, tx neo4j.ExplicitTransaction, scanType utils.Neo4jScanType, scanID string, nodeType controls.ScanResource, nodeID string, isPriority bool, action controls.Action, deepfenceSystemScan bool) error
func FetchPushBack ¶
func GetActiveCloudControls ¶
func GetActiveCloudControls(ctx context.Context, tx neo4j.ExplicitTransaction, complianceTypes []string, cloudProvider string) ([]controls.CloudComplianceScanBenchmark, error)
func GetPushBack ¶
func UpdatePushBack ¶
TODO: improve syncro across multiple servers
Types ¶
type AgentNotInstalledError ¶
type AgentNotInstalledError struct {
// contains filtered or unexported fields
}
func (*AgentNotInstalledError) Error ¶
func (ve *AgentNotInstalledError) Error() string
type AlreadyRunningScanError ¶
type AlreadyRunningScanError struct { ScanID string ScanType string // contains filtered or unexported fields }
func (*AlreadyRunningScanError) Error ¶
func (ve *AlreadyRunningScanError) Error() string
type CacheEntry ¶
type CacheEntry struct {
// contains filtered or unexported fields
}
type CloudComplianceIngester ¶
type CloudComplianceIngester struct{}
func (*CloudComplianceIngester) Ingest ¶
func (tc *CloudComplianceIngester) Ingest( ctx context.Context, cs []ingestersUtil.CloudCompliance, ingestC chan *kgo.Record, ) error
type CloudComplianceScanStatusIngester ¶
type CloudComplianceScanStatusIngester struct{}
func (*CloudComplianceScanStatusIngester) Ingest ¶
func (tc *CloudComplianceScanStatusIngester) Ingest( ctx context.Context, cs []ingestersUtil.CloudComplianceScanStatus, ingestC chan *kgo.Record, ) error
type CloudResourceIngester ¶
type CloudResourceIngester struct{}
func (*CloudResourceIngester) Ingest ¶
func (tc *CloudResourceIngester) Ingest( ctx context.Context, cs []ingestersUtil.CloudResource, ingestC chan *kgo.Record, ) error
type ComplianceIngester ¶
type ComplianceIngester struct{}
func (*ComplianceIngester) Ingest ¶
func (tc *ComplianceIngester) Ingest( ctx context.Context, cs []ingestersUtil.Compliance, ingestC chan *kgo.Record, ) error
type ComplianceScanStatusIngester ¶
type ComplianceScanStatusIngester struct{}
func (*ComplianceScanStatusIngester) Ingest ¶
func (tc *ComplianceScanStatusIngester) Ingest( ctx context.Context, cs []ingestersUtil.ComplianceScanStatus, ingestC chan *kgo.Record, ) error
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
type DeepfenceSystemScanError ¶
type DeepfenceSystemScanError struct {
NodeID string
}
func (*DeepfenceSystemScanError) Error ¶
func (ve *DeepfenceSystemScanError) Error() string
type EndpointResolvers ¶
type EndpointResolvers struct {
// contains filtered or unexported fields
}
type EndpointResolversCache ¶
type EndpointResolversCache struct {
// contains filtered or unexported fields
}
func (*EndpointResolversCache) Close ¶
func (erc *EndpointResolversCache) Close()
type Ingester ¶
type Ingester[T any] interface { Ingest(ctx context.Context, data T) error IsReady() bool // TOREMOVE PushToDB(ctx context.Context, batches ReportIngestionData, session neo4j.SessionWithContext) error Close() }
func NewNeo4jCollector ¶
type KafkaIngester ¶
type KafkaIngester[T any] interface { Ingest(ctx context.Context, data T, ingestChan chan *kgo.Record) error }
func NewCloudComplianceIngester ¶
func NewCloudComplianceIngester() KafkaIngester[[]ingestersUtil.CloudCompliance]
func NewCloudComplianceScanStatusIngester ¶
func NewCloudComplianceScanStatusIngester() KafkaIngester[[]ingestersUtil.CloudComplianceScanStatus]
func NewCloudResourceIngester ¶
func NewCloudResourceIngester() KafkaIngester[[]ingestersUtil.CloudResource]
func NewComplianceIngester ¶
func NewComplianceIngester() KafkaIngester[[]ingestersUtil.Compliance]
func NewComplianceScanStatusIngester ¶
func NewComplianceScanStatusIngester() KafkaIngester[[]ingestersUtil.ComplianceScanStatus]
func NewMalwareIngester ¶
func NewMalwareIngester() KafkaIngester[[]map[string]interface{}]
func NewMalwareScanStatusIngester ¶
func NewMalwareScanStatusIngester() KafkaIngester[[]ingestersUtil.MalwareScanStatus]
func NewSecretIngester ¶
func NewSecretIngester() KafkaIngester[[]map[string]interface{}]
func NewSecretScanStatusIngester ¶
func NewSecretScanStatusIngester() KafkaIngester[[]ingestersUtil.SecretScanStatus]
func NewVulnerabilityIngester ¶
func NewVulnerabilityIngester() KafkaIngester[[]ingestersUtil.Vulnerability]
func NewVulnerabilityStatusIngester ¶
func NewVulnerabilityStatusIngester() KafkaIngester[[]ingestersUtil.VulnerabilityScanStatus]
type MalwareIngester ¶
type MalwareIngester struct{}
type MalwareScanStatusIngester ¶
type MalwareScanStatusIngester struct{}
func (*MalwareScanStatusIngester) Ingest ¶
func (tc *MalwareScanStatusIngester) Ingest( ctx context.Context, statuses []ingestersUtil.MalwareScanStatus, ingestC chan *kgo.Record, ) error
type NodeNotActiveError ¶
type NodeNotActiveError struct {
NodeID string
}
func (*NodeNotActiveError) Error ¶
func (ve *NodeNotActiveError) Error() string
type NodeNotFoundError ¶
type NodeNotFoundError struct {
NodeID string
}
func (*NodeNotFoundError) Error ¶
func (ve *NodeNotFoundError) Error() string
type ReportIngestionData ¶
type ReportIngestionData struct { ProcessBatch []map[string]interface{} `json:"process_batch" required:"true"` HostBatch []map[string]interface{} `json:"host_batch" required:"true"` ContainerBatch []map[string]interface{} `json:"container_batch" required:"true"` PodBatch []map[string]interface{} `json:"pod_batch" required:"true"` ContainerImageBatch []map[string]interface{} `json:"container_image_batch" required:"true"` KubernetesClusterBatch []map[string]interface{} `json:"kubernetes_cluster_batch" required:"true"` ProcessEdgesBatch []map[string]interface{} `json:"process_edges_batch" required:"true"` ContainerEdgesBatch []map[string]interface{} `json:"container_edges_batch" required:"true"` ContainerProcessEdgesBatch []map[string]interface{} `json:"container_process_edge_batch" required:"true"` PodEdgesBatch []map[string]interface{} `json:"pod_edges_batch" required:"true"` PodHostEdgesBatch []map[string]interface{} `json:"pod_host_edges_batch" required:"true"` EndpointEdgesBatch []map[string]interface{} `json:"endpoint_edges_batch" required:"true"` ContainerImageEdgeBatch []map[string]interface{} `json:"container_image_edge_batch" required:"true"` KubernetesClusterEdgeBatch []map[string]interface{} `json:"kubernetes_cluster_edge_batch" required:"true"` Hosts []map[string]interface{} `json:"hosts" required:"true"` NumMerged int `json:"num_merged" required:"true"` Retries int }
func NewReportIngestionData ¶
func NewReportIngestionData() ReportIngestionData
type SecretIngester ¶
type SecretIngester struct{}
type SecretScanStatusIngester ¶
type SecretScanStatusIngester struct{}
func (*SecretScanStatusIngester) Ingest ¶
func (tc *SecretScanStatusIngester) Ingest( ctx context.Context, statuses []ingestersUtil.SecretScanStatus, ingestC chan *kgo.Record, ) error
type VulnerabilityIngester ¶
type VulnerabilityIngester struct{}
func (*VulnerabilityIngester) Ingest ¶
func (tc *VulnerabilityIngester) Ingest( ctx context.Context, cs []ingestersUtil.Vulnerability, ingestC chan *kgo.Record, ) error
type VulnerabilityStatusIngester ¶
type VulnerabilityStatusIngester struct{}
func (*VulnerabilityStatusIngester) Ingest ¶
func (tc *VulnerabilityStatusIngester) Ingest( ctx context.Context, statuses []ingestersUtil.VulnerabilityScanStatus, ingestC chan *kgo.Record, ) error
Click to show internal directories.
Click to hide internal directories.