Skip to content

Commit 2ae9936

Browse files
CVE-2024-21538 fix cross-spawn vulnerability2
1 parent 3ab53c9 commit 2ae9936

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ WORKDIR /tmp
1515
# add node repo and call 'apt-get update'
1616
RUN bash ./setup_18.x && $APT_INSTALL build-essential python3-pip python3.10-dev net-tools apt-utils
1717

18-
RUN npm install -g cross-spawn@7.0.5
19-
2018
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
2119

2220
# Fix vulnerabilities / outdated versions
@@ -29,6 +27,13 @@ RUN $APT_UPDATE && $APT_INSTALL \
2927
unzip software-properties-common apt-transport-https \
3028
openjdk-11-jdk xvfb siege apache2-utils git make nodejs locales tsung libtool libssl-dev libyaml-dev libxml2-dev libxslt-dev
3129

30+
# Verify Node.js and npm installation
31+
RUN node -v && npm -v || \
32+
($APT_UPDATE && $APT_INSTALL npm)
33+
34+
# Install cross-spawn globally
35+
RUN npm install -g cross-spawn@7.0.5
36+
3237
# Install .NET sdk
3338
# check this page for the links and hash
3439
# https://dotnetcli.azureedge.net/dotnet/release-metadata/8.0/releases.json

0 commit comments

Comments
 (0)