Skip to content

Commit 2d58e29

Browse files
fix(ci): grant callers the permissions their reusable workflows declare (#124)
GitHub refuses these runs at workflow-creation time: `Error calling workflow ... The workflow is requesting '<perm>', but is only allowed '<none>'.` A `workflow_call` job must grant a superset of the callee's declared permissions. This adds the canonical grant (`actions: read`, `contents: read`, `security-events: write`) that the healthy repos already carry.
1 parent 21a339e commit 2d58e29

7 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/governance.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ permissions:
1414
jobs:
1515
governance:
1616
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@81dbf2dd854b1444fd6236fa2352474383b2c2b9
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write

‎.github/workflows/hypatia-scan.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ permissions:
1717
jobs:
1818
hypatia:
1919
uses: hyperpolymath/standards/.github/workflows/hypatia-scan-reusable.yml@81dbf2dd854b1444fd6236fa2352474383b2c2b9
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write

‎.github/workflows/mirror.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ jobs:
1313
mirror:
1414
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@d135b05bfc647d0c0fbfedc7e80f37ea50f49236
1515
secrets: inherit
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ jobs:
116116
name: SLSA Provenance
117117
needs: [build]
118118
permissions:
119+
contents: read
120+
security-events: write
119121
actions: read
120122
id-token: write
121123
contents: write

‎.github/workflows/rust-ci.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ permissions:
1515
jobs:
1616
rust-ci:
1717
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@d135b05bfc647d0c0fbfedc7e80f37ea50f49236
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write

‎.github/workflows/scorecard.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ permissions:
1111

1212
jobs:
1313
scorecard:
14-
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@d7c22711e830e1f383846472f6e9b99debdb201e
14+
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@d7c22711e830e1f383846472f6e9b99debdb201e permissions:
15+
actions: read
16+
contents: read
17+
security-events: write

‎.github/workflows/secret-scanner.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ permissions:
1616
jobs:
1717
scan:
1818
permissions:
19+
actions: read
20+
security-events: write
1921
contents: read
2022
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@c65436ee3351cd6b0fa14b142938b195efc77586
2123
secrets: inherit

0 commit comments

Comments
 (0)