Skip to content

Commit e91c1d9

Browse files
authored
Merge pull request #27 from gitpod-io/pde-128-disable-npm-scripts
Disable npm lifecycle scripts and npx for security
2 parents e843a78 + 18b937c commit e91c1d9

File tree

6 files changed

+16
-8
lines changed

6 files changed

+16
-8
lines changed

.github/workflows/gitpod-web-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: Execute yarn
2828
run: |
29-
yarn --frozen-lockfile
29+
yarn --frozen-lockfile --ignore-scripts
3030
3131
- name: Update Segment
3232
working-directory: ./gitpod-web

.github/workflows/release-gitpod-remote.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- name: Install dependencies
1717
run: |
18-
yarn install --frozen-lockfile
18+
yarn install --frozen-lockfile --ignore-scripts
1919
2020
- name: Update Segment
2121
working-directory: ./gitpod-remote
@@ -40,13 +40,13 @@ jobs:
4040
- name: Publish to MS Marketplace
4141
working-directory: ./gitpod-remote
4242
run: |
43-
npx vsce publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
43+
yarn vsce publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
4444
env:
4545
VSCE_PAT: ${{ secrets.VSCE_PAT }}
4646

4747
- name: Publish to Open VSX Registry
4848
working-directory: ./gitpod-remote
4949
run: |
50-
npx ovsx publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
50+
yarn ovsx publish --packagePath ${{ steps.package_vsix.outputs.vsix_path }}
5151
env:
5252
OVSX_PAT: ${{ secrets.OPEN_VSX_PAT }}

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: gitpod/workspace-node
22
tasks:
33
- init: |
4-
yarn install
4+
yarn install --ignore-scripts
55
name: Compile gitpod-shared
66
command: |
77
cd gitpod-shared

gitpod-remote/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,11 @@
359359
"build:webview": "node esbuild.js",
360360
"watch:webview": "node esbuild.js --watch",
361361
"start:webview": "sirv public --no-clear",
362-
"package": "npx vsce package --yarn --allow-star-activation"
362+
"package": "yarn vsce package --yarn --allow-star-activation"
363363
},
364364
"devDependencies": {
365+
"@vscode/vsce": "^2.22.0",
366+
"ovsx": "^0.8.3",
365367
"@tsconfig/svelte": "^2.0.0",
366368
"@types/node": "16.x",
367369
"@types/vscode": "1.75.0",

gitpod-web/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,12 @@
563563
"build:webview": "node esbuild.js",
564564
"watch:webview": "node esbuild.js --watch",
565565
"start:webview": "sirv public --no-clear",
566-
"update-dts": "cd \"src/@types\" && npx vscode-dts dev",
567-
"package": "npx vsce package --yarn --allow-star-activation"
566+
"update-dts": "cd \"src/@types\" && yarn vscode-dts dev",
567+
"package": "yarn vsce package --yarn --allow-star-activation"
568568
},
569569
"devDependencies": {
570+
"@vscode/vsce": "^2.22.0",
571+
"vscode-dts": "^0.3.3",
570572
"@parcel/watcher": "^2.1.0",
571573
"@tsconfig/svelte": "^2.0.0",
572574
"@types/js-yaml": "^4.0.5",

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
"dependencies": {
88
"glob": "^8.1.0"
99
},
10+
"devDependencies": {
11+
"@vscode/vsce": "^2.22.0",
12+
"ovsx": "^0.8.3"
13+
},
1014
"scripts": {
1115
"postinstall": "node scripts/postinstall.js",
1216
"compile:gitpod-shared": "yarn --cwd gitpod-shared compile",

0 commit comments

Comments
 (0)