-
-
Notifications
You must be signed in to change notification settings - Fork 278
chore: update Go versions in workflows and go.mod files #2026
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
WalkthroughThe changes update the Go programming language version across multiple configurations. The GitHub Actions workflows for coverage, nightly releases, and production releases now use Go 1.24 instead of 1.23. Additionally, the top-level and SDK-specific Changes
Possibly related PRs
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 golangci-lint (1.62.2)level=warning msg="[config_reader] The configuration option Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
sdk/go/grpc/go.mod (1)
3-3: Consider keeping toolchain specification for build consistency.While updating to Go 1.24, consider maintaining the toolchain specification to ensure consistent builds across different environments.
go 1.24 +toolchain go1.24.0
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/coverage.yml(1 hunks).github/workflows/nightly.yaml(1 hunks).github/workflows/release.yml(1 hunks)Makefile(1 hunks)go.mod(1 hunks)sdk/go/grpc/go.mod(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- go.mod
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Test with Coverage
- GitHub Check: Analyze (go)
- GitHub Check: Test with Coverage
🔇 Additional comments (4)
.github/workflows/coverage.yml (1)
22-22:Details
✅ Verification successful
Verify Go version 1.24.
Let's confirm that Go 1.24 is a valid version and check for any breaking changes or deprecations.
🌐 Web query:
What is the latest version of Go? Is Go 1.24 released?💡 Result:
The latest version of Go is 1.24, which was officially released on February 11, 2025[2][6][8][9]. This major update introduces several key improvements:
Language Features
- Full support for generic type aliases, allowing parameterized type declarations[2][5][8].
- A new
runtime.AddCleanupmechanism replacesruntime.SetFinalizerfor safer resource management[2][8].Performance & Tooling
- 2–3% average CPU overhead reduction via optimized runtime components (e.g., Swiss Tables-based map implementation)[2][5].
- New
go get -toolcommand for managing tool dependencies in modules[2][5][8].Standard Library Additions
- FIPS 140-3 compliance mechanisms for cryptographic operations[2][8].
- Enhanced WebAssembly support with
go:wasmexportdirectives and WASI reactor builds[2][8].Compatibility Notes
- Requires Go ≥1.22.6 for bootstrap builds[8].
- Drops support for macOS versions older than Big Sur (11)[3].
For complete details, see the official Go 1.24 Release Notes[8]. Developers can download it from the official Go download page[2].
Citations:
- 1: https://go.dev/doc/devel/release
- 2: https://go.dev/blog/go1.24
- 3: https://is.go.released.info
- 4: https://dev.to/empiree/why-you-should-learn-go-in-2025-308l/comments
- 5: https://golangnugget.com/p/what-to-expect-from-go-1-24-part-1
- 6: https://forum.devtalk.com/t/go-1-24-is-released/187211
- 7: https://bitfieldconsulting.com/posts/rust-vs-go
- 8: https://tip.golang.org/doc/go1.24
- 9: https://app.daily.dev/posts/go-1-24-released-with-major-enhancements-and-new-features-p1bamgs9e
- 10: https://tip.golang.org/doc/next
Go 1.24 is confirmed as valid and consistently used across workflows.
- The web query confirms that Go 1.24 is the latest released version.
- A search through the
.github/workflowsfiles shows that this version is used uniformly..github/workflows/release.yml (1)
26-26: LGTM!The Go version update is consistent with other workflow files and uses the correct version specification format.
.github/workflows/nightly.yaml (1)
26-26: LGTM!The Go version update maintains consistency with other workflow files.
Makefile (1)
71-71:Details
❓ Verification inconclusive
Verify security implications of excluding G115.
Let's understand what security check G115 performs and the implications of excluding it.
🌐 Web query:
What is Gosec G115 check? What security implications does it have?💡 Result:
Gosec's G115 check identifies potential integer overflow vulnerabilities when converting between different integer types in Go code[1][5][8]. This rule specifically targets unsafe type conversions that could lead to unexpected value truncation or wraparound due to differing type sizes (e.g., converting
int64toint32).Key Security Implications
- CWE-190 Vulnerabilities: Directly maps to Common Weakness Enumeration CWE-190 (Integer Overflow or Wraparound)[1][5]
- Critical Security Risks:
- Incorrect resource access through ID manipulation[2][8]
- Infinite loops from miscalculated loop conditions[5]
- Authorization bypass via quota miscalculations[5]
- Memory corruption in low-level operations[8]
Technical Behavior
The rule flags conversions like:
var bigInt int64 = 4294967296 smallInt := int32(bigInt) // Potential overflow (G115 warning)Implementation Challenges
- False Positives: Early versions generated excessive warnings for valid conversions[2][3][7], leading many teams to disable it[3][8]
- Partial Fixes: Recent gosec versions (v2.21.2+) reduced but didn't eliminate false alarms[2][7]
Recommended Mitigations
- Use explicit bounds checking:
if bigInt > math.MaxInt32 || bigInt < math.MinInt32 { return errors.New("overflow risk") } smallInt := int32(bigInt)- Consider libraries like
github.com/ccoveille/go-safecastfor safe conversions[5]- Apply
//nosec G115annotations only after manual verification[1][7]While essential for secure coding practices, G115 requires careful configuration due to its history of false positives in common type conversion patterns[3][7]. Developers should prioritize fixing valid warnings while using exclusion filters judiciously for unavoidable conversion scenarios[2][8].
Citations:
- 1: https://pkg.go.dev/github.com/securego/gosec/v2
- 2: https://dev.to/ccoveille/about-the-gosec-g115-drama-or-how-i-faced-back-integer-conversion-overflow-in-go-1302
- 3: golangci/golangci-lint#4939
- 4: https://pkg.go.dev/github.com/securego/gosec/v2/testutils
- 5: https://pkg.go.dev/github.com/ccoveille/go-safecast
- 6: https://opensource.com/article/20/9/gosec
- 7: securego/gosec#1212
- 8: https://m.php.cn/faq/1796604409.html
- 9: https://linuxsecurity.expert/tools/gosec/
- 10: https://github.com/securego/gosec
Attention: Reassess and Document the G115 Exclusion
The current Makefile command excludes G115—a check that flags unsafe integer type conversions which may lead to integer overflows (CWE-190) and related critical risks (e.g., memory corruption, infinite loops, or miscalculations). Please ensure that:
- Manual Auditing: All code sections where integer conversions occur are manually reviewed to confirm that potential overflow risks are either mitigated (e.g., via explicit bounds checking or safe conversion libraries) or are otherwise controlled.
- Documentation: The exclusion of G115 is well-documented, including your rationale and any compensating controls in place to prevent security vulnerabilities.
- Risk Acceptance: You’ve evaluated that the use cases triggering G115 warnings are false positives or are secure under the current design.
This verification is crucial to ensure that suppressing these warnings does not inadvertently expose security risks in our Go code.
Summary by CodeRabbit