Skip to content

Commit ce8dc9b

Browse files
committed
ci: declare workflow-level contents: read on 3 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 6ef7ad8 commit ce8dc9b

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci-package-manager.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
branches:
1010
- main
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
ci-package-manager:
1417
uses: eslint/workflows/.github/workflows/ci-package-manager.yml@main

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches:
88
- main
9+
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
lint:
1115
name: Lint

.github/workflows/update-readme.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
update-readme:
1114
uses: eslint/workflows/.github/workflows/update-readme.yml@main

0 commit comments

Comments
 (0)