Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting: Restores more Semgrep rules #21800

Merged
merged 5 commits into from
Nov 18, 2021
Merged

Linting: Restores more Semgrep rules #21800

merged 5 commits into from
Nov 18, 2021

Conversation

gdavison
Copy link
Contributor

@gdavison gdavison commented Nov 16, 2021

Restores all currently passing checks as well as the data-source-with-resource-read and prefer-aws-go-sdk-pointer-conversion-assignment rules

Relates #20000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccECSTaskDefinition|TestAccKMSKey|TestAccSESIdentityNotificationTopic|TestAccSNSTopic'

--- PASS: TestAccECSTaskDefinitionDataSource_ecsTaskDefinition (84.39s)
--- PASS: TestAccECSTaskDefinition_withDockerVolume (91.77s)
--- PASS: TestAccECSTaskDefinition_withScratchVolume (92.76s)
--- PASS: TestAccECSTaskDefinition_withDockerVolumeMinimal (93.80s)
--- PASS: TestAccECSTaskDefinition_constraint (93.60s)
--- PASS: TestAccECSTaskDefinition_arrays (93.70s)
--- PASS: TestAccECSTaskDefinition_withTaskScopedDockerVolume (95.50s)
--- PASS: TestValidTaskDefinitionContainerDefinitions (0.02s)
--- PASS: TestAccECSTaskDefinition_withNetworkMode (96.81s)
--- PASS: TestAccECSTaskDefinition_withTaskRoleARN (98.79s)
--- PASS: TestAccECSTaskDefinition_withIPCMode (99.24s)
--- PASS: TestAccECSTaskDefinition_withPidMode (100.14s)
--- PASS: TestAccECSTaskDefinition_withEFSVolume (102.01s)
--- PASS: TestAccECSTaskDefinition_withTransitEncryptionEFSVolume (102.11s)
--- PASS: TestAccECSTaskDefinition_withEFSVolumeMinimal (102.93s)
--- PASS: TestAccECSTaskDefinition_withEFSAccessPoint (105.80s)
--- PASS: TestAccECSTaskDefinition_fargate (117.28s)
--- PASS: TestAccECSTaskDefinition_basic (125.29s)
--- PASS: TestAccECSTaskDefinition_changeVolumesForcesNewResource (126.04s)
--- PASS: TestAccECSTaskDefinition_Fargate_ephemeralStorage (49.26s)
--- PASS: TestAccECSTaskDefinition_inferenceAccelerator (43.65s)
--- PASS: TestAccECSTaskDefinition_executionRole (47.49s)
--- PASS: TestAccECSTaskDefinition_proxy (50.29s)
--- PASS: TestAccECSTaskDefinition_disappears (57.86s)
--- PASS: TestAccECSTaskDefinition_tags (75.04s)
--- PASS: TestAccECSTaskDefinition_withECSService (177.35s)
--- PASS: TestAccKMSKey_disappears (49.38s)
--- PASS: TestAccKMSKey_asymmetricKey (55.79s)
--- PASS: TestAccKMSKeyDataSource_multiRegionConfiguration (56.27s)
--- PASS: TestAccKMSKeyDataSource_basic (56.56s)
--- PASS: TestAccKMSKey_multiRegion (60.83s)
--- PASS: TestAccKMSKey_basic (62.43s)
--- PASS: TestAccKMSKey_Policy_iamRole (71.10s)
--- PASS: TestAccKMSKey_policyBypassUpdate (78.47s)
--- PASS: TestAccKMSKey_policy (79.58s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (82.97s)
--- PASS: TestAccKMSKeyDataSource_grantToken (88.55s)
--- PASS: TestAccKMSKey_tags (99.52s)
--- PASS: TestAccKMSKey_isEnabled (155.06s)
--- PASS: TestAccKMSKey_policyBypass (165.09s)
--- PASS: TestAccSESIdentityNotificationTopic_basic (42.61s)
--- PASS: TestAccSNSTopicPolicy_Disappears_topic (67.42s)
--- PASS: TestAccSNSTopicPolicy_disappears (77.03s)
--- PASS: TestAccSNSTopicSubscription_email (78.06s)
--- PASS: TestAccSNSTopicDataSource_basic (81.50s)
--- PASS: TestAccSNSTopicPolicy_basic (90.40s)
--- PASS: TestAccSNSTopic_basic (91.09s)
--- PASS: TestAccSNSTopic_namePrefix (91.44s)
--- PASS: TestAccSNSTopic_name (91.65s)
--- PASS: TestAccSNSTopic_policy (91.86s)
--- PASS: TestAccSNSTopic_fifoExpectContentBasedDeduplicationError (16.27s)
--- PASS: TestAccSNSTopic_withIAMRole (66.07s)
--- PASS: TestAccSNSTopicSubscription_disappears (136.79s)
--- PASS: TestAccSNSTopicSubscription_Disappears_topic (142.04s)
--- PASS: TestAccSNSTopicPolicy_updated (144.56s)
--- PASS: TestAccSNSTopic_withDeliveryPolicy (76.25s)
--- PASS: TestAccSNSTopicSubscription_basic (155.89s)
--- PASS: TestAccSNSTopicSubscription_autoConfirmingEndpoint (160.84s)
--- PASS: TestAccSNSTopic_NamePrefix_fifoTopic (70.14s)
--- PASS: TestAccSNSTopic_Name_fifoTopic (72.39s)
--- PASS: TestAccSNSTopic_NameGenerated_fifoTopic (73.61s)
--- PASS: TestAccSNSTopic_deliveryStatus (87.53s)
--- PASS: TestAccSNSTopic_disappears (40.53s)
--- PASS: TestAccSNSTopic_fifoWithContentBasedDeduplication (94.12s)
--- PASS: TestAccSNSTopic_encryption (80.60s)
--- PASS: TestAccSNSTopicSubscription_filterPolicy (202.63s)
--- PASS: TestAccSNSTopicSubscription_deliveryPolicy (203.35s)
--- PASS: TestAccSNSTopicSubscription_rawMessageDelivery (204.06s)
--- PASS: TestAccSNSTopicSubscription_redrivePolicy (206.90s)
--- PASS: TestAccSNSTopic_tags (74.40s)
--- PASS: TestAccSNSTopicSubscription_autoConfirmingSecuredEndpoint (213.79s)
--- PASS: TestAccSNSTopicSubscription_firehose (223.60s)
--- PASS: TestAccSNSTopic_withFakeIAMRole (152.75s)
--- PASS: TestAccECSTaskDefinition_withFSxWinFileSystem (3176.85s)

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. linter Pertains to changes to or issues with the various linters. service/apigateway Issues and PRs that pertain to the apigateway service. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/cloudfront Issues and PRs that pertain to the cloudfront service. service/cognito service/configservice Issues and PRs that pertain to the configservice service. service/dax Issues and PRs that pertain to the dax service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/ecr Issues and PRs that pertain to the ecr service. service/ecs Issues and PRs that pertain to the ecs service. service/elasticache Issues and PRs that pertain to the elasticache service. service/glue Issues and PRs that pertain to the glue service. service/kms Issues and PRs that pertain to the kms service. service/mq Issues and PRs that pertain to the mq service. service/organizations Issues and PRs that pertain to the organizations service. service/s3control Issues and PRs that pertain to the s3control service. service/serverlessrepo Issues and PRs that pertain to the serverlessrepo service. service/ses Issues and PRs that pertain to the ses service. service/sns Issues and PRs that pertain to the sns service. service/swf Issues and PRs that pertain to the swf service. service/waf Issues and PRs that pertain to the waf service. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 16, 2021
@github-actions github-actions bot removed the service/s3control Issues and PRs that pertain to the s3control service. label Nov 16, 2021
@gdavison gdavison marked this pull request as ready for review November 16, 2021 22:09
@YakDriver YakDriver self-assigned this Nov 17, 2021
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of good stuff. Minor nit. Otherwise, looks good! 🎉

Output acceptance tests (us-west-2):

--- PASS: TestAccKMSKey_disappears (14.98s)
--- PASS: TestAccKMSKey_asymmetricKey (18.40s)
--- PASS: TestAccKMSKeyDataSource_multiRegionConfiguration (18.98s)
--- PASS: TestAccKMSKeyDataSource_basic (19.25s)
--- PASS: TestAccKMSKey_multiRegion (21.45s)
--- PASS: TestAccKMSKey_basic (21.62s)
--- PASS: TestAccKMSKeyDataSource_grantToken (29.77s)
--- PASS: TestAccKMSKey_Policy_iamRole (36.56s)
--- PASS: TestAccKMSKey_policyBypassUpdate (37.33s)
--- PASS: TestAccKMSKey_policy (37.36s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (46.03s)
--- PASS: TestAccKMSKey_tags (64.46s)
--- PASS: TestAccKMSKey_policyBypass (149.42s)
--- PASS: TestAccKMSKey_isEnabled (390.83s)

--- PASS: TestAccSNSTopic_disappears (27.19s)
--- PASS: TestAccSNSTopicDataSource_basic (32.94s)
--- PASS: TestAccSNSTopicPolicy_disappears (33.87s)
--- PASS: TestAccSNSTopicSubscription_email (34.35s)
--- PASS: TestAccSNSTopic_name (37.87s)
--- PASS: TestAccSNSTopic_NameGenerated_fifoTopic (38.19s)
--- PASS: TestAccSNSTopic_namePrefix (38.19s)
--- PASS: TestAccSNSTopic_withDeliveryPolicy (38.31s)
--- PASS: TestAccSNSTopic_basic (38.38s)
--- PASS: TestAccSNSTopic_policy (38.52s)
--- PASS: TestAccSNSTopic_fifoExpectContentBasedDeduplicationError (4.38s)
--- PASS: TestAccSNSTopic_withIAMRole (49.79s)
--- PASS: TestAccSNSTopic_deliveryStatus (54.49s)
--- PASS: TestAccSNSTopicPolicy_Disappears_topic (23.08s)
--- PASS: TestAccSNSTopic_Name_fifoTopic (28.00s)
--- PASS: TestAccSNSTopic_NamePrefix_fifoTopic (28.23s)
--- PASS: TestAccSNSTopicSubscription_Disappears_topic (75.00s)
--- PASS: TestAccSNSTopicPolicy_basic (25.34s)
--- PASS: TestAccSNSTopicPolicy_updated (50.91s)
--- PASS: TestAccSNSTopicSubscription_basic (79.51s)
--- PASS: TestAccSNSTopic_encryption (44.86s)
--- PASS: TestAccSNSTopic_fifoWithContentBasedDeduplication (44.65s)
--- PASS: TestAccSNSTopicSubscription_disappears (88.05s)
--- PASS: TestAccSNSTopic_tags (53.13s)
--- PASS: TestAccSNSTopicSubscription_rawMessageDelivery (60.55s)
--- PASS: TestAccSNSTopicSubscription_redrivePolicy (124.77s)
--- PASS: TestAccSNSTopicSubscription_filterPolicy (128.02s)
--- PASS: TestAccSNSTopicSubscription_deliveryPolicy (128.06s)
--- PASS: TestAccSNSTopic_withFakeIAMRole (137.57s)
--- PASS: TestAccSNSTopicSubscription_autoConfirmingSecuredEndpoint (108.20s)
--- PASS: TestAccSNSTopicSubscription_firehose (163.80s)
--- PASS: TestAccSNSTopicSubscription_autoConfirmingEndpoint (138.59s)

--- PASS: TestAccSESIdentityNotificationTopic_basic (38.39s)

--- PASS: TestAccECSTaskDefinitionDataSource_ecsTaskDefinition (84.57s)
--- PASS: TestAccECSTaskDefinition_withDockerVolumeMinimal (91.99s)
--- PASS: TestAccECSTaskDefinition_withNetworkMode (92.06s)
--- PASS: TestAccECSTaskDefinition_withDockerVolume (92.12s)
--- PASS: TestAccECSTaskDefinition_Fargate_ephemeralStorage (92.13s)
--- PASS: TestAccECSTaskDefinition_constraint (92.15s)
--- PASS: TestAccECSTaskDefinition_executionRole (96.97s)
--- PASS: TestAccECSTaskDefinition_proxy (100.77s)
--- PASS: TestAccECSTaskDefinition_withTransitEncryptionEFSVolume (102.08s)
--- PASS: TestAccECSTaskDefinition_withEFSVolumeMinimal (102.12s)
--- PASS: TestAccECSTaskDefinition_withEFSVolume (102.12s)
--- PASS: TestAccECSTaskDefinition_withTaskScopedDockerVolume (36.03s)
--- PASS: TestAccECSTaskDefinition_withTaskRoleARN (33.15s)
--- PASS: TestAccECSTaskDefinition_withEFSAccessPoint (44.41s)
--- PASS: TestAccECSTaskDefinition_basic (45.47s)
--- PASS: TestAccECSTaskDefinition_tags (131.33s)
--- PASS: TestAccECSTaskDefinition_withECSService (90.67s)
--- PASS: TestAccECSTaskDefinition_withFSxWinFileSystem (3388.02s)
--- PASS: TestAccECSTaskDefinition_fargate (18.61s)
--- PASS: TestAccECSTaskDefinition_disappears (19.77s)
--- PASS: TestAccECSTaskDefinition_arrays (13.13s)
--- PASS: TestAccECSTaskDefinition_withPidMode (16.51s)
--- PASS: TestAccECSTaskDefinition_changeVolumesForcesNewResource (23.07s)
--- PASS: TestAccECSTaskDefinition_withIPCMode (16.95s)
--- PASS: TestAccECSTaskDefinition_withScratchVolume (12.82s)
--- PASS: TestAccECSTaskDefinition_inferenceAccelerator (13.31s)

@@ -17,7 +17,7 @@ func expandAction(l []interface{}) *waf.WafAction {
}
}

func expandOverrideAction(l []interface{}) *waf.WafOverrideAction {
func ExpandOverrideAction(l []interface{}) *waf.WafOverrideAction {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func ExpandOverrideAction(l []interface{}) *waf.WafOverrideAction {
func expandOverrideAction(l []interface{}) *waf.WafOverrideAction {

It's only used in waf.

@github-actions github-actions bot added service/docdb Issues and PRs that pertain to the docdb service. service/s3control Issues and PRs that pertain to the s3control service. and removed service/s3control Issues and PRs that pertain to the s3control service. service/docdb Issues and PRs that pertain to the docdb service. labels Nov 17, 2021
@gdavison gdavison merged commit ef6cf6e into main Nov 18, 2021
@gdavison gdavison deleted the svgpkg-semgrep branch November 18, 2021 00:23
@github-actions github-actions bot added this to the v3.66.0 milestone Nov 18, 2021
@github-actions
Copy link

This functionality has been released in v3.66.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jun 9, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter Pertains to changes to or issues with the various linters. service/apigateway Issues and PRs that pertain to the apigateway service. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/cloudformation Issues and PRs that pertain to the cloudformation service. service/cloudfront Issues and PRs that pertain to the cloudfront service. service/configservice Issues and PRs that pertain to the configservice service. service/dax Issues and PRs that pertain to the dax service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/ecr Issues and PRs that pertain to the ecr service. service/ecs Issues and PRs that pertain to the ecs service. service/elasticache Issues and PRs that pertain to the elasticache service. service/glue Issues and PRs that pertain to the glue service. service/kms Issues and PRs that pertain to the kms service. service/mq Issues and PRs that pertain to the mq service. service/organizations Issues and PRs that pertain to the organizations service. service/serverlessrepo Issues and PRs that pertain to the serverlessrepo service. service/ses Issues and PRs that pertain to the ses service. service/sns Issues and PRs that pertain to the sns service. service/swf Issues and PRs that pertain to the swf service. service/waf Issues and PRs that pertain to the waf service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants