Skip to content

Commit cd4a4a6

Browse files
committed
ci: declare contents:read on slack-alert workflow
slack-alert runs on workflow_run, which executes with the elevated default-branch context (not the read-only pull_request context). The job only posts to a Slack webhook via SLACK_WEBHOOK_URL; it never calls the GitHub API. Pinning the workflow to contents:read makes the minimum-scope contract explicit, matching release.yml and website.yml which already declare permissions blocks. tests.yml uses actions/cache and is therefore left for a separate change to avoid muddling the cache-write semantics here. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent 4e16a51 commit cd4a4a6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/slack-alert.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
workflows: [tests]
66
types: [completed]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
on-failure:
1013
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)