Skip to content

Commit a7ea249

Browse files
chore: pin GitHub Actions to SHA for supply chain security (#21189)
Pin all external GitHub Actions to specific commit SHAs to prevent supply chain attacks via malicious tag updates. Actions pinned (27 unique actions, ~100 references): - actions/cache@v3 - actions/checkout@master, @v2, @v4 - actions/github-script@v6, @v7 - actions/setup-go@v2 - actions/setup-java@v4 - actions/stale@v9 - actions/upload-artifact@v4 - authzed/[email protected] - BetaHuhn/repo-file-sync-action@v1 - bufbuild/buf-breaking-action@v1 - bufbuild/buf-lint-action@v1 - bufbuild/buf-setup-action@v1 - configcat/scan-repository@v2 - docker/login-action@v3 - FedericoCarboni/setup-ffmpeg@v1 - filiptronicek/get-last-job-status@main - google-github-actions/auth@v1 - imjasonh/[email protected] - KeisukeYamashita/create-comment@v1 - peter-evans/create-pull-request@v6 - rtCamp/action-slack-notify@v2 - slackapi/[email protected] - test-summary/action@v2 - transferwise/sanitize-branch-name@v1 Exception: - gitpod-io/gh-app-auth: internal action, not pinned Part of PDE-138 Closes PDE-215 Co-authored-by: Ona <[email protected]>
1 parent 10a86a0 commit a7ea249

22 files changed

+97
-97
lines changed

.github/workflows/Monitor Branch Protection Changes.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Send Tampering Alert
17-
uses: slackapi/[email protected]
17+
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # pin@v1.24.0
1818
env:
1919
SLACK_BOT_TOKEN: ${{ secrets.BRANCH_PROTECTION_SLACK_BOT_TOKEN }}
2020
with:
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
- name: Check Branch Protection Rules
7474
id: check-rules
75-
uses: actions/github-script@v7
75+
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # pin@v7
7676
with:
7777
github-token: ${{ secrets.BRANCH_PROTECTION_PAT }}
7878
script: |
@@ -205,7 +205,7 @@ jobs:
205205
206206
- name: Send Slack Notification - Branch Protection Event
207207
if: github.event_name == 'branch_protection_rule'
208-
uses: slackapi/[email protected]
208+
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # pin@v1.24.0
209209
env:
210210
SLACK_BOT_TOKEN: ${{ secrets.BRANCH_PROTECTION_SLACK_BOT_TOKEN }}
211211
with:
@@ -264,7 +264,7 @@ jobs:
264264
265265
- name: Send Slack Notification - Changes Detected
266266
if: steps.check-rules.outputs.changes_detected == 'true'
267-
uses: slackapi/[email protected]
267+
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # pin@v1.24.0
268268
env:
269269
SLACK_BOT_TOKEN: ${{ secrets.BRANCH_PROTECTION_SLACK_BOT_TOKEN }}
270270
with:
@@ -315,7 +315,7 @@ jobs:
315315
316316
- name: Send Slack Notification - Error
317317
if: failure()
318-
uses: slackapi/[email protected]
318+
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # pin@v1.24.0
319319
env:
320320
SLACK_BOT_TOKEN: ${{ secrets.BRANCH_PROTECTION_SLACK_BOT_TOKEN }}
321321
with:

.github/workflows/authorization.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
name: Validate schema
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
1616
- name: Validate SpiceDB schema
17-
uses: authzed/[email protected]
17+
uses: authzed/action-spicedb-validate@3c2214196c200ff012a12d4fc12204efa7a3a416 # pin@v1.0.1
1818
with:
1919
validationfile: "components/spicedb/schema/schema.yaml"

.github/workflows/branch-build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
steps:
6161
- name: "Determine Branch"
6262
id: branches
63-
uses: transferwise/sanitize-branch-name@v1
63+
uses: transferwise/sanitize-branch-name@009d85a96fcfe62a685b371dc8f299e53385ed9c # pin@v1
6464
# Since we trigger this worklow on other event types, besides pull_request
6565
# We use this action to help us get the pr body, as it's not included in push/workflow_dispatch events
6666
- uses: 8BitJonny/[email protected]
@@ -110,7 +110,7 @@ jobs:
110110
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
111111
options: --user root
112112
steps:
113-
- uses: actions/checkout@v4
113+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
114114
- name: Setup Environment
115115
uses: ./.github/actions/setup-environment
116116
with:
@@ -137,7 +137,7 @@ jobs:
137137
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-infrastructure
138138
cancel-in-progress: true
139139
steps:
140-
- uses: actions/checkout@v4
140+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
141141
- name: Setup Environment
142142
uses: ./.github/actions/setup-environment
143143
with:
@@ -189,7 +189,7 @@ jobs:
189189
# GitHub action + MySQL 8.0 need longer to initialize
190190
DB_RETRIES: 5
191191
steps:
192-
- uses: actions/checkout@v4
192+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
193193
- uses: ./.github/actions/setup-environment
194194
with:
195195
identity_provider: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
@@ -240,7 +240,7 @@ jobs:
240240
241241
exit $RESULT
242242
- name: Login to GitHub Container Registry
243-
uses: docker/login-action@v3
243+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # pin@v3
244244
with:
245245
registry: ghcr.io
246246
username: ${{ github.actor }}
@@ -382,12 +382,12 @@ jobs:
382382
echo "No critical vulnerabilities found."
383383
fi
384384
- name: Upload SBOMs
385-
uses: actions/upload-artifact@v4
385+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4
386386
with:
387387
name: sboms
388388
path: ${{ steps.scan.outputs.leeway_sboms_dir }}
389389
- name: Upload vulnerability reports
390-
uses: actions/upload-artifact@v4
390+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4
391391
with:
392392
name: vulnerability-reports
393393
path: ${{ steps.scan.outputs.leeway_vulnerability_reports_dir }}
@@ -408,7 +408,7 @@ jobs:
408408
app-id: 308947
409409
installation-id: 35574470
410410
- name: trigger installation
411-
uses: actions/github-script@v6
411+
uses: actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325 # pin@v6
412412
with:
413413
github-token: ${{ steps.auth.outputs.token }}
414414
script: |
@@ -440,7 +440,7 @@ jobs:
440440
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-install
441441
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
442442
steps:
443-
- uses: actions/checkout@v4
443+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
444444
- name: Setup Environment
445445
uses: ./.github/actions/setup-environment
446446
with:
@@ -457,7 +457,7 @@ jobs:
457457
analytics: ${{needs.configuration.outputs.analytics}}
458458
workspace_feature_flags: ${{needs.configuration.outputs.workspace_feature_flags}}
459459
image_repo_base: ${{needs.configuration.outputs.image_repo_base}}/build
460-
- uses: actions/github-script@v6
460+
- uses: actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325 # pin@v6
461461
if: needs.configuration.outputs.pr_number != '' && contains(needs.configuration.outputs.pr_body, 'gitpod:summary')
462462
with:
463463
script: |
@@ -491,7 +491,7 @@ jobs:
491491
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-monitoring
492492
cancel-in-progress: true
493493
steps:
494-
- uses: actions/checkout@v4
494+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
495495
- name: Setup Environment
496496
uses: ./.github/actions/setup-environment
497497
with:
@@ -523,7 +523,7 @@ jobs:
523523
group: ${{ needs.configuration.outputs.preview_name }}-integration-test
524524
cancel-in-progress: true
525525
steps:
526-
- uses: actions/checkout@v4
526+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
527527
- name: Run integration test
528528
id: integration-test
529529
uses: ./.github/actions/integration-tests
@@ -584,7 +584,7 @@ jobs:
584584
runs-on: ubuntu-latest
585585
steps:
586586
- name: Slack Notification
587-
uses: rtCamp/action-slack-notify@v2
587+
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # pin@v2
588588
env:
589589
SLACK_WEBHOOK: ${{ secrets.WORKSPACE_SLACK_WEBHOOK }}
590590
SLACK_ICON_EMOJI: ":x:"

.github/workflows/build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
steps:
6464
- name: "Determine Branch"
6565
id: branches
66-
uses: transferwise/sanitize-branch-name@v1
66+
uses: transferwise/sanitize-branch-name@009d85a96fcfe62a685b371dc8f299e53385ed9c # pin@v1
6767
# Since we trigger this worklow on other event types, besides pull_request
6868
# We use this action to help us get the pr body, as it's not included in push/workflow_dispatch events
6969
- uses: 8BitJonny/[email protected]
@@ -113,7 +113,7 @@ jobs:
113113
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
114114
options: --user root
115115
steps:
116-
- uses: actions/checkout@v4
116+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
117117
- name: Setup Environment
118118
uses: ./.github/actions/setup-environment
119119
with:
@@ -140,7 +140,7 @@ jobs:
140140
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-infrastructure
141141
cancel-in-progress: true
142142
steps:
143-
- uses: actions/checkout@v4
143+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
144144
- name: Setup Environment
145145
uses: ./.github/actions/setup-environment
146146
with:
@@ -192,7 +192,7 @@ jobs:
192192
# GitHub action + MySQL 8.0 need longer to initialize
193193
DB_RETRIES: 5
194194
steps:
195-
- uses: actions/checkout@v4
195+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
196196
- uses: ./.github/actions/setup-environment
197197
with:
198198
identity_provider: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
@@ -243,7 +243,7 @@ jobs:
243243
244244
exit $RESULT
245245
- name: Login to GitHub Container Registry
246-
uses: docker/login-action@v3
246+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # pin@v3
247247
with:
248248
registry: ghcr.io
249249
username: ${{ github.actor }}
@@ -385,12 +385,12 @@ jobs:
385385
echo "No critical vulnerabilities found."
386386
fi
387387
- name: Upload SBOMs
388-
uses: actions/upload-artifact@v4
388+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4
389389
with:
390390
name: sboms
391391
path: ${{ steps.scan.outputs.leeway_sboms_dir }}
392392
- name: Upload vulnerability reports
393-
uses: actions/upload-artifact@v4
393+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4
394394
with:
395395
name: vulnerability-reports
396396
path: ${{ steps.scan.outputs.leeway_vulnerability_reports_dir }}
@@ -411,7 +411,7 @@ jobs:
411411
app-id: 308947
412412
installation-id: 35574470
413413
- name: trigger installation
414-
uses: actions/github-script@v6
414+
uses: actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325 # pin@v6
415415
with:
416416
github-token: ${{ steps.auth.outputs.token }}
417417
script: |
@@ -443,7 +443,7 @@ jobs:
443443
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-install
444444
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
445445
steps:
446-
- uses: actions/checkout@v4
446+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
447447
- name: Setup Environment
448448
uses: ./.github/actions/setup-environment
449449
with:
@@ -460,7 +460,7 @@ jobs:
460460
analytics: ${{needs.configuration.outputs.analytics}}
461461
workspace_feature_flags: ${{needs.configuration.outputs.workspace_feature_flags}}
462462
image_repo_base: ${{needs.configuration.outputs.image_repo_base}}/build
463-
- uses: actions/github-script@v6
463+
- uses: actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325 # pin@v6
464464
if: needs.configuration.outputs.pr_number != '' && contains(needs.configuration.outputs.pr_body, 'gitpod:summary')
465465
with:
466466
script: |
@@ -494,7 +494,7 @@ jobs:
494494
group: ${{ github.ref == 'refs/heads/main' && github.run_id || github.sha }}-monitoring
495495
cancel-in-progress: true
496496
steps:
497-
- uses: actions/checkout@v4
497+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
498498
- name: Setup Environment
499499
uses: ./.github/actions/setup-environment
500500
with:
@@ -526,7 +526,7 @@ jobs:
526526
group: ${{ needs.configuration.outputs.preview_name }}-integration-test
527527
cancel-in-progress: true
528528
steps:
529-
- uses: actions/checkout@v4
529+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
530530
- name: Run integration test
531531
id: integration-test
532532
uses: ./.github/actions/integration-tests
@@ -587,7 +587,7 @@ jobs:
587587
runs-on: ubuntu-latest
588588
steps:
589589
- name: Slack Notification
590-
uses: rtCamp/action-slack-notify@v2
590+
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # pin@v2
591591
env:
592592
SLACK_WEBHOOK: ${{ secrets.WORKSPACE_SLACK_WEBHOOK }}
593593
SLACK_ICON_EMOJI: ":x:"

.github/workflows/check-gitpodyaml.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Notify
14-
uses: KeisukeYamashita/create-comment@v1
14+
uses: KeisukeYamashita/create-comment@1d95d97d7b1b73ab66e5ca931610e4e10ddc5eed # pin@v1
1515
with:
1616
number: ${{ github.event.pull_request.number }}
1717
comment: |

.github/workflows/code-build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
update:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
1414
- name: Install dependencies
1515
run: |
1616
curl -fsSL https://github.com/csweichel/oci-tool/releases/download/v0.2.1/oci-tool_0.2.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin
@@ -40,7 +40,7 @@ jobs:
4040
fi
4141
- name: Create Release Pull Request
4242
if: steps.changes.outputs.dirty
43-
uses: peter-evans/create-pull-request@v6
43+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # pin@v6
4444
with:
4545
title: "[VS Code Browser] Build stable code `${{steps.updates.outputs.codeVersion}}`"
4646
body: |
@@ -89,10 +89,10 @@ jobs:
8989
team-experience
9090
- name: Get previous job's status
9191
id: lastrun
92-
uses: filiptronicek/get-last-job-status@main
92+
uses: filiptronicek/get-last-job-status@1c211ff20d1706ff0bc3fc8022f7bd6518b88bc4 # pin@main
9393
- name: Slack Notification
9494
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
95-
uses: rtCamp/action-slack-notify@v2
95+
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # pin@v2
9696
env:
9797
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
9898
SLACK_COLOR: ${{ job.status }}

.github/workflows/code-nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.34181
1515
options: --user root
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
1818
- uses: ./.github/actions/setup-environment
1919
with:
2020
identity_provider: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
@@ -42,10 +42,10 @@ jobs:
4242
.:docker-nightly
4343
- name: Get previous job's status
4444
id: lastrun
45-
uses: filiptronicek/get-last-job-status@main
45+
uses: filiptronicek/get-last-job-status@1c211ff20d1706ff0bc3fc8022f7bd6518b88bc4 # pin@main
4646
- name: Slack Notification
4747
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
48-
uses: rtCamp/action-slack-notify@v2
48+
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # pin@v2
4949
env:
5050
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
5151
SLACK_COLOR: ${{ job.status }}

.github/workflows/code-updates.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
update:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # pin@v4
1111
- name: Install dependencies
1212
run: |
1313
curl -fsSL https://github.com/csweichel/oci-tool/releases/download/v0.2.1/oci-tool_0.2.1_linux_amd64.tar.gz | tar xz -C /usr/local/bin
@@ -38,7 +38,7 @@ jobs:
3838
- name: Create Release Pull Request
3939
if: ${{steps.changes.outputs.dirty && steps.updates.outputs.codeVersion}}
4040
id: code-update-pr
41-
uses: peter-evans/create-pull-request@v6
41+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # pin@v6
4242
with:
4343
title: "[VS Code Browser] Update stable code to `${{steps.updates.outputs.codeVersion}}`"
4444
body: |
@@ -70,7 +70,7 @@ jobs:
7070
7171
- name: Create Images Update Pull Request
7272
if: ${{steps.changes.outputs.dirty && !steps.updates.outputs.codeVersion}}
73-
uses: peter-evans/create-pull-request@v6
73+
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # pin@v6
7474
with:
7575
title: "[code] update code image layers"
7676
body: |
@@ -104,7 +104,7 @@ jobs:
104104
team-experience
105105
- name: Slack notification (code)
106106
if: ${{ steps.code-update-pr.outputs.pull-request-url }}
107-
uses: rtCamp/action-slack-notify@v2
107+
uses: rtCamp/action-slack-notify@cdf0a2130cbcdfd82ba5fcac8e076370bf381b36 # pin@v2
108108
env:
109109
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
110110
SLACK_COLOR: ${{ job.status }}
@@ -124,7 +124,7 @@ jobs:
124124
app-id: 308947
125125
installation-id: 35574470
126126
- name: Trigger Open VS Code Server Release
127-
uses: actions/github-script@v6
127+
uses: actions/github-script@00f12e3e20659f42342b1c0226afda7f7c042325 # pin@v6
128128
with:
129129
github-token: ${{ steps.auth.outputs.token }}
130130
script: |

0 commit comments

Comments
 (0)