From cd9666f0069ab8765c79fcbd81cf8de566ca9942 Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Sun, 17 May 2026 12:15:14 +0900 Subject: [PATCH] ci: declare workflow-level contents: read on 1 workflows Pins the default GITHUB_TOKEN to contents: read on workflows that don't call a GitHub API beyond the initial checkout. Other workflows that need write scopes are left implicit for a maintainer to declare. Motivation: CVE-2025-30066 (March 2025 tj-actions/changed-files compromise) exfiltrated GITHUB_TOKEN from workflow logs. Per-workflow caps bound runtime authority irrespective of repo or org default, give drift protection, and are credited per-file by the OpenSSF Scorecard Token-Permissions check. YAML validated locally with yaml.safe_load. Signed-off-by: Arpit Jain --- .github/workflows/ci_tests_run_notebooks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci_tests_run_notebooks.yml b/.github/workflows/ci_tests_run_notebooks.yml index b2b6dafb..68ecf4b1 100644 --- a/.github/workflows/ci_tests_run_notebooks.yml +++ b/.github/workflows/ci_tests_run_notebooks.yml @@ -11,6 +11,9 @@ on: - cron: '0 5 * * 1' workflow_dispatch: +permissions: + contents: read + jobs: tests: name: ${{ matrix.os }} ${{ matrix.name }}