ci: declare workflow-level contents: read on 7 CI/lint workflows

Rebased onto current main to resolve conflicts. Pins GITHUB_TOKEN to contents: read on workflows that don't write to the GitHub API.

Post-CVE-2025-30066 (tj-actions/changed-files) hardening pattern.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
This commit is contained in:
Arpit Jain 2026-05-26 16:10:50 +09:00
parent 138263a1b4
commit 77f7b53d5e
No known key found for this signature in database
5 changed files with 15 additions and 0 deletions

View file

@ -6,6 +6,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-ubuntu-latest:

View file

@ -11,6 +11,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
coverity:
if: github.repository == 'redis/redis'

View file

@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-external-standalone:
runs-on: ubuntu-latest

View file

@ -4,6 +4,9 @@ on:
release:
types: [published]
permissions:
contents: read
jobs:
redis_docs_sync:
if: github.repository == 'redis/redis'

View file

@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
reply-schemas-linter:
runs-on: ubuntu-latest