Skip to content

Commit 45d9165

Browse files
ci: Update and securely pin all actions
Many of the actions we are using were pinned to old versions. This PR updates all actions to the latest avaialable versions, and securely pins them using their full hashes, which is a [recommended security practice](https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions), since version tags are mutable. A future PR will add a Dependabot configuration which will periodically check for new actions releases, and open PRs to update the actions.
1 parent bfb3007 commit 45d9165

File tree

6 files changed

+47
-47
lines changed

6 files changed

+47
-47
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-24.04
2929

3030
steps:
31-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
3232

3333
- name: Build in Docker
3434
run: scripts/build-in-docker.sh
@@ -39,7 +39,7 @@ jobs:
3939
- name: Rename Binary
4040
run: mv target/*/release/sentry-cli sentry-cli-Linux-${{ matrix.arch }}
4141

42-
- uses: actions/upload-artifact@v4
42+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
4343
with:
4444
name: artifact-bin-linux-${{ matrix.arch }}
4545
path: sentry-cli-Linux-${{ matrix.arch }}
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: macos-14
6060

6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
6363

6464
- name: Add Rustup Target
6565
run: rustup target add ${{ matrix.target }}
@@ -70,7 +70,7 @@ jobs:
7070
- name: Rename Binary
7171
run: mv target/${{ matrix.target }}/release/sentry-cli sentry-cli-Darwin-${{ matrix.arch }}
7272

73-
- uses: actions/upload-artifact@v4
73+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
7474
with:
7575
name: unsigned-bin-macos-${{ matrix.arch }}
7676
path: sentry-cli-Darwin-${{ matrix.arch }}
@@ -82,15 +82,15 @@ jobs:
8282
runs-on: macos-14
8383

8484
steps:
85-
- uses: actions/download-artifact@v4
85+
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
8686
with:
8787
pattern: unsigned-bin-macos-*
8888
merge-multiple: true
8989

9090
- name: Link universal binary
9191
run: lipo -create -output sentry-cli-Darwin-universal sentry-cli-Darwin-x86_64 sentry-cli-Darwin-arm64
9292

93-
- uses: actions/upload-artifact@v4
93+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
9494
with:
9595
name: unsigned-bin-macos-universal
9696
path: sentry-cli-Darwin-universal
@@ -115,7 +115,7 @@ jobs:
115115

116116
steps:
117117
- name: Checkout repository
118-
uses: actions/checkout@v4
118+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
119119

120120
- name: Install `rcodesign`
121121
run: |
@@ -135,7 +135,7 @@ jobs:
135135
echo "$APPLE_API_KEY" | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}
136136
137137
- name: Download unsigned binary
138-
uses: actions/download-artifact@v4
138+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
139139
with:
140140
name: unsigned-bin-macos-${{ matrix.arch }}
141141

@@ -160,7 +160,7 @@ jobs:
160160
sentry-cli-Darwin-${{ matrix.arch }}.zip
161161
162162
- name: Upload signed binary
163-
uses: actions/upload-artifact@v4
163+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
164164
with:
165165
name: artifact-bin-macos-${{ matrix.arch }}
166166
path: sentry-cli-Darwin-${{ matrix.arch }}
@@ -179,7 +179,7 @@ jobs:
179179
runs-on: windows-2019
180180

181181
steps:
182-
- uses: actions/checkout@v2
182+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
183183

184184
# When rustup is updated, it tries to replace its binary, which on Windows is somehow locked.
185185
# This can result in the CI failure, see: https://github.com/rust-lang/rustup/issues/3029
@@ -196,7 +196,7 @@ jobs:
196196
- name: Rename Binary
197197
run: mv target/${{ env.TARGET }}/release/sentry-cli.exe sentry-cli-Windows-${{ matrix.arch }}.exe
198198

199-
- uses: actions/upload-artifact@v4
199+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
200200
with:
201201
name: artifact-bin-windows-${{ matrix.arch }}
202202
path: sentry-cli-Windows-${{ matrix.arch }}.exe
@@ -208,14 +208,14 @@ jobs:
208208
needs: [linux, macos, macos_universal, windows]
209209

210210
steps:
211-
- uses: actions/checkout@v2
211+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
212212

213-
- uses: actions/setup-node@v1
213+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # 4.3.0
214214
with:
215215
node-version: '20.10.0'
216216

217217
- name: Download compiled binaries
218-
uses: actions/download-artifact@v4
218+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
219219
with:
220220
pattern: artifact-bin-*
221221
merge-multiple: true
@@ -228,7 +228,7 @@ jobs:
228228
229229
- run: npm pack
230230

231-
- uses: actions/upload-artifact@v4
231+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
232232
with:
233233
name: artifact-pkg-node
234234
path: '*.tgz'
@@ -238,14 +238,14 @@ jobs:
238238
name: python (base)
239239
runs-on: ubuntu-24.04
240240
steps:
241-
- uses: actions/checkout@v3
241+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
242242
- name: Add Rustup Target
243243
run: rustup target add x86_64-unknown-linux-musl
244-
- uses: actions/setup-python@v4
244+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # 5.4.0
245245
with:
246246
python-version: '3.11'
247247
- run: python3 -m pip install build && python3 -m build
248-
- uses: actions/upload-artifact@v4
248+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
249249
with:
250250
name: python-base
251251
path: dist/*
@@ -256,22 +256,22 @@ jobs:
256256
runs-on: ubuntu-24.04
257257
needs: [linux, sign-macos-binaries, windows, python-base]
258258
steps:
259-
- uses: actions/checkout@v3
260-
- uses: actions/setup-python@v4
259+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
260+
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # 5.4.0
261261
with:
262262
python-version: '3.11'
263-
- uses: actions/download-artifact@v4
263+
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
264264
with:
265265
pattern: artifact-bin-*
266266
merge-multiple: true
267267
path: binaries
268-
- uses: actions/download-artifact@v4
268+
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
269269
with:
270270
name: python-base
271271
merge-multiple: true
272272
path: python-base
273273
- run: scripts/wheels --binaries binaries --base python-base --dest dist
274-
- uses: actions/upload-artifact@v4
274+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
275275
with:
276276
name: artifact-pkg-python
277277
path: dist/*
@@ -282,11 +282,11 @@ jobs:
282282
runs-on: ubuntu-24.04
283283
needs: [linux, sign-macos-binaries, windows]
284284
steps:
285-
- uses: actions/checkout@v3
286-
- uses: actions/setup-node@v4
285+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
286+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # 4.3.0
287287
with:
288288
node-version: '20.10.0'
289-
- uses: actions/download-artifact@v4
289+
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1
290290
with:
291291
pattern: artifact-bin-*
292292
merge-multiple: true
@@ -313,7 +313,7 @@ jobs:
313313
done
314314
315315
- name: Upload packaged npm binary distributions
316-
uses: actions/upload-artifact@v4
316+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
317317
with:
318318
name: artifact-npm-binary-distributions
319319
path: npm-binary-distributions/*/*.tgz
@@ -333,20 +333,20 @@ jobs:
333333
contents: read
334334
packages: write
335335
steps:
336-
- uses: actions/checkout@v3
336+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
337337

