From 712bd740178fcb2541ad29e8f5b42937db5754a4 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 12 Nov 2026 10:21:14 +0000 Subject: [PATCH] .github: stop persisting checkout credentials Only mike and vouch push; their checkouts keep the token, explicitly. --- .github/workflows/build.yml | 3 +++ .github/workflows/check-generated.yml | 1 + .github/workflows/check-tests.yaml | 1 + .github/workflows/container-main.yml | 4 ++++ .github/workflows/docs-deploy.yml | 2 ++ .github/workflows/docs-test.yml | 2 ++ .github/workflows/gc.yml | 2 ++ .github/workflows/integration-test-template.yml | 1 + .github/workflows/needs-more-info-comment.yml | 1 + .github/workflows/nix-checks.yml | 14 ++++++++++++++ .github/workflows/nix-module-test.yml | 1 + .github/workflows/release-check.yml | 1 + .github/workflows/release.yml | 1 + .github/workflows/servertest.yml | 2 ++ .github/workflows/support-request.yml | 1 + .../workflows/tailscale-action-integration.yaml | 4 ++++ .github/workflows/test-integration.yaml | 3 +++ .github/workflows/vouch-check-pr.yml | 1 + .github/workflows/vouch-manage-by-issue.yml | 2 ++ .github/workflows/vouch-sync-codeowners.yml | 2 ++ 20 files changed, 49 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ac55531c..29fa17e85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files id: changed-files @@ -90,6 +91,8 @@ jobs: - "GOARCH=amd64 GOOS=darwin" steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index b20d88037..0404df454 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -25,6 +25,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files id: changed-files diff --git a/.github/workflows/check-tests.yaml b/.github/workflows/check-tests.yaml index 08ebb2220..006a53ada 100644 --- a/.github/workflows/check-tests.yaml +++ b/.github/workflows/check-tests.yaml @@ -19,6 +19,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files id: changed-files diff --git a/.github/workflows/container-main.yml b/.github/workflows/container-main.yml index e65d0bc52..bb3df08c0 100644 --- a/.github/workflows/container-main.yml +++ b/.github/workflows/container-main.yml @@ -33,6 +33,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - name: Login to DockerHub uses: docker/login-action@v4.8.0 @@ -98,6 +100,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index fe52e3d11..6c1718473 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -26,6 +26,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v7.0.1 with: + # mike pushes to gh-pages with it. + persist-credentials: true fetch-depth: 0 - name: Install python uses: actions/setup-python@v7.1.0 diff --git a/.github/workflows/docs-test.yml b/.github/workflows/docs-test.yml index b32d23d83..5edd92fc3 100644 --- a/.github/workflows/docs-test.yml +++ b/.github/workflows/docs-test.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - name: Install python uses: actions/setup-python@v7.1.0 with: diff --git a/.github/workflows/gc.yml b/.github/workflows/gc.yml index e76dd6ccb..fd3ca3b13 100644 --- a/.github/workflows/gc.yml +++ b/.github/workflows/gc.yml @@ -31,6 +31,8 @@ jobs: contents: read steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: Run garbage collection diff --git a/.github/workflows/integration-test-template.yml b/.github/workflows/integration-test-template.yml index bd26c1bba..9054ae4d4 100644 --- a/.github/workflows/integration-test-template.yml +++ b/.github/workflows/integration-test-template.yml @@ -39,6 +39,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Tailscale if: ${{ env.HAS_TAILSCALE_SECRET }} diff --git a/.github/workflows/needs-more-info-comment.yml b/.github/workflows/needs-more-info-comment.yml index d3d3dd823..b84a8e0f3 100644 --- a/.github/workflows/needs-more-info-comment.yml +++ b/.github/workflows/needs-more-info-comment.yml @@ -17,6 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v7.0.1 with: + persist-credentials: false sparse-checkout: .github/label-response/needs-more-info.md sparse-checkout-cone-mode: false diff --git a/.github/workflows/nix-checks.yml b/.github/workflows/nix-checks.yml index d423b3c8c..b7f7d33e9 100644 --- a/.github/workflows/nix-checks.yml +++ b/.github/workflows/nix-checks.yml @@ -23,6 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: build @@ -32,6 +34,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: gotest @@ -42,6 +46,8 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: gorace @@ -51,6 +57,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: golangci-lint @@ -60,6 +68,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: formatting @@ -69,6 +79,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: nixos-options @@ -78,6 +90,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: nixos-module diff --git a/.github/workflows/nix-module-test.yml b/.github/workflows/nix-module-test.yml index c98ba3815..bdddaa209 100644 --- a/.github/workflows/nix-module-test.yml +++ b/.github/workflows/nix-module-test.yml @@ -21,6 +21,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml index 8e1d7355d..4b6b940bd 100644 --- a/.github/workflows/release-check.yml +++ b/.github/workflows/release-check.yml @@ -24,6 +24,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 0 - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3621e1aa8..741711f49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ jobs: - name: Checkout uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 0 - name: Login to DockerHub diff --git a/.github/workflows/servertest.yml b/.github/workflows/servertest.yml index 6961d4645..6227eaf05 100644 --- a/.github/workflows/servertest.yml +++ b/.github/workflows/servertest.yml @@ -27,6 +27,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 diff --git a/.github/workflows/support-request.yml b/.github/workflows/support-request.yml index 13e6ab469..03448fbad 100644 --- a/.github/workflows/support-request.yml +++ b/.github/workflows/support-request.yml @@ -17,6 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v7.0.1 with: + persist-credentials: false sparse-checkout: .github/label-response/support-request.md sparse-checkout-cone-mode: false diff --git a/.github/workflows/tailscale-action-integration.yaml b/.github/workflows/tailscale-action-integration.yaml index f9af41f5a..9bd15c30e 100644 --- a/.github/workflows/tailscale-action-integration.yaml +++ b/.github/workflows/tailscale-action-integration.yaml @@ -47,6 +47,8 @@ jobs: auth: [oauth, authkey] steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - id: hs uses: $/.github/actions/headscale-up @@ -124,6 +126,8 @@ jobs: assert: sudo tailscale debug prefs | jq -e '.CorpDNS == false' steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - id: hs uses: $/.github/actions/headscale-up diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index 349dddd96..277b062c0 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -26,6 +26,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files id: changed-files @@ -158,6 +159,8 @@ jobs: if: needs.build.outputs.files-changed == 'true' steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - uses: NixOS/nix-installer-action@v1.0.0 - uses: Mic92/hestia@v3.1.0 - name: Force overlay2 storage driver diff --git a/.github/workflows/vouch-check-pr.yml b/.github/workflows/vouch-check-pr.yml index 2c27dc0f9..38ea1c30e 100644 --- a/.github/workflows/vouch-check-pr.yml +++ b/.github/workflows/vouch-check-pr.yml @@ -14,6 +14,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false sparse-checkout: .github/pr-unvouched-message - uses: mitchellh/vouch/action/check-pr@v1.5.0 diff --git a/.github/workflows/vouch-manage-by-issue.yml b/.github/workflows/vouch-manage-by-issue.yml index 171c90976..9e534674c 100644 --- a/.github/workflows/vouch-manage-by-issue.yml +++ b/.github/workflows/vouch-manage-by-issue.yml @@ -28,6 +28,8 @@ jobs: - uses: actions/checkout@v7.0.1 with: + # vouch pushes its branch with it. + persist-credentials: true token: ${{ steps.app.outputs.token }} - uses: mitchellh/vouch/action/manage-by-issue@v1.5.0 diff --git a/.github/workflows/vouch-sync-codeowners.yml b/.github/workflows/vouch-sync-codeowners.yml index 18c612d91..2f577ce2a 100644 --- a/.github/workflows/vouch-sync-codeowners.yml +++ b/.github/workflows/vouch-sync-codeowners.yml @@ -28,6 +28,8 @@ jobs: - uses: actions/checkout@v7.0.1 with: + # vouch pushes its branch with it. + persist-credentials: true # vouch branches off the checkout and squash-merges into main through # the App's bypass, so a dispatch on any other branch would land it. ref: ${{ github.event.repository.default_branch }}