reporters_scan

package
v0.0.0-...-186cdb7 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertScanResultsCommonToMap

func ConvertScanResultsCommonToMap(scanResults model.ScanResultsCommon) map[string]interface{}

ConvertScanResultsCommonToMap converts ScanResultsCommon to map[string]interface{}

func DeleteScan

func DeleteScan(ctx context.Context, scanType utils.Neo4jScanType, scanID string) error

DeleteScan Delete entire scan

func DeleteScanResults

func DeleteScanResults(ctx context.Context, scanType utils.Neo4jScanType, scanID string, nodeIDs []string) error

DeleteScanResults Delete selected scan results (cves, secrets, etc)

func GetBulkScans

func GetBulkScans(ctx context.Context, scanType utils.Neo4jScanType, scanID string) (model.ScanStatusResp, error)

func GetCloudAccountIDs

func GetCloudAccountIDs(ctx context.Context, cloudProviderIds []model.NodeIdentifier, filters *reporters.FieldsFilters) ([]model.NodeIdentifier, error)

func GetCloudComplianceStats

func GetCloudComplianceStats(ctx context.Context, ff reporters.FieldsFilters, scanID string, neo4jComplianceType utils.Neo4jScanType) (model.ComplianceAdditionalInfo, error)

func GetComplianceBulkScans

func GetComplianceBulkScans(ctx context.Context, scanType utils.Neo4jScanType, scanID string) (model.ComplianceScanStatusResp, error)

func GetComplianceScanStatus

func GetComplianceScanStatus(ctx context.Context, scanType utils.Neo4jScanType, scanIDs []string) (model.ComplianceScanStatusResp, error)

func GetFilters

func GetFilters(ctx context.Context, having map[string]interface{}, detectedType string, filters []string) (map[string][]string, error)

func GetKubernetesContainerIDs

func GetKubernetesContainerIDs(ctx context.Context, k8sIds []model.NodeIdentifier) ([]model.NodeIdentifier, error)

func GetKubernetesHostsIDs

func GetKubernetesHostsIDs(ctx context.Context, k8sIds []model.NodeIdentifier) ([]model.NodeIdentifier, error)

func GetKubernetesImageIDs

func GetKubernetesImageIDs(ctx context.Context, k8sIds []model.NodeIdentifier) ([]model.NodeIdentifier, error)

func GetNodesInScanResults

func GetNodesInScanResults(ctx context.Context, scanType utils.Neo4jScanType, resultIds []string) ([]model.ScanResultBasicNode, error)

func GetPodContainerIDs

func GetPodContainerIDs(ctx context.Context, podIds []model.NodeIdentifier) ([]model.NodeIdentifier, error)

func GetRegistriesImageIDs

func GetRegistriesImageIDs(ctx context.Context, registryIds []model.NodeIdentifier) ([]model.NodeIdentifier, error)

func GetScanResultDiff

func GetScanResultDiff[T any](ctx context.Context, scanType utils.Neo4jScanType, baseScanID, compareToScanID string, ff reporters.FieldsFilters, fw model.FetchWindow) ([]T, error)

func GetScanResults

func GetScanResults[T any](ctx context.Context, scanType utils.Neo4jScanType, scanID string, ff reporters.FieldsFilters, fw model.FetchWindow) ([]T, model.ScanResultsCommon, error)

func GetScanStatus

func GetScanStatus(ctx context.Context, scanType utils.Neo4jScanType, scanIDs []string) (model.ScanStatusResp, error)

func GetSelectedScanResults

func GetSelectedScanResults[T any](ctx context.Context, scanType utils.Neo4jScanType, scanID string, scanIDs []string) ([]T, model.ScanResultsCommon, error)

func GetSevCounts

func GetSevCounts(ctx context.Context, ff reporters.FieldsFilters, scanType utils.Neo4jScanType, scanID string) (map[string]int32, error)

func Labels2NodeType

func Labels2NodeType(labels []interface{}) string

func MarkScanDeletePending

func MarkScanDeletePending(ctx context.Context, scanType utils.Neo4jScanType,
	scanIds []string) error

func NodeIdentifierToIDList

func NodeIdentifierToIDList(in []model.NodeIdentifier) []string

func Notify

func Notify[T any](ctx context.Context, res []T, common model.ScanResultsCommon, scanType string, integrationIDs []int32) error

func NotifyScanResult

func NotifyScanResult(ctx context.Context, scanType utils.Neo4jScanType, scanID string, scanIDs []string, integrationIDs []int32) error

func StopCloudComplianceScan

func StopCloudComplianceScan(ctx context.Context, scanIds []string) error

func StopScan

func StopScan(ctx context.Context, scanType string, scanIds []string) error

func UpdateScanResultMasked

func UpdateScanResultMasked(ctx context.Context, req *model.ScanResultsMaskRequest, value bool) error

func UpdateScanResultNodeFields

func UpdateScanResultNodeFields(ctx context.Context, scanType utils.Neo4jScanType, scanID string, nodeIDs []string, key, value string) error

Types

type NodeNotFoundError

type NodeNotFoundError struct {
	// contains filtered or unexported fields
}

func (*NodeNotFoundError) Error

func (ve *NodeNotFoundError) Error() string

Jump to

Keyboard shortcuts

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