Skip to content

Commit 9018dd2

Browse files
authored
Merge pull request #13382 from Turbo87/zizmor-workflow-fixes
2 parents ca4cf12 + 24af3c6 commit 9018dd2

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ jobs:
338338
needs: filter-jobs
339339
if: needs.filter-jobs.outputs.zizmor == 'true'
340340
permissions:
341-
security-events: write
341+
security-events: write # needed by `codeql-action/upload-sarif` to upload zizmor results to GitHub code scanning
342342
steps:
343343
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
344344
with:

.github/workflows/smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-24.04
1818

1919
permissions:
20-
id-token: write
20+
id-token: write # needed by `crates-io-auth-action` to mint an OIDC token for Trusted Publishing
2121

2222
steps:
2323
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/update-cdn-ip-ranges.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ on:
1313
schedule:
1414
- cron: "42 * * * *"
1515

16-
permissions:
17-
contents: write
16+
permissions: {}
1817

1918
concurrency:
2019
group: update-cdn-ip-ranges
@@ -27,12 +26,15 @@ jobs:
2726
run:
2827
runs-on: ubuntu-latest
2928
if: ${{ github.repository_owner == 'rust-lang' }}
29+
permissions:
30+
contents: write # needed to `git push` the updated CDN IP ranges back to the `main` branch
31+
3032
steps:
3133
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
3234
id: app-token
3335
with:
3436
app-id: ${{ vars.WORKFLOWS_CRATES_IO_APP_ID }}
35-
private-key: ${{ secrets.WORKFLOWS_CRATES_IO_PRIVATE_KEY }}
37+
private-key: ${{ secrets.WORKFLOWS_CRATES_IO_PRIVATE_KEY }} # zizmor: ignore[secrets-outside-env] repository write access is already the effective boundary; an environment adds no meaningful protection
3638

3739
- name: Get GitHub App User ID
3840
id: get-user-id

0 commit comments

Comments
 (0)