Documentation ¶
Index ¶
- Constants
- func GetAttackFlowCache(cloudID, resourceName string) (*datasource.Resource, error)
- func GetCodeRepositoryNode(repository, service string) *datasource.Resource
- func GetEdge(source, target, edgeLabel string) *datasource.ResourceRelationship
- func GetExternalServiceNode(target string) *datasource.Resource
- func GetInternalServiceNode(target, region string) *datasource.Resource
- func ParseMetadata(metadata interface{}) (string, error)
- func SetAttackFlowCache(cloudID, resourceName string, data *datasource.Resource) error
- func SetNode(isPublic bool, internetEdgeLabel string, resource *datasource.Resource, ...) *datasource.AnalyzeAttackFlowResponse
- type CSP
- type CloudServiceAnalyzer
Constants ¶
View Source
const ( // region REGION_GLOBAL = "global" // cloud type CLOUD_TYPE_AWS = "aws" CLOUD_TYPE_GCP = "gcp" // 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 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)
}
type CloudServiceAnalyzer ¶
type CloudServiceAnalyzer interface { Analyze(ctx context.Context, resp *datasource.AnalyzeAttackFlowResponse) (*datasource.AnalyzeAttackFlowResponse, error) Next(ctx context.Context, resp *datasource.AnalyzeAttackFlowResponse) (*datasource.AnalyzeAttackFlowResponse, []CloudServiceAnalyzer, error) }
Click to show internal directories.
Click to hide internal directories.