Skip to content

ci: declare minimum permissions on PR title workflow#579

Open
arpitjain099 wants to merge 1 commit into
vercel:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777933-45
Open

ci: declare minimum permissions on PR title workflow#579
arpitjain099 wants to merge 1 commit into
vercel:mainfrom
arpitjain099:chore/declare-workflow-perms-1778777933-45

Conversation

@arpitjain099
Copy link
Copy Markdown

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>
@arpitjain099 arpitjain099 requested review from a team, icyJoseph, ijjk and styfle as code owners May 14, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant