Skip to content

Commit e2aa1cc

Browse files
fix(ci): grant callers the permissions their reusable workflows declare (#100)
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 5369a08 commit e2aa1cc

4 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/governance.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ permissions:
3636
jobs:
3737
governance:
3838
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@fcb566cfb8a86cea2d3666bf65a4f177a49b1313
39+
permissions:
40+
actions: read
41+
contents: read
42+
security-events: write

‎.github/workflows/mirror.yml‎

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

‎.github/workflows/scorecard.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
analysis:
1616
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@84355587cb2a1f86e6882de83514a32db2646e7a
1717
permissions:
18+
actions: read
1819
contents: read
1920
security-events: write
2021
id-token: write

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ permissions:
2020
jobs:
2121
scan:
2222
permissions:
23+
actions: read
24+
security-events: write
2325
contents: read
2426
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@fcb566cfb8a86cea2d3666bf65a4f177a49b1313
2527
secrets: inherit

0 commit comments

Comments
 (0)