Skip to content

Commit 694f9ff

Browse files
chore: pin GitHub Actions to SHA for supply chain security
Pin all external GitHub Actions to specific commit SHAs to prevent supply chain attacks via malicious tag updates. Actions pinned: - actions/cache@v4 - actions/checkout@v5 - actions-ecosystem/action-add-labels@v1 - actions/setup-node@v5 - cschleiden/actions-linter@v1 - google-github-actions/auth@v3.0.0 - google-github-actions/setup-gcloud@v3.0.1 - slackapi/slack-github-action@v2.1.1 Exceptions (internal Gitpod workflows, not pinned): - gitpod-io/gce-github-runner/.github/workflows/create-vm.yml@main - gitpod-io/gce-github-runner/.github/workflows/delete-vm.yml@main Part of PDE-138 Closes PDE-218 Co-authored-by: Ona <no-reply@ona.com>
1 parent ae4bafe commit 694f9ff

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v5
12+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
1313

1414
- name: Setup Node
15-
uses: actions/setup-node@v5
15+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # pin@v5
1616
with:
1717
node-version: "22.x"
1818

.github/workflows/dockerhub-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: 📥 Checkout workspace-images
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
3131
with:
3232
repository: gitpod-io/workspace-images
3333

@@ -61,13 +61,13 @@ jobs:
6161
echo "{}" > $SKOPEO_AUTH_DIR/auth
6262
6363
- name: ☁️ Set up Cloud SDK
64-
uses: google-github-actions/setup-gcloud@v3.0.1
64+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # pin@v3.0.1
6565
with:
6666
version: 393.0.0
6767

6868
- name: 🔐 Authenticate to Google Cloud
6969
id: "auth"
70-
uses: google-github-actions/auth@v3.0.0
70+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # pin@v3.0.0
7171
with:
7272
token_format: "access_token"
7373
workload_identity_provider: ${{env.WORKLOAD_IDENTITY_POOL_ID}}
@@ -106,7 +106,7 @@ jobs:
106106
- name: The release was successful
107107
id: slack-success
108108
if: needs.promote-latest.result == 'success'
109-
uses: slackapi/slack-github-action@v2.1.1
109+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # pin@v2.1.1
110110
with:
111111
webhook-type: incoming-webhook
112112
webhook: ${{ secrets.RELEASE_NOTIFY_WEBHOOK }}
@@ -116,7 +116,7 @@ jobs:
116116
- name: The release was not successful
117117
id: slack-failure
118118
if: needs.promote-latest.result != 'success'
119-
uses: slackapi/slack-github-action@v2.1.1
119+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # pin@v2.1.1
120120
with:
121121
webhook-type: incoming-webhook
122122
webhook: ${{ secrets.RELEASE_NOTIFY_WEBHOOK }}

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
lint:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
13-
- uses: cschleiden/actions-linter@v1
12+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
13+
- uses: cschleiden/actions-linter@1282bc2497ca41be7846b12393d54945a7d63267 # pin@v1
1414
with:
1515
workflows: '[".github/workflows/*.yaml"]'

.github/workflows/pull-request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
BUILDKIT_VERSION: 0.12.3
2424
steps:
2525
- name: 📥 Checkout workspace-images
26-
uses: actions/checkout@v5
26+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
2727
with:
2828
repository: gitpod-io/workspace-images
2929

@@ -52,13 +52,13 @@ jobs:
5252
# A hack as GH action does not allow you to force override cache storing if there was a cache hit
5353
# https://github.com/actions/cache/issues/628#issuecomment-986118455
5454
- name: 🗄️ Force Save Registry Cache Per Sha
55-
uses: actions/cache@v4
55+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4
5656
with:
5757
path: ~/registry
5858
key: ${{ runner.os }}-pull-request-cache-${{ github.sha }}
5959

6060
- name: 🗄️ Restore Registry Cache
61-
uses: actions/cache@v4
61+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4
6262
with:
6363
path: ~/registry
6464
key: ${{ runner.os }}-pull-request-cache-${{ github.sha }}

.github/workflows/push-main.yml

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

4343
steps:
4444
- name: 📥 Checkout workspace-images
45-
uses: actions/checkout@v5
45+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
4646
with:
4747
repository: gitpod-io/workspace-images
4848

@@ -114,13 +114,13 @@ jobs:
114114
sudo chmod +777 /run/buildkit/buildkitd.sock
115115
116116
- name: ☁️ Set up Cloud SDK
117-
uses: google-github-actions/setup-gcloud@v3.0.1
117+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # pin@v3.0.1
118118
with:
119119
version: 393.0.0
120120

121121
- name: 🔐 Authenticate to Google Cloud
122122
id: "auth"
123-
uses: google-github-actions/auth@v3.0.0
123+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # pin@v3.0.0
124124
with:
125125
token_format: "access_token"
126126
access_token_lifetime: "43200s"

.github/workflows/triage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: checkout
10-
uses: actions/checkout@v5
10+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
1111

1212
- name: add label
13-
uses: actions-ecosystem/action-add-labels@v1
13+
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # pin@v1
1414
with:
1515
labels: "team: team-experience"

0 commit comments

Comments
 (0)