Skip to content

Commit 3a97654

Browse files
committed
CI: pin actions by hash
Pin the actions by hash so a compromised release of an action is not automatically used and leaks our secrets. This is not bulletproof, but better than nothing.
1 parent a96702c commit 3a97654

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.github/actions/setup-python-env/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ inputs:
1414
runs:
1515
using: "composite"
1616
steps:
17-
- uses: actions/setup-python@v5
17+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
1818
with:
1919
python-version: ${{ inputs.python-version }}
2020

2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v2
22+
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
2323
with:
2424
version: ${{ inputs.uv-version }}
2525
enable-cache: "true"

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Check out
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
with:
1717
persist-credentials: false
1818

19-
- uses: actions/cache@v4
19+
- uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
2020
with:
2121
path: ~/.cache/pre-commit
2222
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
@@ -38,7 +38,7 @@ jobs:
3838
shell: bash
3939
steps:
4040
- name: Check out
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242
with:
4343
persist-credentials: false
4444

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
id-token: write
2020
steps:
2121
- name: Check out
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
2424
persist-credentials: false
2525

26-
- uses: hynek/build-and-inspect-python-package@v2
26+
- uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0
2727

2828
# Upload to real PyPI on GitHub Releases.
2929
release-pypi:
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Download packages built by build-and-inspect-python-package
41-
uses: actions/download-artifact@v4
41+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
4242
with:
4343
name: Packages
4444
path: dist
4545

4646
# This defaults to OIDC identification between GitHub and PyPI
4747
- name: Upload package to PyPI
48-
uses: pypa/gh-action-pypi-publish@release/v1
48+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4

0 commit comments

Comments
 (0)