File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 44 init : |
55 mkdir node_modules
66 cp -r /home/gitpod/.cache/workspace/* ./node_modules
7- yarn
7+ yarn --ignore-scripts
88 yarn compile
99 command : |
1010 touch __init_task_done__
Original file line number Diff line number Diff line change 11FROM gitpod/workspace-full
22
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+
313# Create a new image and publish it to dockerhub, then use it directly in .gitpod.yml
414# as prebuils for integration test makes no sense because a new environment is created
515# every time
616RUN cd /tmp \
717 && git clone https://github.com/gitpod-io/python-test-workspace --depth=1 --single-branch --branch=master \
818 && cd python-test-workspace \
9- && yarn \
19+ && yarn --ignore-scripts \
1020 && mkdir -p /home/gitpod/.cache/workspace \
1121 && cp -r ./node_modules /home/gitpod/.cache/workspace \
1222 && python3 -m pip install --upgrade ipykernel \
13- && npm_config_yes=true npx playwright install-deps \
14- && npm_config_yes=true npx playwright install
23+ && yarn playwright install-deps \
24+ && yarn playwright install
You can’t perform that action at this time.
0 commit comments