From d80c3e73d181a22dbf21f04c327e1ef1aba3a80f Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 12 Nov 2026 09:19:37 -0800 Subject: [PATCH] Harden tensorflow-cloud CI workflow against token exfiltration. Compromised tokens or untrusted CI dependencies can harvest over-privileged default workflow tokens persisted on the runner. - Restrict `actions.yml` permissions to `contents: read` and disable checkout credential persistence. PiperOrigin-RevId: 1020184809 --- .github/workflows/actions.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index f1c755fb..3fe79f33 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ master ] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest @@ -14,6 +17,8 @@ jobs: python-version: [3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: