Skip to content

Commit 05b9fe1

Browse files
cmdcolinclaude
andcommitted
ci: drop persisted checkout credentials and the publish job's cache
zizmor flagged both. actions/checkout leaves the job token in .git/config, where every dependency install script in the job can read it; no job here pushes, so set persist-credentials: false on every checkout. The publish job holds id-token: write, so install there from the registry rather than from a pnpm store another run cached. setup-node caches by default once package.json names a packageManager, so removing `cache: pnpm` alone would keep the cache; set package-manager-cache: false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 2f18657 commit 05b9fe1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎.github/workflows/publish.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
contents: read
1111
steps:
1212
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
13+
with:
14+
persist-credentials: false
1315
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
1416
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1517
with:
@@ -38,11 +40,15 @@ jobs:
3840
contents: read
3941
steps:
4042
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43+
with:
44+
persist-credentials: false
4145
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
4246
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
4347
with:
4448
node-version: 24.x
45-
cache: pnpm
49+
# the job that publishes installs from the registry, not from a cache
50+
# another run wrote; setup-node caches unless told not to
51+
package-manager-cache: false
4652
registry-url: 'https://registry.npmjs.org'
4753
- run: pnpm install --frozen-lockfile
4854
- run: pnpm build
@@ -59,6 +65,8 @@ jobs:
5965
contents: write
6066
steps:
6167
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
68+
with:
69+
persist-credentials: false
6270
# Notes come from the CHANGELOG.md section git-cliff wrote during
6371
# `pnpm version`, which is part of the tagged commit — so this needs
6472
# neither full history nor a second pass over the git log.

0 commit comments

Comments
 (0)