Skip to content

Commit 7af024e

Browse files
committed
🌱 ci: stop persisting checkout credentials in PR-tree workflows
Set persist-credentials: false on the actions/checkout step of the five pull_request workflows that run scripts, tests or image builds from the PR tree (mutation-advisory, pr-overlap, stream-image, ci-runner-image, docs-index-reminder). None of them pushes or fetches with the job token; API calls keep getting it via step env under the job's permissions block. Fixes #17636 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1 parent 5a1f8cf commit 7af024e

6 files changed

Lines changed: 9 additions & 0 deletions

File tree

β€Ž.github/workflows/ci-runner-image.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ jobs:
106106
steps:
107107
- name: Checkout
108108
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
109+
with:
110+
persist-credentials: false
109111

110112
# Resolve the base image and the tag once, up front, so every later step
111113
# (the exists-check, the build, the summary) agrees on them.

β€Ž.github/workflows/docs-index-reminder.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
timeout-minutes: 10
4949
steps:
5050
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
51+
with:
52+
persist-credentials: false
5153

5254
- name: Find docs added by this PR that the index does not link
5355
id: check

β€Ž.github/workflows/mutation-advisory.ymlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2828
with:
29+
persist-credentials: false
2930
fetch-depth: 0
3031
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
3132
with:

β€Ž.github/workflows/pr-overlap.ymlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2525
with:
26+
persist-credentials: false
2627
fetch-depth: 0
2728
# Hermetic (local repos + gh double), under a second: a broken check
2829
# mislabels every open PR, so it must not ship untested (#9319).

β€Ž.github/workflows/stream-image.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ jobs:
7373
steps:
7474
- name: Checkout
7575
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
76+
with:
77+
persist-credentials: false
7678

7779
# The supervisor scripts have no Go test lane; shellcheck them and run
7880
# the watchdog decision tests (fake ffmpeg, stubbed Twitch check) here,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- CI: the `pull_request` workflows `mutation-advisory`, `pr-overlap`, `stream-image`, `ci-runner-image` and `docs-index-reminder` now check out with `persist-credentials: false`. None of those jobs pushes or fetches with the job token; steps that call the API keep getting it through their step `env`, scoped by the job's `permissions:` block (#17636).

0 commit comments

Comments
Β (0)