338338
- name: Set up Docker Buildx
339-
uses: docker/setup-buildx-action@v3
339+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # 3.10.0
340340

341341
- name: Login to GitHub Container Registry
342-
uses: docker/login-action@v3
342+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 3.4.0
343343
with:
344344
registry: ghcr.io
345345
username: ${{ github.actor }}
346346
password: ${{ secrets.GITHUB_TOKEN }}
347347

348348
- name: Build and push
349-
uses: docker/build-push-action@v6
349+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # 6.15.0
350350
with:
351351
context: .
352352
push: true
@@ -363,7 +363,7 @@ jobs:
363363
packages: write
364364
steps:
365365
- name: Login to GitHub Container Registry
366-
uses: docker/login-action@v3
366+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 3.4.0
367367
with:
368368
registry: ghcr.io
369369
username: ${{ github.actor }}
@@ -380,7 +380,7 @@ jobs:
380380
runs-on: ubuntu-24.04
381381
needs: [linux, sign-macos-binaries, windows, npm-distributions, node, python]
382382
steps:
383-
- uses: actions/upload-artifact/merge@v4
383+
- uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
384384
with:
385385
# Craft expects release assets to be a single artifact named after the sha.
386386
name: ${{ github.sha }}

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
name: Lint
1818
runs-on: ubuntu-24.04
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
2121

