Skip to content

Commit d46f46c

Browse files
committed
ci: declare workflow-level contents: read on 4 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 <[email protected]>
1 parent 36f299c commit d46f46c

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/validate-js-functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
env:
1212
CARGO_TERM_COLOR: always
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
checks:
1619
runs-on: ubuntu-latest

.github/workflows/validate-rust-functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
env:
1414
CARGO_TERM_COLOR: always
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
checks:
1821
runs-on: ubuntu-latest

.github/workflows/validate-ts-functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
env:
1212
CARGO_TERM_COLOR: always
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
checks:
1619
runs-on: ubuntu-latest

.github/workflows/validate-wasm-functions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
env:
1212
CARGO_TERM_COLOR: always
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
checks:
1619
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)