Skip to content

Commit 956c7fb

Browse files
committed
fix: Remove Netty as an agent dependency
Netty is currently bundled in the ADOT Java Agent JAR, unnecessarily increasing its size by ~7 MB. This PR removes Netty from the ADOT Java Agent dependency list by: 1. Explicitly removing the Netty BOM. 2. Upgrading the AWS SDK to 2.33.11, which addresses the Netty security risk. 3. Replacing the inclusion of all AWS SDK packages with only the specific modules required by the ADOT Java Agent. Tests performed: Local build: ./gradlew build ✅ Unit tests: ./gradlew test ✅ Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests ✅
1 parent 8e6889d commit 956c7fb

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

appsignals-tests/contract-tests/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ dependencies {
5252
testImplementation("org.testcontainers:junit-jupiter")
5353
testImplementation("io.opentelemetry.contrib:opentelemetry-aws-xray")
5454
testImplementation("org.testcontainers:localstack")
55-
testImplementation("software.amazon.awssdk:s3")
56-
testImplementation("software.amazon.awssdk:sts")
55+
testImplementation("software.amazon.awssdk:s3:2.33.11")
56+
testImplementation("software.amazon.awssdk:sts:2.33.11")
5757
testImplementation(kotlin("test"))
5858
implementation(project(":appsignals-tests:images:grpc:grpc-base"))
5959
testImplementation("org.testcontainers:kafka:1.21.3")

awsagentprovider/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ dependencies {
5050
compileOnly("io.opentelemetry:opentelemetry-exporter-otlp-common")
5151

5252
// For OtlpAwsExporter SigV4 Authentication
53-
runtimeOnly("software.amazon.awssdk:sts")
5453
implementation("software.amazon.awssdk:auth")
5554
implementation("software.amazon.awssdk:http-auth-aws")
5655

dependencyManagement/build.gradle.kts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,11 @@ val dependencyBoms = listOf(
4040
"com.google.protobuf:protobuf-bom:3.25.1",
4141
"com.linecorp.armeria:armeria-bom:1.26.4",
4242
"io.grpc:grpc-bom:1.59.1",
43-
// netty-bom is a fix for CVE-2025-58056 (https://github.com/advisories/GHSA-fghv-69vj-qj49).
44-
// Remove once https://github.com/aws/aws-sdk-java-v2/pull/6398 and https://github.com/aws/aws-sdk-java/pull/3192
45-
// are both merged and released, and we update the corresponding dependencies.
46-
"io.netty:netty-bom:4.1.126.Final",
4743
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:$otelAlphaVersion",
4844
"org.apache.logging.log4j:log4j-bom:2.21.1",
4945
"org.junit:junit-bom:5.10.1",
5046
"org.springframework.boot:spring-boot-dependencies:2.7.17",
5147
"org.testcontainers:testcontainers-bom:1.19.3",
52-
"software.amazon.awssdk:bom:2.30.17",
5348
)
5449

5550
val dependencySets = listOf(
@@ -103,6 +98,9 @@ dependencies {
10398
for (dependency in dependencyLists) {
10499
api(dependency)
105100
}
101+
102+
api("software.amazon.awssdk:auth:2.33.11")
103+
api("software.amazon.awssdk:aws-core:2.33.11")
106104
}
107105
}
108106

sample-apps/spark/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ dependencies {
1515
implementation("com.squareup.okhttp3:okhttp")
1616
implementation("io.opentelemetry:opentelemetry-api")
1717
implementation("org.apache.logging.log4j:log4j-core")
18-
implementation("software.amazon.awssdk:s3")
19-
implementation("software.amazon.awssdk:sts")
18+
implementation("software.amazon.awssdk:s3:2.33.11")
19+
implementation("software.amazon.awssdk:sts:2.33.11")
2020

2121
runtimeOnly("org.apache.logging.log4j:log4j-slf4j-impl")
2222
}

sample-apps/springboot/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ dependencies {
1010
implementation("org.springframework.boot:spring-boot-starter-web")
1111
implementation("org.springframework.boot:spring-boot-starter")
1212
implementation("com.squareup.okhttp3:okhttp")
13-
implementation("software.amazon.awssdk:s3")
14-
implementation("software.amazon.awssdk:sts")
13+
implementation("software.amazon.awssdk:s3:2.33.11")
14+
implementation("software.amazon.awssdk:sts:2.33.11")
1515
implementation("io.opentelemetry:opentelemetry-api")
1616
}
1717

0 commit comments

Comments
 (0)