2222
- name: Install Rust Toolchain
2323
run: rustup toolchain install stable --profile minimal --component clippy --component rustfmt --no-self-update
2424

25-
- uses: swatinem/rust-cache@v2
25+
- uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
2626

2727
- name: Run Rustfmt
2828
run: cargo fmt --all -- --check
@@ -40,9 +40,9 @@ jobs:
4040
runs-on: ${{ matrix.os }}
4141

4242
steps:
43-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
4444

45-
- uses: swatinem/rust-cache@81d053bdb0871dcd3f10763c8cc60d0adc41762b # pin@v1
45+
- uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
4646
with:
4747
key: ${{ github.job }}
4848

@@ -59,10 +59,10 @@ jobs:
5959
runs-on: ubuntu-24.04
6060

6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
6363

6464
- name: Use Node.js ${{ matrix.node-version }}
65-
uses: actions/setup-node@v1
65+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # 4.3.0
6666
with:
6767
node-version: ${{ matrix.node-version }}
6868

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333

3434
steps:
3535
- name: Checkout repository
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
3737

3838
# Initializes the CodeQL tools for scanning.
3939
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2
40+
uses: github/codeql-action/init@5f8171a638ada777af81d42b55959a643bb29017 # 3.28.12
4141
with:
4242
languages: ${{ matrix.language }}
4343
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -48,7 +48,7 @@ jobs:
4848
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4949
# If this step fails, then you should remove it and run the build manually (see below)
5050
- name: Autobuild
51-
uses: github/codeql-action/autobuild@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2
51+
uses: github/codeql-action/autobuild@5f8171a638ada777af81d42b55959a643bb29017 # 3.28.12
5252

5353
# ℹ️ Command-line programs to run using the OS shell.
5454
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -59,4 +59,4 @@ jobs:
5959
# make bootstrap
6060
# make release
6161
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@e0e5ded33cabb451ae0a9768fc7b0410bad9ad44 # pin@v2
62+
uses: github/codeql-action/analyze@5f8171a638ada777af81d42b55959a643bb29017 # 3.28.12

.github/workflows/release-ghcr-latest-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-24.04
1010
steps:
1111
- name: Log in to GitHub Container Registry
12-
uses: docker/login-action@v3
12+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 3.4.0
1313
with:
1414
registry: ghcr.io
1515
username: ${{ github.actor }}

.github/workflows/release-ghcr-version-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-24.04
1010
steps:
1111
- name: Log in to GitHub Container Registry
12-
uses: docker/login-action@v3
12+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # 3.4.0
1313
with:
1414
registry: ghcr.io
1515
username: ${{ github.actor }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
with:
2323
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2424
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
2626
with:
2727
token: ${{ steps.token.outputs.token }}
2828
fetch-depth: 0
2929
- name: Prepare release
30-
uses: getsentry/action-prepare-release@v1
30+
uses: getsentry/action-prepare-release@3cea80dc3938c0baf5ec4ce752ecb311f8780cdc # 1.6.4
3131
env:
3232
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3333
with:

0 commit comments

Comments
 (0)