We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7ad27b9 + 22202cd commit a0dd7b0Copy full SHA for a0dd7b0
gitpod/gitpod.Dockerfile
@@ -1,4 +1,14 @@
1
FROM gitpod/workspace-full:latest
2
3
+# Disable npm lifecycle scripts and npx for security
4
+RUN npm config set ignore-scripts true --location=user && \
5
+ echo 'ignore-scripts true' >> ~/.yarnrc && \
6
+ NPX_PATH=$(which npx) && \
7
+ rm -f "$NPX_PATH" && \
8
+ echo '#!/bin/sh' > "$NPX_PATH" && \
9
+ echo 'echo "npx is disabled for security reasons. Use explicit package installation instead." >&2' >> "$NPX_PATH" && \
10
+ echo 'exit 1' >> "$NPX_PATH" && \
11
+ chmod +x "$NPX_PATH"
12
+
13
# Cache firebase
-RUN npm install --global npm firebase firebase-tools
14
+RUN npm install --global --ignore-scripts npm firebase firebase-tools
0 commit comments