From 3381e0fcbf6b8c1569a89c78a29a0913fcfe169b Mon Sep 17 00:00:00 2001 From: NaiveCoding <71413722+ReviveCoding@users.noreply.github.com> Date: Thu, 15 Oct 2026 13:27:18 -0400 Subject: [PATCH] Least-privilege CI token and immutable GitHub Actions references --- .github/workflows/ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e075ae..5989f74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: pull_request: workflow_dispatch: +permissions: + contents: read + jobs: validate: runs-on: ubuntu-latest @@ -12,8 +15,10 @@ jobs: PYTHONDONTWRITEBYTECODE: '1' PYTEST_DISABLE_PLUGIN_AUTOLOAD: '1' steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: python-version: '3.11' - name: Install dependencies