Skip to content

Commit bf2dbea

Browse files
committed
fix(ci): grant the secret-scanner reusable its required job permissions
The `scan` job calls secret-scanner-reusable.yml, whose `gitleaks` job declares `pull-requests: write` (PR summary comment) and `actions: read` (workflow-run metadata) at job level. A called reusable workflow may only request permissions equal to or more restrictive than its caller. This caller granted only the file-level `contents: read`, so GitHub refused the run at parse time and every Secret Scanner run ended in `startup_failure` — secret scanning has not actually executed in this repo since the pin landed. Grants the superset at job level, matching the canonical template and the 176 estate repos whose scanner already runs. No SHA pin is changed.
1 parent a416b3f commit bf2dbea

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/secret-scanner.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,12 @@ permissions:
1515

1616
jobs:
1717
scan:
18+
# The reusable's gitleaks job requests pull-requests: write (PR summary
19+
# comment) and actions: read (workflow-run metadata) at job level; the
20+
# caller must grant at least that or the run startup-fails.
21+
permissions:
22+
contents: read
23+
pull-requests: write
24+
actions: read
1825
uses: hyperpolymath/standards/.github/workflows/secret-scanner-reusable.yml@d135b05bfc647d0c0fbfedc7e80f37ea50f49236
1926
secrets: inherit

0 commit comments

Comments
 (0)