Skip to content

Commit b63cce0

Browse files
EliahKaganclaude
andcommitted
ci: pin all actions to full commit hashes
Most workflow steps referred to actions by tag, usually a major version tag such as `actions/checkout@v7`. A tag can be moved to another commit at any time, so the code that runs, with the job's token and secrets, could change with no change to this repository. Only `actions/cache` and `astral-sh/setup-uv` were already pinned. Pin every remaining action to a full commit hash, followed by a `# vX.Y.Z` comment naming the exact release, the form Dependabot recognizes and keeps up to date. The hashes and comments were written by `pinact run` (pinact 5.0.1), which resolves each tag and chooses the most specific semver tag pointing to the same commit. So each step still runs the same commit it ran before. For example, `actions/checkout@v7` and `actions/setup-python@v7` became the `v7.0.1` and `v7.1.0` commits, the same commits that recent runs reported downloading for those tags. The existing pins were left as they were. `pinact run --check --verify-comment` now passes, which also confirms that every version comment, including those on the existing pins, names a tag that points to its hash. `actionlint` reports no problems. `zizmor --offline` no longer reports any of the 25 `unpinned-uses` errors it reported before, and reports no new findings. (Its one `unpinned-images` finding, about a container image, is unaffected.) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 348ff73 commit b63cce0

9 files changed

Lines changed: 25 additions & 25 deletions

File tree

‎.github/workflows/alpine-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
adduser runner docker
3333
shell: sh -exo pipefail {0} # Run this as root, not the "runner" user.
3434

35-
- uses: actions/checkout@v7
35+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3636
with:
3737
fetch-depth: 0
3838

‎.github/workflows/backend-benchmark.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 30
1616
steps:
17-
- uses: actions/checkout@v7
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1818
with:
1919
fetch-depth: 0
2020
persist-credentials: false
21-
- uses: actions/setup-python@v7
21+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2222
with:
2323
python-version: "3.12"
2424
- name: Ensure Git 2.52 or newer
@@ -75,7 +75,7 @@ jobs:
7575
>> "$GITHUB_STEP_SUMMARY"
7676
- name: Retain raw timings and comparison
7777
if: always()
78-
uses: actions/upload-artifact@v7
78+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
7979
with:
8080
name: backend-benchmark
8181
path: benchmark-results/

‎.github/workflows/codeql.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
4949
steps:
5050
- name: Checkout repository
51-
uses: actions/checkout@v7
51+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5252

5353
# Add any setup steps before running the `github/codeql-action/init` action.
5454
# This includes steps like installing compilers or runtimes (`actions/setup-node`
@@ -58,7 +58,7 @@ jobs:
5858

5959
# Initializes the CodeQL tools for scanning.
6060
- name: Initialize CodeQL
61-
uses: github/codeql-action/init@v4
61+
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
6262
with:
6363
languages: ${{ matrix.language }}
6464
build-mode: ${{ matrix.build-mode }}
@@ -90,6 +90,6 @@ jobs:
9090
exit 1
9191
9292
- name: Perform CodeQL Analysis
93-
uses: github/codeql-action/analyze@v4
93+
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
9494
with:
9595
category: "/language:${{matrix.language}}"

‎.github/workflows/cygwin-test.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
git config --global core.autocrlf false # Affects the non-Cygwin git.
2929
shell: pwsh # Do this outside Cygwin, to affect actions/checkout.
3030

31-
- uses: actions/checkout@v7
31+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3232
with:
3333
fetch-depth: 0
3434

3535
- name: Install Cygwin
36-
uses: cygwin/cygwin-install-action@v6
36+
uses: cygwin/cygwin-install-action@3f0a3f9f988f7e96b8c18098ae05eaec175f5b52 # v6.0.2
3737
with:
3838
packages: >-
3939
curl gcc-core git libcurl-devel libexpat-devel libiconv-devel

‎.github/workflows/dependencies.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
os: ubuntu-24.04
2626

2727
steps:
28-
- uses: actions/checkout@v7
28+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929
with:
3030
fetch-depth: 0
31-
- uses: actions/setup-python@v7
31+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434
allow-prereleases: true
@@ -49,7 +49,7 @@ jobs:
4949
uv-sync:
5050
runs-on: ubuntu-latest
5151
steps:
52-
- uses: actions/checkout@v7
52+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5353
with:
5454
persist-credentials: false
5555

‎.github/workflows/downstream.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
project: [langchain, mlflow, bandit, swebench, datahub]
2020
backend: [gix, cli]
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2323
with:
2424
persist-credentials: false
2525
- name: Ensure Git 2.52 or newer

‎.github/workflows/git-cli.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
env:
1616
GIT_PYTHON_BACKEND: cli
1717
steps:
18-
- uses: actions/checkout@v7
19-
- uses: actions/checkout@v7
18+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2020
with:
2121
repository: git/git
2222
ref: v2.52.0
2323
path: .git-source
24-
- uses: actions/setup-python@v7
24+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2525
with:
2626
python-version: '3.12'
2727
- name: Build minimum supported Git

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
runs-on: ubuntu-slim
1515

1616
steps:
17-
- uses: actions/checkout@v7
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1818

19-
- uses: actions/setup-python@v7
19+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
2020
with:
2121
python-version: "3.x"
2222

23-
- uses: pre-commit/action@v3.0.1
23+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

‎.github/workflows/pythonpackage.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ jobs:
5959
shell: bash --noprofile --norc -exo pipefail {0}
6060

6161
steps:
62-
- uses: actions/checkout@v7
62+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6363
with:
6464
fetch-depth: 0
6565

6666
- name: Set up Python ${{ matrix.python-version }}
67-
uses: actions/setup-python@v7
67+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
6868
with:
6969
python-version: ${{ matrix.python-version }}
7070
allow-prereleases: ${{ matrix.experimental }}
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Set up WSL (Windows)
9999
if: matrix.os-type == 'windows'
100-
uses: Vampire/setup-wsl@v7.2.0
100+
uses: Vampire/setup-wsl@4c48163d9f981914dd8caa0fc335fe19cca5bff4 # v7.2.0
101101
with:
102102
wsl-version: 1
103103

@@ -232,7 +232,7 @@ jobs:
232232

233233
- name: Retain test results and backend operation counts
234234
if: always()
235-
uses: actions/upload-artifact@v7
235+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
236236
with:
237237
name: tests-${{ matrix.os-type }}-${{ matrix.python-version }}-${{ matrix.backend }}
238238
path: test-results/
@@ -265,8 +265,8 @@ jobs:
265265
env:
266266
GIT_PYTHON_BACKEND: cli
267267
steps:
268-
- uses: actions/checkout@v7
269-
- uses: actions/setup-python@v7
268+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
269+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
270270
with:
271271
python-version: ${{ matrix.python }}
272272
- name: Install the supported runtime

0 commit comments

Comments
 (0)