Skip to content

Commit bc2f9b5

Browse files
authored
ci: pin Actions@SHA and disable cache on workflows with elevated OIDC permissions (#554)
1 parent 15eda44 commit bc2f9b5

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,27 @@ jobs:
2020
steps:
2121
# Create an access token for the Github Actions Bot app. This one has permissions
2222
# to push directly to this repository (only!) without required status checks.
23-
- uses: actions/create-github-app-token@v2
23+
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3
2424
id: github-actions-bot-app-token
2525
with:
2626
app-id: 819772
2727
private-key: ${{ secrets.APOLLO_GITHUB_ACTIONS_BOT_PRIVATE_KEY }}
2828

2929
# Check out the repository, using the Github Actions Bot app's token so that we
3030
# can push later and override required statuses.
31-
- uses: actions/checkout@v6
31+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
3232
with:
3333
token: ${{ steps.github-actions-bot-app-token.outputs.token }}
3434
# Fetch entire git history so Changesets can generate changelogs
3535
# with the correct commits
3636
fetch-depth: 0
3737

38-
- uses: actions/setup-node@v6
38+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
3939
with:
4040
node-version: "24.x"
4141
registry-url: "https://registry.npmjs.org"
42-
cache: "yarn"
42+
# deliberately not using a cache for action with elevated permissions, see https://tanstack.com/blog/npm-supply-chain-compromise-postmortem
43+
package-manager-cache: false
4344
- run: |
4445
npm config set loglevel verbose
4546
npm config set foreground-scripts true
@@ -71,7 +72,7 @@ jobs:
7172

7273
- name: Create Release Pull Request or Publish to npm
7374
id: changesets
74-
uses: changesets/action@v1
75+
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b
7576
with:
7677
version: yarn changeset-version
7778
publish: yarn changeset-publish

0 commit comments

Comments
 (0)