ci: declare minimum permissions on PR title workflow - #861
Merged
styfle merged 1 commit intoJun 9, 2026
Merged
Conversation
styfle
approved these changes
May 21, 2026
ijjk
approved these changes
May 21, 2026
Contributor
Author
styfle
reviewed
May 26, 2026
Member
|
The read content permission is not necessary. Also you need to sign your commits before we can merge. |
arpitjain099
force-pushed
the
chore/declare-workflow-perms-1778777959-47
branch
from
June 2, 2026 01:07
3964c6f to
ff57abc
Compare
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
The Lint PR workflow only reads the pull request to validate its title via amannn/action-semantic-pull-request, so scope GITHUB_TOKEN to pull-requests: read. Co-authored-by: Steven <steven@ceriously.com> Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
arpitjain099
force-pushed
the
chore/declare-workflow-perms-1778777959-47
branch
from
June 2, 2026 01:08
ff57abc to
b599848
Compare
Contributor
Author
|
Thanks @styfle, both addressed:
Rebased onto current |
styfle
approved these changes
Jun 9, 2026
styfle
enabled auto-merge (squash)
June 9, 2026 16:20
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.