Skip to content

Commit d022f9e

Browse files
fix(ci): grant callers the permissions their reusable workflows declare (#73)
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 6c1be81 commit d022f9e

6 files changed

Lines changed: 17 additions & 0 deletions

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@571cc734cd69fb846032ec77a662aa8ee4fc32cd
17+
permissions:
18+
actions: read
19+
contents: read
20+
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@571cc734cd69fb846032ec77a662aa8ee4fc32cd
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@571cc734cd69fb846032ec77a662aa8ee4fc32cd
18+
permissions:
19+
actions: read
20+
contents: read
21+
security-events: write

.github/workflows/scorecard.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
scorecard:
1414
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
1515
permissions:
16+
actions: read
1617
contents: read
1718
security-events: write
1819
id-token: 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@571cc734cd69fb846032ec77a662aa8ee4fc32cd
2123
secrets: inherit

0 commit comments

Comments
 (0)