Skip to content

Commit 72df900

Browse files
corneliusludmannona-agent
authored andcommitted
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 78bd118 commit 72df900

6 files changed

Lines changed: 19 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: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
df -h
2323
2424
- name: 📥 Checkout workspace-images
25-
uses: actions/checkout@v5
25+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
26+
with:
27+
repository: gitpod-io/workspace-images
2628

2729
- name: 🔧 Setup pre-commit
2830
run: |
@@ -55,13 +57,13 @@ jobs:
5557
# A hack as GH action does not allow you to force override cache storing if there was a cache hit
5658
# https://github.com/actions/cache/issues/628#issuecomment-986118455
5759
- name: 🗄️ Force Save Registry Cache Per Sha
58-
uses: actions/cache@v4
60+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4
5961
with:
6062
path: ~/registry
6163
key: ${{ runner.os }}-pull-request-cache-${{ github.sha }}
6264

6365
- name: 🗄️ Restore Registry Cache
64-
uses: actions/cache@v4
66+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # pin@v4
6567
with:
6668
path: ~/registry
6769
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
@@ -32,7 +32,7 @@ jobs:
3232

3333
steps:
3434
- name: 📥 Checkout workspace-images
35-
uses: actions/checkout@v5
35+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # pin@v5
3636
with:
3737
repository: gitpod-io/workspace-images
3838

@@ -104,13 +104,13 @@ jobs:
104104
sudo chmod +777 /run/buildkit/buildkitd.sock
105105
106106
- name: ☁️ Set up Cloud SDK
107-
uses: google-github-actions/setup-gcloud@v3.0.1
107+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # pin@v3.0.1
108108
with:
109109
version: 393.0.0
110110

111111
- name: 🔐 Authenticate to Google Cloud
112112
id: "auth"
113-
uses: google-github-actions/auth@v3.0.0
113+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # pin@v3.0.0
114114
with:
115115
token_format: "access_token"
116116
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)