Skip to content

Commit cd9666f

Browse files
committed
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 <arpitjain099@gmail.com>
1 parent 4e0b558 commit cd9666f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/ci_tests_run_notebooks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- cron: '0 5 * * 1'
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
tests:
1619
name: ${{ matrix.os }} ${{ matrix.name }}

0 commit comments

Comments
 (0)