Commit 91ade3b
authored
ci: declare minimum permissions on PR title workflow (#756)
Declares `permissions: contents: read, pull-requests: read` at the
workflow level. The job's single step runs a PR-title validator
(`amannn/action-semantic-pull-request` or equivalent) which reads the PR
title via the pulls API and reports the result as the workflow's own
check status. That needs read on `pull-requests` and nothing else.
The reason to be explicit even when the inherited default may already be
reasonable is CVE-2025-30066, the March 2025 `tj-actions/changed-files`
compromise where a tampered third-party action exfiltrated
`GITHUB_TOKEN` from workflow logs. The leaked token carried whatever
scope was issued at the workflow level, so per-workflow caps bound the
runtime blast radius regardless of repo or org default. The block also
gives drift protection if that default ever widens and is what OpenSSF
Scorecard's Token-Permissions check looks for.
YAML validated locally with `yaml.safe_load`.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>1 parent ab49faf commit 91ade3b
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
0 commit comments