From 9bee72f409a3ac9baba792809d3a0a003c915fc0 Mon Sep 17 00:00:00 2001 From: Caroline Wroblewski Date: Tue, 18 Jun 2024 11:35:17 -0500 Subject: [PATCH] Upgrade awssdk to resolve netty-codec-http vulnerability --- build.sbt | 2 +- .../com/rewardsnetwork/pureaws/sqs/SimpleSqsClient.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 9f645a0..c684fcb 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ //Core deps -val amazonV = "2.21.17" +val amazonV = "2.26.4" val catsV = "2.7.0" val catsEffectV = "3.3.14" val fs2V = "3.2.14" diff --git a/modules/sqs/src/main/scala/com/rewardsnetwork/pureaws/sqs/SimpleSqsClient.scala b/modules/sqs/src/main/scala/com/rewardsnetwork/pureaws/sqs/SimpleSqsClient.scala index 71f448d..c86d218 100644 --- a/modules/sqs/src/main/scala/com/rewardsnetwork/pureaws/sqs/SimpleSqsClient.scala +++ b/modules/sqs/src/main/scala/com/rewardsnetwork/pureaws/sqs/SimpleSqsClient.scala @@ -4,7 +4,7 @@ import cats.syntax.all._ import cats.effect._ import fs2.Stream import software.amazon.awssdk.regions.Region -import software.amazon.awssdk.services.sqs.model.QueueAttributeName.ALL +import software.amazon.awssdk.services.sqs.model.MessageSystemAttributeName.ALL import software.amazon.awssdk.services.sqs.model._ import scala.jdk.CollectionConverters._ @@ -99,7 +99,7 @@ object SimpleSqsClient { .visibilityTimeout(visibilityTimeoutSeconds) .waitTimeSeconds(waitTimeSeconds) - val reqWithMaybeAttrs = (if (receiveAttrs) req.attributeNames(ALL).messageAttributeNames(ALL.toString) else req).build + val reqWithMaybeAttrs = (if (receiveAttrs) req.messageSystemAttributeNames(ALL).messageAttributeNames(ALL.toString) else req).build client .receiveMessageStream(reqWithMaybeAttrs)