Skip to content

Commit c2f4b3e

Browse files
Universal: Update aws-java-sdk-s3 due to CVE-2022-31159 (#268)
1 parent 1c2435b commit c2f4b3e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/universal/.devcontainer/local-features/setup-user/install.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ chmod +x /etc/profile.d/00-restore-env.sh
2020

2121
export DEBIAN_FRONTEND=noninteractive
2222

23+
# Temporary: Due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31159
24+
# Delete the current plugin
25+
GRADLE_PATH=$(cd /usr/local/sdkman/candidates/gradle/7*/lib/plugins/ && pwd)
26+
rm -f ${GRADLE_PATH}/aws-java-sdk-s3-*
27+
28+
# Install "aws-java-sdk-s3" plugin with version >= 1.12.261
29+
curl -sSL https://github.com/aws/aws-sdk-java/archive/refs/tags/1.12.363.tar.gz | tar -xzC /tmp 2>&1
30+
jar cf ${GRADLE_PATH}/aws-java-sdk-s3-1.12.363.jar /tmp/aws-sdk-java-1.12.363/aws-java-sdk-s3
31+
rm -rf /tmp/aws-sdk-java-1.12.363
32+
2333
# Temporary: Upgrade NPM packages due to mentioned CVEs.
2434
# decode-uri-component: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-38900
2535
# ansi-regex: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3807

src/universal/test-project/test.sh

100755100644
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ check "oryx-install-java-12.0.2" oryx prep --skip-detection --platforms-and-vers
170170
check "java-12.0.2-installed-by-oryx" ls /opt/java/ | grep 12.0.2
171171
check "java-version-on-path-is-12.0.2" java --version | grep 12.0.2
172172

173+
# Test patches
174+
GRADLE_PATH=$(cd /usr/local/sdkman/candidates/gradle/7*/lib/plugins && pwd)
175+
check "aws-java-sdk-s3-plugin" bash -c "ls ${GRADLE_PATH} | grep aws-java-sdk-s3-1.12.363.jar"
176+
173177
cd /usr/local/share/nvm/versions/node/v14*/lib/node_modules/npm
174178
decodeVersion=$(npm ls --depth 1 --json | jq -r '.dependencies."decode-uri-component".version')
175179
check-version-ge "decode-uri-component" "${decodeVersion}" "0.2.1"

0 commit comments

Comments
 (0)