-
Notifications
You must be signed in to change notification settings - Fork 630
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
Missing return after AddError #3285
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
1 similar comment
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
i touched on this in #3284 but i'm not sure if we want this to be universally applied. should these be somewhat recoverable, we should instead be setting the correct state values to be saved instead of halting execution. for me, it really comes down to how important these failures are and whether we can handle them more gracefully or if we need to totally just drop and bail completely. |
Marking this issue as stale due to 30 days of inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed. Maintainers can also remove the |
This issue was closed because it has been stalled for 7 days with no activity. |
Affected resource(s)
Words
We found a bug in the Turnstile resource:
AddError
is called without areturn
. The State is then saved, and not properly validated by Terraform... leading to corrupted state.I wrote a quick (and dirty) Semgrep rule to try to catch it:
It's not perfect, but it did find the following two files:
Hyperdrive #1
terraform-provider-cloudflare/internal/framework/service/hyperdrive_config/resource.go
Lines 168 to 170 in ba46db6
This looks like a false positive to me.
Hyperdrive #2
terraform-provider-cloudflare/internal/framework/service/hyperdrive_config/resource.go
Lines 175 to 177 in ba46db6
Real finding?
"List item??" #1
terraform-provider-cloudflare/internal/framework/service/list_item/resource.go
Lines 87 to 90 in ba46db6
Real finding?
"List item??" #2
terraform-provider-cloudflare/internal/framework/service/list_item/resource.go
Lines 110 to 112 in ba46db6
Real finding?
I don't own these files (and I'm really no tf expert) - could someone take a look if these are worth fixing?
The text was updated successfully, but these errors were encountered: