File tree Expand file tree Collapse file tree 2 files changed +0
-12
lines changed
Expand file tree Collapse file tree 2 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -336,12 +336,6 @@ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh |
336336 && nvm install v${NODE_VERSION} \
337337 && nvm alias default v${NODE_VERSION}"
338338
339- # Disable npm/yarn lifecycle scripts by default (security hardening)
340- # To allow specific packages, use: npm rebuild <package> or yarn rebuild <package>
341- RUN npm config set ignore-scripts true --location=global && \
342- npm config set ignore-scripts true --location=user && \
343- echo 'ignore-scripts true' >> ~/.yarnrc
344-
345339# Disable npx (security hardening - prevents arbitrary package execution)
346340# Remove npx from NVM and replace with stub that prints warning
347341RUN rm -f /usr/bin/npx /usr/local/bin/npx && \
Original file line number Diff line number Diff line change @@ -129,12 +129,6 @@ RUN bash -c ". .nvm/nvm.sh \
129129 && nvm install $GITPOD_NODE_VERSION"
130130ENV PATH=/home/gitpod/.nvm/versions/node/v${GITPOD_NODE_VERSION}/bin:$PATH
131131
132- # Disable npm/yarn lifecycle scripts by default (security hardening)
133- # To allow specific packages, use: npm rebuild <package> or yarn rebuild <package>
134- RUN npm config set ignore-scripts true --location=global && \
135- npm config set ignore-scripts true --location=user && \
136- echo 'ignore-scripts true' >> ~/.yarnrc
137-
138132# Disable npx (security hardening - prevents arbitrary package execution)
139133RUN sudo rm -f /usr/bin/npx /usr/local/bin/npx /home/gitpod/.nvm/versions/node/v${GITPOD_NODE_VERSION}/bin/npx && \
140134 echo '#!/bin/sh' | sudo tee /usr/local/bin/npx > /dev/null && \
You can’t perform that action at this time.
0 commit comments