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

Fix Redshift semgrep prefer-aws-go-sdk-pointer-conversion-conditional errors #24532

Merged

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented May 4, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates: #12992.

Fixes:

Findings:

  internal/service/redshift/security_group.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        244┆ *resp.ClusterSecurityGroups[0].ClusterSecurityGroupName != d.Id() {


  internal/service/redshift/snapshot_schedule_association.go 
     prefer-aws-go-sdk-pointer-conversion-conditional
        Prefer AWS Go SDK pointer conversion functions for dereferencing during conditionals, e.g.
        aws.StringValue()

        108┆ if *cluster.ClusterIdentifier == clusterIdentifier {
% make testacc TESTARGS='-run=TestAccRedshiftSnapshotScheduleAssociation_basic\|TestAccRedshiftSecurityGroup_basic' PKG=redshift
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/redshift/... -v -count 1 -parallel 20  -run=TestAccRedshiftSnapshotScheduleAssociation_basic\|TestAccRedshiftSecurityGroup_basic -timeout 180m
=== RUN   TestAccRedshiftSecurityGroup_basic
=== PAUSE TestAccRedshiftSecurityGroup_basic
=== RUN   TestAccRedshiftSnapshotScheduleAssociation_basic
=== PAUSE TestAccRedshiftSnapshotScheduleAssociation_basic
=== CONT  TestAccRedshiftSecurityGroup_basic
=== CONT  TestAccRedshiftSnapshotScheduleAssociation_basic
--- PASS: TestAccRedshiftSecurityGroup_basic (15.14s)
--- PASS: TestAccRedshiftSnapshotScheduleAssociation_basic (279.77s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/redshift	286.719s

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. linter Pertains to changes to or issues with the various linters. service/redshift Issues and PRs that pertain to the redshift service. labels May 4, 2022
@ewbankkit ewbankkit changed the title Fix Reshift semgrep prefer-aws-go-sdk-pointer-conversion-conditional errors Fix Redshift semgrep prefer-aws-go-sdk-pointer-conversion-conditional errors May 4, 2022
@ewbankkit ewbankkit added the technical-debt Addresses areas of the codebase that need refactoring or redesign. label May 4, 2022
@ewbankkit ewbankkit merged commit c42288c into main May 5, 2022
@ewbankkit ewbankkit deleted the td-semgrep-prefer-aws-go-sdk-pointer-conversion-redshift branch May 5, 2022 15:40
@github-actions github-actions bot added this to the v4.13.0 milestone May 5, 2022
github-actions bot pushed a commit that referenced this pull request May 5, 2022
@github-actions
Copy link

github-actions bot commented May 5, 2022

This functionality has been released in v4.13.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 5, 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 5, 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/redshift Issues and PRs that pertain to the redshift service. size/XS Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant