Skip to content

Commit 25607ed

Browse files
Technologicatclaude
andcommitted
ci: pin GitHub Actions to commit SHAs; add Dependabot
Supply-chain hardening. Every `uses:` in ci.yml now pins a full 40-char commit SHA with a trailing `# vX.Y.Z` comment, instead of a floating major tag (or, for gh-action-pypi-publish, the `release/v1` branch). A mutable ref can be silently repointed by an attacker who compromises an action's repo or a maintainer account; a SHA pin cannot. The pins resolve to the exact commits the floating refs pointed to at pin time, so CI behavior is unchanged. Add .github/dependabot.yml (github-actions ecosystem, weekly) — wlsqm had none. Dependabot updates SHA-pinned actions and bumps the version comment alongside, so pinning does not freeze the actions: security fixes still flow in as reviewable PRs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b8b1c63 commit 25607ed

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
lint:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1515

16-
- uses: actions/setup-python@v6
16+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1717
with:
1818
python-version: "3.14"
1919

@@ -63,9 +63,9 @@ jobs:
6363
python-version: "3.14"
6464
runs-on: ${{ matrix.os }}
6565
steps:
66-
- uses: actions/checkout@v6
66+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6767

68-
- uses: actions/setup-python@v6
68+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6969
with:
7070
python-version: ${{ matrix.python-version }}
7171

@@ -87,7 +87,7 @@ jobs:
8787
# universal CRT and vcomp140.dll, all of which are always on PATH
8888
# for a 64-bit Python process. scipy/numpy use the same approach on
8989
# their CI.
90-
- uses: ilammy/msvc-dev-cmd@v1
90+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
9191
if: runner.os == 'Windows'
9292

9393
- name: Install build and test dependencies
@@ -107,7 +107,7 @@ jobs:
107107
matrix:
108108
os: [ubuntu-latest, macos-latest, windows-latest]
109109
steps:
110-
- uses: actions/checkout@v6
110+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
111111

112112
# Same MSVC activation as in the test job, and for the same reason:
113113
# cibuildwheel does NOT automatically activate MSVC for meson-python
@@ -117,15 +117,15 @@ jobs:
117117
# MinGW-w64 gcc from the runner PATH and the resulting .pyd files
118118
# link against libgomp-1.dll / libgcc_s_seh-1.dll, which are not
119119
# present in the wheel test environment.
120-
- uses: ilammy/msvc-dev-cmd@v1
120+
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
121121
if: runner.os == 'Windows'
122122

123123
# cibuildwheel config lives in pyproject.toml ([tool.cibuildwheel]) —
124124
# build list, skip list, test-requires, test-command, and the macOS
125125
# before-all that installs conda-forge llvm-openmp via micromamba.
126-
- uses: pypa/cibuildwheel@v3.4
126+
- uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
127127

128-
- uses: actions/upload-artifact@v7
128+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
129129
with:
130130
name: wheels-${{ matrix.os }}
131131
path: wheelhouse/*.whl
@@ -134,13 +134,13 @@ jobs:
134134
needs: test
135135
runs-on: ubuntu-latest
136136
steps:
137-
- uses: actions/checkout@v6
138-
- uses: actions/setup-python@v6
137+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
138+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
139139
with:
140140
python-version: "3.14"
141141
- run: pip install build
142142
- run: python -m build --sdist
143-
- uses: actions/upload-artifact@v7
143+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
144144
with:
145145
name: sdist
146146
path: dist/*.tar.gz
@@ -156,11 +156,11 @@ jobs:
156156
permissions:
157157
id-token: write
158158
steps:
159-
- uses: actions/download-artifact@v8
159+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
160160
with:
161161
path: dist/
162162
merge-multiple: true
163163

164-
- uses: pypa/gh-action-pypi-publish@release/v1
164+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
165165
with:
166166
packages-dir: dist/

0 commit comments

Comments
 (0)