ci: declare minimum permissions on PR title workflow#579
Closed
arpitjain099 wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
styfle
added a commit
that referenced
this pull request
May 23, 2026
This action doesnt need to read the contents of the repo, it only needs access to the PR in order to validate the title. So this PR removes all permissions besides reading the PR metadata. - Closes #579
Author
|
@styfle curious why you closed this PR and not merge it? I see that you recreated the change in your PR. Are there any vercel policies around open source contributions that I should be aware of? |
Member
|
It was requesting too many permissions See #588 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Declares
permissions: contents: read, pull-requests: readat the workflow level. The job's single step runs a PR-title validator (amannn/action-semantic-pull-requestor equivalent) which reads the PR title via the pulls API and reports the result as the workflow's own check status. That needs read onpull-requestsand 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-filescompromise where a tampered third-party action exfiltratedGITHUB_TOKENfrom 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.