[agent] chore(deps): migrate aws-sdk v2 to @aws-sdk/client-s3 v3#747
Draft
github-actions[bot] wants to merge 1 commit into
Draft
[agent] chore(deps): migrate aws-sdk v2 to @aws-sdk/client-s3 v3#747github-actions[bot] wants to merge 1 commit into
@aws-sdk/client-s3 v3#747github-actions[bot] wants to merge 1 commit into
Conversation
Addresses GHSA-j965-2qgj-vjmq (Dependabot alerts #94 and #95): AWS SDK for JavaScript v2 reached end-of-support on 2025-09-08. The advisory recommends migrating to v3 for continued support and enhanced security features. Changes: - Replace 'aws-sdk' with '@aws-sdk/client-s3' in packages/dl-center - Migrate DownloadCenter class to use S3Client, GetObjectCommand, PutObjectCommand from v3 SDK - Keep S3BucketConfig interface backward-compatible (s3ForcePathStyle and sslEnabled map to forcePathStyle and tls internally) - downloadAsset now returns Buffer (reads stream to completion using Body.transformToByteArray()) - Export Content type for upload body Co-authored-by: Copilot <[email protected]>
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
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.
Addresses Dependabot alerts #94 and #95: GHSA-j965-2qgj-vjmq — AWS SDK for JavaScript v2 users should migrate to v3.
Summary
AWS SDK for JavaScript v2 (
aws-sdk) reached end-of-support on September 8, 2025. This advisory (CVSSv3.1: 3.7 LOW, CWE-20 Improper Input Validation) recommends migrating to v3 for continued security support. There is no patched v2 release — migration to v3 is the only remediation.Changes
packages/dl-center/package.json: replacedaws-sdk: ^2.1441.0with@aws-sdk/client-s3: ^3.1045.0packages/dl-center/src/download-center.ts:S3Client,GetObjectCommand,PutObjectCommandfrom@aws-sdk/client-s3DownloadCenterconstructor now creates anS3Clientinstead ofS3(v2)S3BucketConfiginterface is kept backward-compatible:s3ForcePathStylemaps toforcePathStyle,sslEnabledmaps totls; added optionalregion(defaults tous-east-1)downloadAssetreads the response stream to aBufferviaBody.transformToByteArray()uploadAssetusesPutObjectCommandvias3.send()Contenttype to replace the removed v2Bodytype aliasTest results
10/11 tests pass. The 1 failure (
can upload and download a valid config file) is a pre-existing sandbox network issue (the fixturecompass.jsonreferences livedownloads.mongodb.comURLs that are blocked in the sandbox environment) — this test was also failing before this change.