-
Notifications
You must be signed in to change notification settings - Fork 254
Upgrade to aws-sdk-go-v2, v1 is unsupported #548
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dduzgun-security
approved these changes
Sep 3, 2025
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.
LGTM! 👍
ryancragun
approved these changes
Sep 3, 2025
sonamtenzin2
approved these changes
Sep 4, 2025
This was referenced Sep 5, 2025
Hey! At least hashicorp/packer-plugin-sdk utilises v2 version of this package. Are you planning to cherry-pick this change to the |
tgross
added a commit
to hashicorp/nomad
that referenced
this pull request
Sep 9, 2025
The `go-getter` update in #26713 is not passing tests upstream (apparently hashicorp/go-getter#548 is the origin of the problem but that PR did not ever run tests). The issue being fixed isn't a critical vulnerability, so in the interest of preparing us for the next release, revert the `go-getter` change but keep the Go toolchain update. We'll skip go-getter 1.8.0 and pick up the next patch version once its issues are fixed. Reverts commit 8a96929.
tgross
added a commit
to hashicorp/nomad
that referenced
this pull request
Sep 9, 2025
The `go-getter` update in #26713 is not passing tests upstream (apparently hashicorp/go-getter#548 is the origin of the problem but that PR did not ever run tests). The issue being fixed isn't a critical vulnerability, so in the interest of preparing us for the next release, revert the `go-getter` change but keep the Go toolchain update. We'll skip go-getter 1.8.0 and pick up the next patch version once its issues are fixed. Reverts commit 8a96929.
tgross
added a commit
to hashicorp/nomad
that referenced
this pull request
Sep 9, 2025
The `go-getter` update in #26713 is not passing tests upstream (apparently hashicorp/go-getter#548 is the origin of the problem but that PR did not ever run tests). The issue being fixed isn't a critical vulnerability, so in the interest of preparing us for the next release, revert the `go-getter` change but keep the Go toolchain update. We'll skip go-getter 1.8.0 and pick up the next patch version once its issues are fixed. Reverts commit 8a96929. Co-authored-by: Tim Gross <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #509
Supercedes #467
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.
Description
This PR migrates go-getter from
aws-sdk-go
v1 →aws-sdk-go-v2
, and updates AWS domain handling to support all partitions instead of hardcoding the commercial partition.Motivation
aws-sdk-go
v1 on July 31, 2025. Continuing to depend on v1 risks unpatched bugs, incompatibility with future AWS services, and missing security updates. Migrating to v2 ensures long-term compatibility and access to current APIs.".amazonaws.com"
. This prevents usage in GovCloud, China, isolated, and custom partitions. By iterating throughendpoints.DefaultPartitions()
, the new code dynamically detects the correct DNS suffix, enabling broader compatibility.Description of Changes
github.com/aws/aws-sdk-go
v1 withgithub1.rensumo.top/aws/aws-sdk-go-v2
equivalents, including configuration and service clients.strings.HasSuffix(u.Host, ".amazonaws.com")
check.go.mod
andgo.sum
reflect v2 modules and remove v1.Security Impact
aws-sdk-go
v1 (deprecated as of July 31, 2025) to v2 reduces exposure to unpatched vulnerabilities and ensures continued receipt of upstream security fixes..amazonaws.com
. This excluded non-commercial partitions, but also oversimplified endpoint validation.endpoints.DefaultPartitions()
, which is maintained by AWS. This tightens validation by ensuring hosts must match an official partition DNS suffix before being treated as AWS endpoints.config.LoadDefaultConfig
, which centralizes credential resolution (shared config files, environment variables, IAM roles, etc.). This is the recommended and more secure approach compared to v1’ssession.NewSession
.Overall, this change improves security posture by moving to a supported SDK, aligning with AWS best practices for credential resolution, and strengthening endpoint validation. No weakening of authentication, authorization, confidentiality, or integrity controls has been introduced.