Skip to content

ci: per-job permissions for publish-pypi, release-doctor, sync-labels, semgrep - #2726

Merged
musa-cf merged 1 commit into
nextfrom
ci/add-permissions
May 21, 2026
Merged

ci: per-job permissions for publish-pypi, release-doctor, sync-labels, semgrep#2726
musa-cf merged 1 commit into
nextfrom
ci/add-permissions

Conversation

@musa-cf

@musa-cf musa-cf commented May 21, 2026

Copy link
Copy Markdown
Contributor

Per-job permissions blocks on the four workflows still inheriting defaults:

  • publish-pypi.ymlcontents: read. The actual PyPI publish uses PYPI_TOKEN (or its Cloudflare-specific override), not the GitHub token. The runner only needs to check out the source.
  • release-doctor.ymlcontents: read. Just runs ./bin/check-release-environment as a sanity check.
  • sync-labels.ymlissues: write. micnncim/action-label-syncer@v1 creates/updates labels via GITHUB_TOKEN; that endpoint is part of the issues API, so issues: write is the documented minimum.
  • semgrep.ymlcontents: read. Only checks out code and runs semgrep ci with an app token.

Per-job style matches ci.yml (contents: read + id-token: write) and detect-breaking-changes.yml (contents: read).

Supersedes #2720 (rebased onto next, added semgrep permissions).

…, semgrep

- publish-pypi: contents: read -- publish step uses PYPI_TOKEN, not
  GITHUB_TOKEN.
- release-doctor: contents: read -- only runs a local sanity-check
  script.
- sync-labels: issues: write -- micnncim/action-label-syncer manages
  repo labels via GITHUB_TOKEN.
- semgrep: contents: read -- only checks out code and runs semgrep ci.

Matches the per-job permissions style already used in ci.yml and
detect-breaking-changes.yml.

Co-authored-by: arpitjain099 <arpitjain099@gmail.com>
@musa-cf
musa-cf force-pushed the ci/add-permissions branch from 756ac96 to ed104a9 Compare May 21, 2026 21:56
@musa-cf musa-cf self-assigned this May 21, 2026
@musa-cf
musa-cf merged commit eac1888 into next May 21, 2026
9 checks passed
@musa-cf
musa-cf deleted the ci/add-permissions branch May 21, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant