Skip to content

Commit 1c2435b

Browse files
Javascript-node & universal: Update 'minimatch' due to CVE-2022-3517 (#248)
* patch * add check * Patch for universal * patch javascript-node * update check-version-ge * patch universal * update manifest * nit * Patch * update: javascript * update universal * update test * check without --save * debug * remove debug * add checks * Remove unwanted check! * Add comment * remove unwanted checks * update with wildcard * update checks
1 parent de41b62 commit 1c2435b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/javascript-node/.devcontainer/library-scripts/add-patch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ IMAGE_VARIANT=$1
55
# Temporary: These packages are installed by the base image (node) for `node:14` which does not have the patch.
66
# Upgrade 'decode-uri-component' due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-38900
77
# Upgrade 'ansi-regex ' due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3807
8+
# Upgrade 'minimatch' due to https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-3517
89
if [[ "${IMAGE_VARIANT}" =~ "14" ]] ; then
910
cd /usr/local/lib/node_modules/npm
1011
npm update --save

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ export DEBIAN_FRONTEND=noninteractive
2323
# Temporary: Upgrade NPM packages due to mentioned CVEs.
2424
# decode-uri-component: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-38900
2525
# ansi-regex: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3807
26+
# minimatch: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-3517
2627
NPM_PACKAGES_LIST="decode-uri-component
27-
ansi-regex"
28+
ansi-regex
29+
minimatch"
2830

2931
cd /usr/local/share/nvm/versions/node/v14*/lib/node_modules/npm
3032
npm install ${NPM_PACKAGES_LIST}

src/universal/test-project/test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,16 @@ 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-
cd /usr/local/share/nvm/versions/node/v14.21.1/lib/node_modules/npm
173+
cd /usr/local/share/nvm/versions/node/v14*/lib/node_modules/npm
174174
decodeVersion=$(npm ls --depth 1 --json | jq -r '.dependencies."decode-uri-component".version')
175175
check-version-ge "decode-uri-component" "${decodeVersion}" "0.2.1"
176176

177177
ansiVersion=$(npm ls --depth 1 --json | jq -r '.dependencies."ansi-regex".version')
178178
check-version-ge "ansi-regex" "${ansiVersion}" "6.0.0"
179179

180+
minimatchVersion=$(npm ls --depth 1 --json | jq -r '.dependencies.minimatch.version')
181+
check-version-ge "minimatch" "${minimatchVersion}" "3.0.5"
182+
180183
ls -la /home/codespace
181184

182185
# Report result

0 commit comments

Comments
 (0)