Skip to content

fix(rust): disable aws-sdk-dsql default features to drop legacy rustls 0.21#516

Merged
anwesham-lab merged 1 commit into
awslabs:mainfrom
cwoolum:fix/rust-sqlx-disable-aws-sdk-dsql-default-features
Jul 14, 2026
Merged

fix(rust): disable aws-sdk-dsql default features to drop legacy rustls 0.21#516
anwesham-lab merged 1 commit into
awslabs:mainfrom
cwoolum:fix/rust-sqlx-disable-aws-sdk-dsql-default-features

Conversation

@cwoolum

@cwoolum cwoolum commented May 22, 2026

Copy link
Copy Markdown
Contributor

Summary

aws-sdk-dsql's default features include rustls, which activates aws-smithy-runtime/tls-rustls and pulls the legacy stack — hyper-rustls 0.24 and rustls 0.21 — into the dep graph. The older rustls-webpki 0.101.7 it transitively depends on is the subject of GHSA-82j2-j2ch-gfr8.

Discussion: smithy-lang/smithy-rs#4651. The smithy-rs maintainers' recommended mitigation for downstream crates is default-features = false on AWS SDK crates and only enabling what's actually needed.

This connector imports only aws_sdk_dsql::auth_token (AuthTokenGenerator, Config) for request signing — see src/token.rs and src/pool.rs. The SDK HTTP client and TLS features are never touched at runtime, so disabling defaults is safe and surgical.

After this change, cargo tree --all-features no longer lists rustls 0.21, rustls-webpki 0.101, hyper-rustls 0.24, or tokio-rustls 0.24.

Test plan

  • cargo build --all-features — clean build
  • cargo test --all-features --lib — all 67 unit tests pass
  • cargo tree --all-features | grep -E "rustls 0\.21|rustls-webpki 0\.101|hyper-rustls 0\.24" — no matches

…stls 0.21

aws-sdk-dsql's default features include `rustls`, which activates
aws-smithy-runtime/tls-rustls and pulls hyper-rustls 0.24 / rustls 0.21
into the dep graph (legacy stack, vulnerable to GHSA-82j2-j2ch-gfr8).

The connector only uses aws_sdk_dsql::auth_token (request signing); the
SDK HTTP client and TLS features are never touched at runtime, so
default-features = false is safe and removes the legacy stack entirely.

Refs: smithy-lang/smithy-rs#4651
@cwoolum

cwoolum commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

@amaksimo , would you accept this PR?

@cwoolum

cwoolum commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

@praba2210 , would you be able to take a look at this?

@kushagraS3cured

Copy link
Copy Markdown

Can we have this PR looked at please? @amaksimo maybe?

@kcwinner

Copy link
Copy Markdown

Any chance we could get this reviewed?

@anwesham-lab

Copy link
Copy Markdown
Member

Looking into what's going wrong with the checks, but should be good to merge and I'll get it in today

@anwesham-lab anwesham-lab reopened this Jul 14, 2026
@anwesham-lab anwesham-lab merged commit 71262c8 into awslabs:main Jul 14, 2026
28 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants