Commit e9f25f4
Replace npx with pinned npm-tools and add security hardening (#21166)
* [dev] disable npm lifecycle scripts and npx
* Add npm-tools
* update npm-tools
* dev/image/Dockerfile
* update
Co-authored-by: Ona <no-reply@ona.com>
* Bump leeay version to 0.10.6
Co-authored-by: Ona <no-reply@ona.com>
* Fix npx removal to also delete the target script
The symlink at /root/.nvm/.../bin/npx points to npx-cli.js.
Remove both to ensure npx is fully disabled.
Co-authored-by: Ona <no-reply@ona.com>
* Remove gce-github-runner usage from all workflows
Replace self-hosted GCE runner pattern with GitHub-hosted ubuntu-latest runners across all workflows. This removes the three-phase pattern (create-runner, use-runner, delete-runner) and simplifies workflow execution.
Changes:
- Remove create-runner and delete-runner jobs from all workflows
- Replace runs-on: ${{ needs.create-runner.outputs.label }} with runs-on: ubuntu-latest
- Remove create-runner from job dependencies
- Preserve all other job dependencies and concurrency controls
Affected workflows:
- build.yml (8 jobs)
- workspace-integration-tests.yml (4 jobs)
- ide-integration-tests.yml (4 jobs)
- preview-env-check-regressions.yml (4 jobs)
- preview-env-gc.yml (2 jobs)
- jetbrains-auto-update-template.yml (1 job)
- jetbrains-integration-test.yml (1 job)
- code-nightly.yml (1 job)
- preview-env-delete.yml (1 job)
Co-authored-by: Ona <no-reply@ona.com>
* [dev] use ubuntu-latest-16-cores for builds
* Fix container permissions for GitHub-hosted runners
Add 'options: --user root' to all container configurations to resolve EACCES permission errors when GitHub Actions tries to write to internal directories.
GitHub-hosted runners require containers to run as root to allow the Actions runtime to write to /__w/_temp/_runner_file_commands/ and other internal paths.
Affected workflows:
- build.yml (3 container jobs)
- workspace-integration-tests.yml (2 container jobs)
- ide-integration-tests.yml (2 container jobs)
- preview-env-check-regressions.yml (1 container job)
- preview-env-gc.yml (1 container job)
- jetbrains-auto-update-template.yml (1 container job)
- jetbrains-integration-test.yml (1 container job)
- code-nightly.yml (1 container job)
Co-authored-by: Ona <no-reply@ona.com>
* Fix dev/image build by adding leeway dependency for npm-tools
Create leeway generic build for dev/npm-tools and use it as a dependency in dev/image:docker build. This resolves the build error where npm-tools files were not accessible during Docker build.
Changes:
- Add dev/npm-tools/BUILD.yaml with generic package containing package.json and package-lock.json
- Add dev/npm-tools:pkg as dependency in dev/image/BUILD.yaml
- Update Dockerfile to use COPY from leeway dependency path (dev-npm-tools--pkg/)
This follows the established pattern used in other builds like install/installer where dependencies are copied from leeway-generated paths.
Co-authored-by: Ona <no-reply@ona.com>
* Fix npm-tools installation permissions in dev/image
Add chown command to fix EACCES permission error when installing npm-tools. The COPY command creates files owned by root, but npm ci runs as gitpod user and needs write access to create node_modules.
Changes:
- Add 'sudo chown -R gitpod:gitpod /opt/npm-tools' before npm ci
- This ensures the gitpod user can write to /opt/npm-tools/node_modules/
Error fixed:
npm error code EACCES
npm error syscall mkdir
npm error path /opt/npm-tools/node_modules
npm error errno -13
Co-authored-by: Ona <no-reply@ona.com>
* [dev] Split builds into branch and main
Co-authored-by: Ona <no-reply@ona.com>
---------
Co-authored-by: Cornelius Ludmann <cornelius@ona.com>
Co-authored-by: Ona <no-reply@ona.com>
Co-authored-by: Gero Posmyk-Leinemann <gero@gitpod.io>1 parent f650690 commit e9f25f4
File tree
24 files changed
+4388
-263
lines changed- .devcontainer
- .github/workflows
- components
- gitpod-db
- server
- ws-manager-bridge
- dev
- image
- npm-tools
- test
24 files changed
+4388
-263
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
339 | 363 | | |
340 | 364 | | |
341 | 365 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 32 | | |
42 | 33 | | |
43 | | - | |
44 | | - | |
| 34 | + | |
| 35 | + | |
45 | 36 | | |
46 | 37 | | |
47 | 38 | | |
| |||
112 | 103 | | |
113 | 104 | | |
114 | 105 | | |
115 | | - | |
| 106 | + | |
| 107 | + | |
116 | 108 | | |
117 | 109 | | |
118 | 110 | | |
119 | | - | |
| 111 | + | |
120 | 112 | | |
121 | 113 | | |
| 114 | + | |
122 | 115 | | |
123 | 116 | | |
124 | 117 | | |
| |||
135 | 128 | | |
136 | 129 | | |
137 | 130 | | |
138 | | - | |
| 131 | + | |
| 132 | + | |
139 | 133 | | |
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
144 | | - | |
| 138 | + | |
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
| |||
166 | 160 | | |
167 | 161 | | |
168 | 162 | | |
169 | | - | |
170 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
171 | 166 | | |
172 | 167 | | |
173 | 168 | | |
| |||
189 | 184 | | |
190 | 185 | | |
191 | 186 | | |
| 187 | + | |
192 | 188 | | |
193 | 189 | | |
194 | 190 | | |
| |||
399 | 395 | | |
400 | 396 | | |
401 | 397 | | |
402 | | - | |
403 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
404 | 401 | | |
405 | 402 | | |
406 | 403 | | |
| |||
439 | 436 | | |
440 | 437 | | |
441 | 438 | | |
442 | | - | |
| 439 | + | |
443 | 440 | | |
444 | | - | |
| 441 | + | |
445 | 442 | | |
446 | 443 | | |
447 | 444 | | |
| |||
489 | 486 | | |
490 | 487 | | |
491 | 488 | | |
492 | | - | |
493 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
494 | 492 | | |
495 | 493 | | |
496 | 494 | | |
| |||
518 | 516 | | |
519 | 517 | | |
520 | 518 | | |
521 | | - | |
522 | | - | |
| 519 | + | |
| 520 | + | |
523 | 521 | | |
524 | 522 | | |
| 523 | + | |
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
| |||
551 | 550 | | |
552 | 551 | | |
553 | 552 | | |
554 | | - | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
| |||
563 | 561 | | |
564 | 562 | | |
565 | 563 | | |
566 | | - | |
567 | 564 | | |
568 | 565 | | |
569 | 566 | | |
| |||
573 | 570 | | |
574 | 571 | | |
575 | 572 | | |
576 | | - | |
577 | 573 | | |
578 | 574 | | |
579 | 575 | | |
| |||
587 | 583 | | |
588 | 584 | | |
589 | 585 | | |
| 586 | + | |
590 | 587 | | |
591 | 588 | | |
592 | 589 | | |
| |||
598 | 595 | | |
599 | 596 | | |
600 | 597 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | | - | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 11 | | |
18 | | - | |
19 | | - | |
| 12 | + | |
20 | 13 | | |
21 | 14 | | |
| 15 | + | |
22 | 16 | | |
23 | 17 | | |
24 | 18 | | |
| |||
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 35 | | |
42 | 36 | | |
43 | | - | |
44 | | - | |
| 37 | + | |
45 | 38 | | |
46 | 39 | | |
| 40 | + | |
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
| |||
96 | 90 | | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
100 | | - | |
| 93 | + | |
| 94 | + | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
| |||
128 | 122 | | |
129 | 123 | | |
130 | 124 | | |
131 | | - | |
132 | | - | |
| 125 | + | |
| 126 | + | |
133 | 127 | | |
134 | 128 | | |
| 129 | + | |
135 | 130 | | |
136 | 131 | | |
137 | 132 | | |
| |||
216 | 211 | | |
217 | 212 | | |
218 | 213 | | |
219 | | - | |
| 214 | + | |
220 | 215 | | |
221 | | - | |
| 216 | + | |
222 | 217 | | |
223 | 218 | | |
224 | 219 | | |
| |||
231 | 226 | | |
232 | 227 | | |
233 | 228 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
0 commit comments