attackflow

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// region
	REGION_GLOBAL = "global"

	// cloud type
	CLOUD_TYPE_AWS = "aws"

	// service layer
	LAYER_INTERNET         = "INTERNET"
	LAYER_CDN              = "CDN"
	LAYER_LB               = "LB"
	LAYER_GATEWAY          = "GATEWAY"
	LAYER_DATASTORE        = "DATASTORE"
	LAYER_COMPUTE          = "COMPUTE"
	LAYER_LATERAL_MOVEMENT = "LATERAL_MOVEMENT"
	LAYER_EXTERNAL_SERVICE = "EXTERNAL_SERVICE"
	LAYER_INTERNAL_SERVICE = "INTERNAL_SERVICE"
	LAYER_CODE_REPOSITORY  = "CODE_REPOSITORY"

	// common resource
	RESOURCE_INTERNET = "Internet"

	// hard limit
	MAX_ANALYZE_NUM = 100
)
View Source
const (
	ATTACK_FLOW_CACHE_SIZE       = 10 * 1024 * 1024 // 10MB
	ATTACK_FLOW_CACHE_EXPIRE_SEC = 3600
	ATTACK_FLOW_CACHE_KEY_FORMAT = "attack-flow/%s/%s"
)

Variables

This section is empty.

Functions

func GetAttackFlowCache added in v0.10.0

func GetAttackFlowCache(cloudID, resourceName string) (*datasource.Resource, error)

func GetCodeRepositoryNode added in v0.10.0

func GetCodeRepositoryNode(repository, service string) *datasource.Resource

func GetEdge added in v0.10.0

func GetEdge(source, target, edgeLabel string) *datasource.ResourceRelationship

func GetExternalServiceNode added in v0.10.0

func GetExternalServiceNode(target string) *datasource.Resource

func GetInternalServiceNode added in v0.10.0

func GetInternalServiceNode(target, region string) *datasource.Resource

func ParseMetadata added in v0.10.0

func ParseMetadata(metadata interface{}) (string, error)

func SetAttackFlowCache added in v0.10.0

func SetAttackFlowCache(cloudID, resourceName string, data *datasource.Resource) error

func SetNode added in v0.10.0

func SetNode(isPublic bool, internetEdgeLabel string, resource *datasource.Resource, resp *datasource.AnalyzeAttackFlowResponse) *datasource.AnalyzeAttackFlowResponse

Types

type CSP

type CSP interface {
	GetInitialServiceAnalyzer(ctx context.Context, req *datasource.AnalyzeAttackFlowRequest) (CloudServiceAnalyzer, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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