From 427a383dfe4867eae2f1f7ffeb732c35a42d629b Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 5 Oct 2026 12:30:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F(ci)=20set=20persist-crede?= =?UTF-8?q?ntials:=20false=20on=20actions/checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default, `actions/checkout` saves the job's auth token (`GITHUB_TOKEN` or the provided PAT) in the local git config so later steps can run authenticated git commands. That token then stays on disk for the rest of the job, where it can leak: * If an artifact upload includes the checkout directory, the token is packaged with it and anyone with artifact access can extract it. On public repos that is anyone, and the token can be used while the job is still running ("ArtiPACKED", flagged by `zizmor` as `artipacked`). * Any later step, third-party action, or build dependency can read the token from the git config, which widens the impact of a supply-chain compromise. None of our workflows need authenticated git after checkout, so disable credential persistence. If a step needs to push in --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f9e344a..48a0491a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,6 +88,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Create writable /data run: | @@ -159,6 +161,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install ffmpeg run: | @@ -186,6 +190,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install dependencies run: cd src/frontend/ && npm ci --ignore-scripts @@ -203,6 +209,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install Node.js uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 @@ -225,6 +233,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install dependencies run: npm ci --ignore-scripts @@ -246,6 +256,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Install dependencies run: npm ci --ignore-scripts