-
Notifications
You must be signed in to change notification settings - Fork 10.1k
chore: Bump golang.org/x/crypto dependency, ignore SA4003 linting errors globally #37901
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
Conversation
These code consistency errors are related to use of go generate with a stringer tool:
I'm unsure why these decided to appear on this PR, but here we are Edit: the static analysis passes on ✨ my machine ✨ |
I think the solution is to stop this is: -type OperationType uint
+type OperationType intas that'll result in different generated code that doesn't trigger this static check. The other types that we use Alternatively, we can disable the |
…s/cmd/stringer` is used with custom types that have unsigned integers as underlying types
Backported dependency changeThis PR makes changes to dependencies in go.mod file(s) and is labelled for backport. Notice to the maintainer: Before merging the backport of this PR please follow our security scanning processes. |
…s/cmd/stringer` is used with custom types that have byte as the underlying type byte values also cannot take negative values
|
Now I've suppressed the linting errors the code consistency check is now progressing further and telling me:
And this makes the linter errors above make more sense; the new generated code has |
|
Oh, what an adventure 😅 Thanks for looking into this Looks like the x/tools bump to 0.38.0 includes this change golang/tools@82041a1 which updates the stringer logic What do you think about adding |
dbanck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
| golang.org/x/crypto v0.42.0 | ||
| golang.org/x/mod v0.27.0 | ||
| golang.org/x/net v0.44.0 | ||
| golang.org/x/crypto v0.44.0 | ||
| golang.org/x/mod v0.29.0 | ||
| golang.org/x/net v0.46.0 | ||
| golang.org/x/oauth2 v0.27.0 | ||
| golang.org/x/sys v0.36.0 | ||
| golang.org/x/term v0.35.0 | ||
| golang.org/x/text v0.29.0 | ||
| golang.org/x/tools v0.36.0 | ||
| golang.org/x/sys v0.38.0 | ||
| golang.org/x/term v0.37.0 | ||
| golang.org/x/text v0.31.0 | ||
| golang.org/x/tools v0.38.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of these upgrades, the majority of the minor versions are just the dependency updating their internal dependencies to latest versions.
The more relevant changes are:
|
Testing the Testing the I'm currently provisioning the resources needed to test the azure backend... |
| # We are skipping: | ||
| # -ST*: Style-related checks, since terraform intentionally breaks some of these. | ||
| # -SA1019: Function deprecation checks because our policy is to update deprecated calls locally while making other nearby changes, rather than to make cross-cutting changes to update them all. | ||
| # -SA4003: Comparing unsigned values against negative values checks; we generate code using golang.org/x/tools/cmd/stringer that introduces this issues when used with custom types that have unsigned underlying types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # -SA4003: Comparing unsigned values against negative values checks; we generate code using golang.org/x/tools/cmd/stringer that introduces this issues when used with custom types that have unsigned underlying types. | |
| # -SA4003: Comparing unsigned values against negative values checks; we generate code using golang.org/x/tools/cmd/stringer that introduces these issues when used with custom types that have unsigned underlying types. |
|
Unable to test the |
Fixes this vulnerability, which doesn't necessarily impact users of Terraform but will almost certainly cause our release pipelines to block our upcoming release 🫠
Target Release
1.14.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry