Upgrade oauth2 from v0.25.0 to v0.27.0 #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
oauth2from version 0.25.0 to 0.27.0 in order to resolve CVE-2025-22868.Test Plan
Built and tested the new
s5cmdbinary. Here's a Claude-generated testing report:s5cmd Testing Report - oauth2 Upgrade from v0.25.0 to v0.27.0
Upgrade Process Summary
We successfully upgraded the
golang.org/x/oauth2dependency from v0.25.0 to v0.27.0 in s5cmd. This document details the testing process and validation of the upgrade.Initial Status Check
First, we verified the existing version of oauth2 in the go.mod file:
Upgrade and Build Process
1. Updating Dependencies
We modified the go.mod file to specify the newer version:
After updating go.mod, we ran
go mod tidyto update go.sum and ensure all dependencies were aligned:$ docker run --rm -v /Users/jyoung/code/s5cmd:/s5cmd -w /s5cmd golang:latest go mod tidy go: downloading golang.org/x/oauth2 v0.27.0 go: downloading github.com/hashicorp/go-hclog v1.6.3 # Additional dependency updates omitted for brevity2. Testing the Build
We built the project to ensure it compiles with the new dependency:
$ docker run --rm -v /Users/jyoung/code/s5cmd:/s5cmd -w /s5cmd golang:latest go build -o s5cmd go: downloading golang.org/x/oauth2 v0.27.0 # Additional dependency downloads omitted for brevityThe build completed successfully with no errors.
3. Initial Binary Build with goreleaser
We used goreleaser to build the binary for all supported platforms:
This created binaries for all required platforms in the
distdirectory.Testing the Binaries
1. Basic Functionality Testing
We tested the built binary to ensure it remained functional:
We also tested the basic functionality with a local file listing:
2. Verifying oauth2 Version
We confirmed the binaries were built with the correct version of oauth2:
For a more definitive check, we used Go's module verification tools:
This confirmed the binary was using oauth2 v0.27.0.
Conclusion
The upgrade of oauth2 from v0.25.0 to v0.27.0 was successful. The built binaries:
All test results indicate the upgrade is compatible and ready for deployment.