From a17e12e5518dc537a150e5de3a38c78f13f5c11d Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Fri, 15 May 2026 14:51:12 +0900 Subject: [PATCH] ci: declare workflow-level contents: read on 1 workflows Pins the default GITHUB_TOKEN to contents: read on the workflows in .github/workflows/ that don't call a GitHub API beyond the initial checkout. The other workflows in this directory are left implicit because they need write scopes that a maintainer is better placed 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 if the default ever widens, 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/mark-epic-done.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mark-epic-done.yml b/.github/workflows/mark-epic-done.yml index 128e67ba82c..7aa0e06ea7a 100644 --- a/.github/workflows/mark-epic-done.yml +++ b/.github/workflows/mark-epic-done.yml @@ -4,6 +4,9 @@ on: pull_request: types: [closed] +permissions: + contents: read + jobs: mark-epic-done: # Only run if PR was merged and title contains "Release notes for"