Skip to content

Commit e78aa60

Browse files
fix(ci): grant callers the permissions their reusable workflows declare (#556)
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 59accee commit e78aa60

4 files changed

Lines changed: 10 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@da2c748aad55c1a1dcba00b60fe4a35017bc6540
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@571cc734cd69fb846032ec77a662aa8ee4fc32cd
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
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
scorecard:
1616
permissions:
17+
actions: read
1718
contents: read
1819
security-events: write
1920
id-token: write

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ permissions:
2020
jobs:
2121
scan:
2222
permissions:
23+
security-events: write
2324
contents: read
2425
pull-requests: write
2526
actions: read

0 commit comments

Comments
 (0)