From 96c9d2b7421ef20ab42a1bb6cd1ab83f8e7f4293 Mon Sep 17 00:00:00 2001 From: Michele Lizzit Date: Sun, 17 Dec 2023 13:06:33 +0100 Subject: [PATCH] Improve support for Go/AWS --- rules/go-awsv1-generic1.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rules/go-awsv1-generic1.yaml b/rules/go-awsv1-generic1.yaml index e6a2779..d266c06 100644 --- a/rules/go-awsv1-generic1.yaml +++ b/rules/go-awsv1-generic1.yaml @@ -863,6 +863,12 @@ rules: - pattern-inside: | import "github.com/aws/aws-sdk-go/service/s3" ... + - pattern-inside: | + import "github.com/aws/aws-sdk-go/service/s3/s3manager" + ... + - pattern-inside: | + import "github.com/aws/aws-sdk-go/service/s3/s3crypto" + ... - pattern-inside: | import "github.com/aws/aws-sdk-go/service/s3control" ... @@ -1063,7 +1069,7 @@ rules: $SN.$METHOD(...) - metavariable-regex: metavariable: $SN - regex: ^(accessanalyzer|account|acm|acmpca|alexaforbusiness|amplify|amplifybackend|amplifyuibuilder|apigateway|apigatewaymanagementapi|apigatewayv2|appconfig|appconfigdata|appfabric|appflow|appintegrationsservice|applicationautoscaling|applicationcostprofiler|applicationdiscoveryservice|applicationinsights|appmesh|appregistry|apprunner|appstream|appsync|arczonalshift|athena|auditmanager|augmentedairuntime|autoscaling|autoscalingplans|backup|backupgateway|backupstorage|batch|billingconductor|braket|budgets|chime|chimesdkidentity|chimesdkmediapipelines|chimesdkmeetings|chimesdkmessaging|chimesdkvoice|cleanrooms|cloud9|cloudcontrolapi|clouddirectory|cloudformation|cloudfront|cloudhsm|cloudhsmv2|cloudsearch|cloudsearchdomain|cloudtrail|cloudtraildata|cloudwatch|cloudwatchevents|cloudwatchevidently|cloudwatchlogs|cloudwatchrum|codeartifact|codebuild|codecommit|codedeploy|codeguruprofiler|codegurureviewer|codegurusecurity|codepipeline|codestar|codestarconnections|codestarnotifications|cognitoidentity|cognitoidentityprovider|cognitosync|comprehend|comprehendmedical|computeoptimizer|configservice|connect|connectcampaigns|connectcases|connectcontactlens|connectparticipant|connectwisdomservice|controltower|costandusagereportservice|costexplorer|customerprofiles|databasemigrationservice|dataexchange|datapipeline|datasync|dax|detective|devicefarm|devopsguru|directconnect|directoryservice|dlm|docdb|docdbelastic|drs|dynamodb|dynamodbstreams|ebs|ec2|ec2instanceconnect|ecr|ecrpublic|ecs|efs|eks|elasticache|elasticbeanstalk|elasticinference|elasticsearchservice|elastictranscoder|elb|elbv2|emr|emrcontainers|emrserverless|eventbridge|finspace|finspacedata|firehose|fis|fms|forecastqueryservice|forecastservice|frauddetector|fsx|gamelift|gamesparks|generate.go|glacier|globalaccelerator|glue|gluedatabrew|greengrass|greengrassv2|groundstation|guardduty|health|healthlake|honeycode|iam|identitystore|imagebuilder|inspector|inspector2|internetmonitor|iot|iot1clickdevicesservice|iot1clickprojects|iotanalytics|iotdataplane|iotdeviceadvisor|iotevents|ioteventsdata|iotfleethub|iotfleetwise|iotjobsdataplane|iotroborunner|iotsecuretunneling|iotsitewise|iotthingsgraph|iottwinmaker|iotwireless|ivs|ivschat|ivsrealtime|kafka|kafkaconnect|kendra|kendraranking|keyspaces|kinesis|kinesisanalytics|kinesisanalyticsv2|kinesisvideo|kinesisvideoarchivedmedia|kinesisvideomedia|kinesisvideosignalingchannels|kinesisvideowebrtcstorage|kms|lakeformation|lambda|lexmodelbuildingservice|lexmodelsv2|lexruntimeservice|lexruntimev2|licensemanager|licensemanagerlinuxsubscriptions|licensemanagerusersubscriptions|lightsail|locationservice|lookoutequipment|lookoutforvision|lookoutmetrics|m2|machinelearning|macie|macie2|managedblockchain|managedgrafana|marketplacecatalog|marketplacecommerceanalytics|marketplaceentitlementservice|marketplacemetering|mediaconnect|mediaconvert|medialive|mediapackage|mediapackagev2|mediapackagevod|mediastore|mediastoredata|mediatailor|medicalimaging|memorydb|mgn|migrationhub|migrationhubconfig|migrationhuborchestrator|migrationhubrefactorspaces|migrationhubstrategyrecommendations|mobile|mobileanalytics|mq|mturk|mwaa|neptune|networkfirewall|networkmanager|nimblestudio|oam|omics|opensearchserverless|opensearchservice|opsworks|opsworkscm|organizations|osis|outposts|panorama|paymentcryptography|paymentcryptographydata|personalize|personalizeevents|personalizeruntime|pi|pinpoint|pinpointemail|pinpointsmsvoice|pinpointsmsvoicev2|pipes|polly|pricing|privatenetworks|prometheusservice|proton|qldb|qldbsession|quicksight|ram|rds|rdsdataservice|recyclebin|redshift|redshiftdataapiservice|redshiftserverless|rekognition|resiliencehub|resourceexplorer2|resourcegroups|resourcegroupstaggingapi|robomaker|rolesanywhere|route53|route53domains|route53recoverycluster|route53recoverycontrolconfig|route53recoveryreadiness|route53resolver|s3|s3control|s3outposts|sagemaker|sagemakeredgemanager|sagemakerfeaturestoreruntime|sagemakergeospatial|sagemakermetrics|sagemakerruntime|savingsplans|scheduler|schemas|secretsmanager|securityhub|securitylake|serverlessapplicationrepository|servicecatalog|servicediscovery|servicequotas|ses|sesv2|sfn|shield|signer|simpledb|simspaceweaver|sms|snowball|snowdevicemanagement|sns|sqs|ssm|ssmcontacts|ssmincidents|ssmsap|sso|ssoadmin|ssooidc|storagegateway|sts|support|supportapp|swf|synthetics|textract|timestreamquery|timestreamwrite|tnb|transcribeservice|transcribestreamingservice|transfer|translate|verifiedpermissions|voiceid|vpclattice|waf|wafregional|wafv2|wellarchitected|workdocs|worklink|workmail|workmailmessageflow|workspaces|workspacesweb|xray)$ + regex: ^(accessanalyzer|account|acm|acmpca|alexaforbusiness|amplify|amplifybackend|amplifyuibuilder|apigateway|apigatewaymanagementapi|apigatewayv2|appconfig|appconfigdata|appfabric|appflow|appintegrationsservice|applicationautoscaling|applicationcostprofiler|applicationdiscoveryservice|applicationinsights|appmesh|appregistry|apprunner|appstream|appsync|arczonalshift|athena|auditmanager|augmentedairuntime|autoscaling|autoscalingplans|backup|backupgateway|backupstorage|batch|billingconductor|braket|budgets|chime|chimesdkidentity|chimesdkmediapipelines|chimesdkmeetings|chimesdkmessaging|chimesdkvoice|cleanrooms|cloud9|cloudcontrolapi|clouddirectory|cloudformation|cloudfront|cloudhsm|cloudhsmv2|cloudsearch|cloudsearchdomain|cloudtrail|cloudtraildata|cloudwatch|cloudwatchevents|cloudwatchevidently|cloudwatchlogs|cloudwatchrum|codeartifact|codebuild|codecommit|codedeploy|codeguruprofiler|codegurureviewer|codegurusecurity|codepipeline|codestar|codestarconnections|codestarnotifications|cognitoidentity|cognitoidentityprovider|cognitosync|comprehend|comprehendmedical|computeoptimizer|configservice|connect|connectcampaigns|connectcases|connectcontactlens|connectparticipant|connectwisdomservice|controltower|costandusagereportservice|costexplorer|customerprofiles|databasemigrationservice|dataexchange|datapipeline|datasync|dax|detective|devicefarm|devopsguru|directconnect|directoryservice|dlm|docdb|docdbelastic|drs|dynamodb|dynamodbstreams|ebs|ec2|ec2instanceconnect|ecr|ecrpublic|ecs|efs|eks|elasticache|elasticbeanstalk|elasticinference|elasticsearchservice|elastictranscoder|elb|elbv2|emr|emrcontainers|emrserverless|eventbridge|finspace|finspacedata|firehose|fis|fms|forecastqueryservice|forecastservice|frauddetector|fsx|gamelift|gamesparks|generate.go|glacier|globalaccelerator|glue|gluedatabrew|greengrass|greengrassv2|groundstation|guardduty|health|healthlake|honeycode|iam|identitystore|imagebuilder|inspector|inspector2|internetmonitor|iot|iot1clickdevicesservice|iot1clickprojects|iotanalytics|iotdataplane|iotdeviceadvisor|iotevents|ioteventsdata|iotfleethub|iotfleetwise|iotjobsdataplane|iotroborunner|iotsecuretunneling|iotsitewise|iotthingsgraph|iottwinmaker|iotwireless|ivs|ivschat|ivsrealtime|kafka|kafkaconnect|kendra|kendraranking|keyspaces|kinesis|kinesisanalytics|kinesisanalyticsv2|kinesisvideo|kinesisvideoarchivedmedia|kinesisvideomedia|kinesisvideosignalingchannels|kinesisvideowebrtcstorage|kms|lakeformation|lambda|lexmodelbuildingservice|lexmodelsv2|lexruntimeservice|lexruntimev2|licensemanager|licensemanagerlinuxsubscriptions|licensemanagerusersubscriptions|lightsail|locationservice|lookoutequipment|lookoutforvision|lookoutmetrics|m2|machinelearning|macie|macie2|managedblockchain|managedgrafana|marketplacecatalog|marketplacecommerceanalytics|marketplaceentitlementservice|marketplacemetering|mediaconnect|mediaconvert|medialive|mediapackage|mediapackagev2|mediapackagevod|mediastore|mediastoredata|mediatailor|medicalimaging|memorydb|mgn|migrationhub|migrationhubconfig|migrationhuborchestrator|migrationhubrefactorspaces|migrationhubstrategyrecommendations|mobile|mobileanalytics|mq|mturk|mwaa|neptune|networkfirewall|networkmanager|nimblestudio|oam|omics|opensearchserverless|opensearchservice|opsworks|opsworkscm|organizations|osis|outposts|panorama|paymentcryptography|paymentcryptographydata|personalize|personalizeevents|personalizeruntime|pi|pinpoint|pinpointemail|pinpointsmsvoice|pinpointsmsvoicev2|pipes|polly|pricing|privatenetworks|prometheusservice|proton|qldb|qldbsession|quicksight|ram|rds|rdsdataservice|recyclebin|redshift|redshiftdataapiservice|redshiftserverless|rekognition|resiliencehub|resourceexplorer2|resourcegroups|resourcegroupstaggingapi|robomaker|rolesanywhere|route53|route53domains|route53recoverycluster|route53recoverycontrolconfig|route53recoveryreadiness|route53resolver|s3|s3manager|s3crypto|s3control|s3outposts|sagemaker|sagemakeredgemanager|sagemakerfeaturestoreruntime|sagemakergeospatial|sagemakermetrics|sagemakerruntime|savingsplans|scheduler|schemas|secretsmanager|securityhub|securitylake|serverlessapplicationrepository|servicecatalog|servicediscovery|servicequotas|ses|sesv2|sfn|shield|signer|simpledb|simspaceweaver|sms|snowball|snowdevicemanagement|sns|sqs|ssm|ssmcontacts|ssmincidents|ssmsap|sso|ssoadmin|ssooidc|storagegateway|sts|support|supportapp|swf|synthetics|textract|timestreamquery|timestreamwrite|tnb|transcribeservice|transcribestreamingservice|transfer|translate|verifiedpermissions|voiceid|vpclattice|waf|wafregional|wafv2|wellarchitected|workdocs|worklink|workmail|workmailmessageflow|workspaces|workspacesweb|xray)$ message: "IaC Point Of Intersection: Instantiation of AWS SDK; SN = $SN" languages: - go