From 4e913ecc1a4fbdc5eda6c4de0e305e8f0f4f7868 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 17 Dec 2024 20:07:26 -0800 Subject: [PATCH] ci: Do not persist credentials after checkout See actions/checkout#485 and https://johnstawinski.com/2024/01/11/playing-with-fire-how-we-executed-a-critical-supply-chain-attack-on-pytorch/ In short, it is a terrible idea to persist even our default credentials after checkout. There's no call for that, so we will now set `persist-credentials: false` on all checkout actions. --- .github/workflows/release-please.yml | 1 + .github/workflows/test-gha.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d086435..e52ab78 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -20,6 +20,7 @@ jobs: - uses: actions/checkout@v4 with: ref: refs/tags/${{ steps.release.outputs.tag_name }} + persist-credentials: false if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-node@v1 diff --git a/.github/workflows/test-gha.yaml b/.github/workflows/test-gha.yaml index 3816fc5..fcca76a 100644 --- a/.github/workflows/test-gha.yaml +++ b/.github/workflows/test-gha.yaml @@ -28,6 +28,7 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.ref }} + persist-credentials: false - uses: actions/setup-node@v1 with: