Skip to content

Commit 5374b5a

Browse files
committed
Pin GitHub Actions to specific commits for security
1 parent 94a1eea commit 5374b5a

11 files changed

+42
-42
lines changed

.github/workflows/build.yml

+21-21
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
4343
config_hash: ${{ steps.config_hash.outputs.hash }}
4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
4646
- name: Check for source changes
4747
id: check
4848
run: |
@@ -83,7 +83,7 @@ jobs:
8383
- name: Get a list of the changed documentation-related files
8484
if: github.event_name == 'pull_request'
8585
id: changed-docs-files
86-
uses: Ana06/[email protected]
86+
uses: Ana06/get-changed-files@e0c398b7065a8d84700c471b6afc4116d1ba4e96 # v2.2.0
8787
with:
8888
filter: |
8989
Doc/**
@@ -123,19 +123,19 @@ jobs:
123123
needs: check_source
124124
if: needs.check_source.outputs.run_tests == 'true'
125125
steps:
126-
- uses: actions/checkout@v3
126+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
127127
- name: Restore config.cache
128128
uses: actions/cache@v3
129129
with:
130130
path: config.cache
131131
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
132-
- uses: actions/setup-python@v3
132+
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
133133
- name: Install Dependencies
134134
run: sudo ./.github/workflows/posix-deps-apt.sh
135135
- name: Add ccache to PATH
136136
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
137137
- name: Configure ccache action
138-
uses: hendrikmuhs/[email protected]
138+
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
139139
- name: Check Autoconf and aclocal versions
140140
run: |
141141
grep "Generated by GNU Autoconf 2.71" configure
@@ -186,7 +186,7 @@ jobs:
186186
env:
187187
IncludeUwp: 'true'
188188
steps:
189-
- uses: actions/checkout@v3
189+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
190190
- name: Build CPython
191191
run: .\PCbuild\build.bat -e -d -p Win32
192192
- name: Display build info
@@ -203,7 +203,7 @@ jobs:
203203
env:
204204
IncludeUwp: 'true'
205205
steps:
206-
- uses: actions/checkout@v3
206+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
207207
- name: Register MSVC problem matcher
208208
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
209209
- name: Build CPython
@@ -225,7 +225,7 @@ jobs:
225225
HOMEBREW_NO_INSTALL_CLEANUP: 1
226226
PYTHONSTRICTEXTENSIONBUILD: 1
227227
steps:
228-
- uses: actions/checkout@v3
228+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
229229
- name: Restore config.cache
230230
uses: actions/cache@v3
231231
with:
@@ -260,7 +260,7 @@ jobs:
260260
OPENSSL_VER: 1.1.1u
261261
PYTHONSTRICTEXTENSIONBUILD: 1
262262
steps:
263-
- uses: actions/checkout@v3
263+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
264264
- name: Register gcc problem matcher
265265
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
266266
- name: Install Dependencies
@@ -272,7 +272,7 @@ jobs:
272272
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
273273
- name: 'Restore OpenSSL build'
274274
id: cache-openssl
275-
uses: actions/cache@v3
275+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
276276
with:
277277
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
278278
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -283,7 +283,7 @@ jobs:
283283
run: |
284284
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
285285
- name: Configure ccache action
286-
uses: hendrikmuhs/[email protected]
286+
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
287287
- name: Setup directory envs for out-of-tree builds
288288
run: |
289289
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -333,7 +333,7 @@ jobs:
333333
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
334334
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
335335
steps:
336-
- uses: actions/checkout@v3
336+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
337337
- name: Restore config.cache
338338
uses: actions/cache@v3
339339
with:
@@ -350,7 +350,7 @@ jobs:
350350
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
351351
- name: 'Restore OpenSSL build'
352352
id: cache-openssl
353-
uses: actions/cache@v3
353+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
354354
with:
355355
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
356356
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -361,7 +361,7 @@ jobs:
361361
run: |
362362
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
363363
- name: Configure ccache action
364-
uses: hendrikmuhs/[email protected]
364+
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
365365
- name: Configure CPython
366366
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
367367
- name: Build CPython
@@ -381,7 +381,7 @@ jobs:
381381
OPENSSL_VER: 1.1.1u
382382
PYTHONSTRICTEXTENSIONBUILD: 1
383383
steps:
384-
- uses: actions/checkout@v3
384+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
385385
- name: Register gcc problem matcher
386386
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
387387
- name: Install Dependencies
@@ -393,7 +393,7 @@ jobs:
393393
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
394394
- name: 'Restore OpenSSL build'
395395
id: cache-openssl
396-
uses: actions/cache@v3
396+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
397397
with:
398398
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
399399
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -404,7 +404,7 @@ jobs:
404404
run: |
405405
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
406406
- name: Configure ccache action
407-
uses: hendrikmuhs/[email protected]
407+
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
408408
- name: Setup directory envs for out-of-tree builds
409409
run: |
410410
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -491,7 +491,7 @@ jobs:
491491
PYTHONSTRICTEXTENSIONBUILD: 1
492492
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
493493
steps:
494-
- uses: actions/checkout@v3
494+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
495495
- name: Restore config.cache
496496
uses: actions/cache@v3
497497
with:
@@ -502,7 +502,7 @@ jobs:
502502
- name: Install Dependencies
503503
run: sudo ./.github/workflows/posix-deps-apt.sh
504504
- name: Set up GCC-10 for ASAN
505-
uses: egor-tensin/setup-gcc@v1
505+
uses: egor-tensin/setup-gcc@eaa888eb19115a521fa72b65cd94fe1f25bbcaac # v1.3
506506
with:
507507
version: 10
508508
- name: Configure OpenSSL env vars
@@ -512,7 +512,7 @@ jobs:
512512
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
513513
- name: 'Restore OpenSSL build'
514514
id: cache-openssl
515-
uses: actions/cache@v3
515+
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
516516
with:
517517
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
518518
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -523,7 +523,7 @@ jobs:
523523
run: |
524524
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
525525
- name: Configure ccache action
526-
uses: hendrikmuhs/[email protected]
526+
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
527527
- name: Configure CPython
528528
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
529529
- name: Build CPython

.github/workflows/build_msi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
matrix:
3434
type: [x86, x64, arm64]
3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3737
- name: Build CPython installer
3838
run: .\Tools\msi\build.bat --doc -${{ matrix.type }}

.github/workflows/documentation-links.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
documentation-links:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: readthedocs/actions/preview@v1
24+
- uses: readthedocs/actions/preview@212a0c4917cd5db3f95d08786dd313666fe38cac # v1.1
2525
with:
2626
project-slug: "cpython-previews"
2727
single-version: "true"

.github/workflows/lint.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
timeout-minutes: 10
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v4
18+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
19+
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
2020
with:
2121
python-version: "3.x"
22-
- uses: pre-commit/[email protected]
22+
- uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0

.github/workflows/mypy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
runs-on: ubuntu-latest
3030
timeout-minutes: 10
3131
steps:
32-
- uses: actions/checkout@v3
33-
- uses: actions/setup-python@v4
32+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
33+
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
3434
with:
3535
python-version: "3.x"
3636
cache: pip

.github/workflows/new-bugs-announce-notifier.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
runs-on: ubuntu-latest
1414
timeout-minutes: 10
1515
steps:
16-
- uses: actions/setup-node@v3
16+
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
1717
with:
1818
node-version: 14
1919
- run: npm install mailgun.js form-data
2020
- name: Send notification
21-
uses: actions/github-script@v6
21+
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
2222
env:
2323
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }}
2424
with:

.github/workflows/project-updater.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- { project: 32, label: sprint }
2424

2525
steps:
26-
- uses: actions/add-to-project@v0.1.0
26+
- uses: actions/add-to-project@31b3f3ccdc584546fc445612dec3f38ff5edb41c # v0.5.0
2727
with:
2828
project-url: https://github.com/orgs/python/projects/${{ matrix.project }}
2929
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}

.github/workflows/require-pr-label.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 10
1616

1717
steps:
18-
- uses: mheap/github-action-required-labels@v4
18+
- uses: mheap/github-action-required-labels@422e4c352ef83db91089e6acfbf09d8725e08abc # v4
1919
with:
2020
mode: exactly
2121
count: 0

.github/workflows/reusable-docs.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 60
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2121
- name: Register Sphinx problem matcher
2222
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
2323
- name: 'Set up Python'
24-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
2525
with:
2626
python-version: '3'
2727
cache: 'pip'
@@ -37,7 +37,7 @@ jobs:
3737
- name: 'Get list of changed files'
3838
if: github.event_name == 'pull_request'
3939
id: changed_files
40-
uses: Ana06/[email protected]
40+
uses: Ana06/get-changed-files@e0c398b7065a8d84700c471b6afc4116d1ba4e96 # v2.2.0
4141
with:
4242
filter: "Doc/**"
4343
- name: 'Build changed files in nit-picky mode'
@@ -66,9 +66,9 @@ jobs:
6666
runs-on: ubuntu-latest
6767
timeout-minutes: 60
6868
steps:
69-
- uses: actions/checkout@v3
69+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
7070
- name: 'Set up Python'
71-
uses: actions/setup-python@v4
71+
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
7272
with:
7373
python-version: '3.11' # known to work with Sphinx 3.2
7474
cache: 'pip'
@@ -84,10 +84,10 @@ jobs:
8484
runs-on: ubuntu-latest
8585
timeout-minutes: 60
8686
steps:
87-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
8888
- name: Register Sphinx problem matcher
8989
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
90-
- uses: actions/cache@v3
90+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
9191
with:
9292
path: ~/.cache/pip
9393
key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }}

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: "Check PRs"
19-
uses: actions/stale@v8
19+
uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222
stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.'

.github/workflows/verify-ensurepip-wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
runs-on: ubuntu-latest
2626
timeout-minutes: 10
2727
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-python@v4
28+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
29+
- uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4.5.0
3030
with:
3131
python-version: '3'
3232
- name: Compare checksum of bundled wheels to the ones published on PyPI

0 commit comments

Comments
 (0)