From 1eb4a07151812c1a33d76676817687a10c1bd159 Mon Sep 17 00:00:00 2001 From: Oliver Lazoroski Date: Wed, 25 Nov 2026 12:07:26 +0100 Subject: [PATCH] ci: do not persist GITHUB_TOKEN in test checkouts The unit and integration lanes check out the repository and then run its code, but never push. Leaving the token in .git/config lets that code, or anything it pulls in, reuse it. SEC-2544 --- .github/workflows/run_integration.yml | 8 ++++++++ .github/workflows/run_tests.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/run_integration.yml b/.github/workflows/run_integration.yml index 99ea11b..e2f5e56 100644 --- a/.github/workflows/run_integration.yml +++ b/.github/workflows/run_integration.yml @@ -28,6 +28,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -56,6 +58,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -78,6 +82,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Ruby uses: ruby/setup-ruby@v1 @@ -100,6 +106,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 56dafa3..0b4f4ca 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -21,6 +21,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Ruby uses: ruby/setup-ruby@v1