Skip to content

ci: declare permissions on 5 workflows (lint, issues, semgrep, release-python-*)#6761

Open
arpitjain099 wants to merge 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions
Open

ci: declare permissions on 5 workflows (lint, issues, semgrep, release-python-*)#6761
arpitjain099 wants to merge 1 commit into
cloudflare:mainfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

Five of the six workerd workflows that still inherit default GITHUB_TOKEN scopes get an explicit permissions: block here:

Workflow Scope Why
lint.yml contents: read bazel-driven format + lint check
semgrep.yml contents: read scheduled scan, findings go to cloudflare's Semgrep AppSec via SEMGREP_APP_TOKEN
issues.yml permissions: {} actions/add-to-project uses secrets.DEVPROD_PAT; the default token is unused
release-python-runtime.yml contents: write + pull-requests: read the 'Check for open PR and commit changes' step uses gh pr list and git push origin $BRANCH_NAME
release-python-snapshots.yml contents: write + pull-requests: read same fixup-commit pattern as runtime

The R2 uploads in both release workflows use their own R2_* secrets, not GITHUB_TOKEN, so they don't influence the scope.

cla.yml is intentionally not included — contributor-assistant/github-action runs in pull_request_target context 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.

…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>
@arpitjain099 arpitjain099 requested review from a team as code owners May 13, 2026 10:57
@arpitjain099 arpitjain099 requested a review from penalosa May 13, 2026 10:57
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@arpitjain099
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request May 13, 2026
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