ci: declare permissions on 5 workflows (lint, issues, semgrep, release-python-*)#6761
Open
arpitjain099 wants to merge 1 commit into
Open
ci: declare permissions on 5 workflows (lint, issues, semgrep, release-python-*)#6761arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
…e-python-*)
- lint.yml + semgrep.yml: read-only checks. contents: read.
- issues.yml: actions/add-to-project uses secrets.DEVPROD_PAT, so the
default token is unused — permissions: {} is the accurate minimum.
- release-python-runtime.yml + release-python-snapshots.yml: the
'Check for open PR and commit changes' step uses gh pr list +
git push (via GITHUB_TOKEN), so contents: write +
pull-requests: read covers it. R2 uploads use their own secrets and
don't touch the default token.
cla.yml is intentionally not included here because its
contributor-assistant/github-action runs in pull_request_target
context and its permission requirements are intricate (actions/PRs/
issues/statuses). Worth a focused review by the team.
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
cd29767 to
9b5cf03
Compare
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.
Five of the six workerd workflows that still inherit default
GITHUB_TOKENscopes get an explicitpermissions:block here:lint.ymlcontents: readsemgrep.ymlcontents: readSEMGREP_APP_TOKENissues.ymlpermissions: {}actions/add-to-projectusessecrets.DEVPROD_PAT; the default token is unusedrelease-python-runtime.ymlcontents: write+pull-requests: readgh pr listandgit push origin $BRANCH_NAMErelease-python-snapshots.ymlcontents: write+pull-requests: readThe R2 uploads in both release workflows use their own
R2_*secrets, notGITHUB_TOKEN, so they don't influence the scope.cla.ymlis intentionally not included —contributor-assistant/github-actionruns inpull_request_targetcontext and its permission set (actions/contents/pull-requests/issues/statuses) needs a focused review by the team to avoid breaking the CLA flow. Happy to follow up in a separate PR if you'd like a recommended set.YAML validated locally for each edited file.