util

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourceTypes = []configservice.ResourceType{
	configservice.ResourceTypeAwsEc2CustomerGateway,
	configservice.ResourceTypeAwsEc2Eip,
	configservice.ResourceTypeAwsEc2Host,
	configservice.ResourceTypeAwsEc2Instance,
	configservice.ResourceTypeAwsEc2InternetGateway,
	configservice.ResourceTypeAwsEc2NetworkAcl,
	configservice.ResourceTypeAwsEc2NetworkInterface,
	configservice.ResourceTypeAwsEc2RouteTable,
	configservice.ResourceTypeAwsEc2SecurityGroup,
	configservice.ResourceTypeAwsEc2Subnet,
	configservice.ResourceTypeAwsCloudTrailTrail,
	configservice.ResourceTypeAwsEc2Volume,
	configservice.ResourceTypeAwsEc2Vpc,
	configservice.ResourceTypeAwsEc2Vpnconnection,
	configservice.ResourceTypeAwsEc2Vpngateway,
	configservice.ResourceTypeAwsEc2RegisteredHainstance,
	configservice.ResourceTypeAwsEc2NatGateway,
	configservice.ResourceTypeAwsEc2EgressOnlyInternetGateway,
	configservice.ResourceTypeAwsEc2Vpcendpoint,
	configservice.ResourceTypeAwsEc2VpcendpointService,
	configservice.ResourceTypeAwsEc2FlowLog,
	configservice.ResourceTypeAwsEc2VpcpeeringConnection,
	configservice.ResourceTypeAwsElasticsearchDomain,
	configservice.ResourceTypeAwsIamGroup,
	configservice.ResourceTypeAwsIamPolicy,
	configservice.ResourceTypeAwsIamRole,
	configservice.ResourceTypeAwsIamUser,
	configservice.ResourceTypeAwsElasticLoadBalancingV2LoadBalancer,
	configservice.ResourceTypeAwsAcmCertificate,
	configservice.ResourceTypeAwsRdsDbinstance,
	configservice.ResourceTypeAwsRdsDbsubnetGroup,
	configservice.ResourceTypeAwsRdsDbsecurityGroup,
	configservice.ResourceTypeAwsRdsDbsnapshot,
	configservice.ResourceTypeAwsRdsDbcluster,
	configservice.ResourceTypeAwsRdsDbclusterSnapshot,
	configservice.ResourceTypeAwsRdsEventSubscription,
	configservice.ResourceTypeAwsS3Bucket,
	configservice.ResourceTypeAwsS3AccountPublicAccessBlock,
	configservice.ResourceTypeAwsRedshiftCluster,
	configservice.ResourceTypeAwsRedshiftClusterSnapshot,
	configservice.ResourceTypeAwsRedshiftClusterParameterGroup,
	configservice.ResourceTypeAwsRedshiftClusterSecurityGroup,
	configservice.ResourceTypeAwsRedshiftClusterSubnetGroup,
	configservice.ResourceTypeAwsRedshiftEventSubscription,
	configservice.ResourceTypeAwsSsmManagedInstanceInventory,
	configservice.ResourceTypeAwsCloudWatchAlarm,
	configservice.ResourceTypeAwsCloudFormationStack,
	configservice.ResourceTypeAwsElasticLoadBalancingLoadBalancer,
	configservice.ResourceTypeAwsAutoScalingAutoScalingGroup,
	configservice.ResourceTypeAwsAutoScalingLaunchConfiguration,
	configservice.ResourceTypeAwsAutoScalingScalingPolicy,
	configservice.ResourceTypeAwsAutoScalingScheduledAction,
	configservice.ResourceTypeAwsDynamoDbTable,
	configservice.ResourceTypeAwsCodeBuildProject,
	configservice.ResourceTypeAwsWafRateBasedRule,
	configservice.ResourceTypeAwsWafRule,
	configservice.ResourceTypeAwsWafRuleGroup,
	configservice.ResourceTypeAwsWafWebAcl,
	configservice.ResourceTypeAwsWafregionalRateBasedRule,
	configservice.ResourceTypeAwsWafregionalRule,
	configservice.ResourceTypeAwsWafregionalRuleGroup,
	configservice.ResourceTypeAwsWafregionalWebAcl,
	configservice.ResourceTypeAwsCloudFrontDistribution,
	configservice.ResourceTypeAwsCloudFrontStreamingDistribution,
	configservice.ResourceTypeAwsLambdaFunction,
	configservice.ResourceTypeAwsElasticBeanstalkApplication,
	configservice.ResourceTypeAwsElasticBeanstalkApplicationVersion,
	configservice.ResourceTypeAwsElasticBeanstalkEnvironment,
	configservice.ResourceTypeAwsWafv2WebAcl,
	configservice.ResourceTypeAwsWafv2RuleGroup,
	configservice.ResourceTypeAwsWafv2Ipset,
	configservice.ResourceTypeAwsWafv2RegexPatternSet,
	configservice.ResourceTypeAwsWafv2ManagedRuleSet,
	configservice.ResourceTypeAwsXrayEncryptionConfig,
	configservice.ResourceTypeAwsSsmAssociationCompliance,
	configservice.ResourceTypeAwsSsmPatchCompliance,
	configservice.ResourceTypeAwsShieldProtection,
	configservice.ResourceTypeAwsShieldRegionalProtection,
	configservice.ResourceTypeAwsConfigResourceCompliance,
	configservice.ResourceTypeAwsApiGatewayStage,
	configservice.ResourceTypeAwsApiGatewayRestApi,
	configservice.ResourceTypeAwsApiGatewayV2Stage,
	configservice.ResourceTypeAwsApiGatewayV2Api,
	configservice.ResourceTypeAwsCodePipelinePipeline,
	configservice.ResourceTypeAwsServiceCatalogCloudFormationProvisionedProduct,
	configservice.ResourceTypeAwsServiceCatalogCloudFormationProduct,
	configservice.ResourceTypeAwsServiceCatalogPortfolio,
	configservice.ResourceTypeAwsSqsQueue,
	configservice.ResourceTypeAwsKmsKey,
	configservice.ResourceTypeAwsQldbLedger,
}

Functions

func AddCspmComplianceFinding

func AddCspmComplianceFinding(accountContext *model2.AccountContext, priority int, findingType string, resourceType *string, resourceId *string, key string, title string, description string, firstObservedAt time.Time, lastObservedAt time.Time, securityFindingChannel *chan *model2.SecurityFinding, warning bool)

func GetAwsAccountEnvironmentType

func GetAwsAccountEnvironmentType(accountContext *model2.AccountContext, accountId string) string

func GetAwsAccountName

func GetAwsAccountName(accountContext *model2.AccountContext, accountId string) string

func GetAwsAccountTeam

func GetAwsAccountTeam(accountContext *model2.AccountContext, accountId string) string

func GetAwsConfig

func GetAwsConfig(accountContext *model2.AccountContext) (*aws.Config, error)

func HttpGet

func HttpGet(accountContext *model2.AccountContext, url string, headers []Header, basicAuthUser string, basicAuthPassword string) ([]byte, error)

func SignRequest

func SignRequest(cfg *aws.Config, ctx context.Context, req *http.Request) error

Types

type Header struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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