Skip to content

ci: declare contents:read on nightly wheels workflow#101

Open
arpitjain099 wants to merge 1 commit into
tensorflow:masterfrom
arpitjain099:chore/nightly-permissions
Open

ci: declare contents:read on nightly wheels workflow#101
arpitjain099 wants to merge 1 commit into
tensorflow:masterfrom
arpitjain099:chore/nightly-permissions

Conversation

@arpitjain099

Copy link
Copy Markdown

The nightly Build tfx-bsl Nightly workflow builds wheels for the cp310-cp313 / ubuntu+macos matrix via pypa/cibuildwheel@v2.23.3 and uploads them as actions/upload-artifact artifacts. No GitHub API write (artifact upload in v4 doesn't require explicit permissions), no comment on PRs, no push to the repo.

This patch sets permissions: contents: read at workflow scope. It matches the per-job permission block already in build.yml (id-token: write for trusted publishing of the release wheels) -- both workflows now declare the minimum the steps actually use.

With explicit scope:

  • the workflow token can't be widened by a future change to the repo default
  • the SLSA / OpenSSF Scorecard Token-Permissions check passes for this file
  • a hypothetical compromise of pypa/cibuildwheel or actions/upload-artifact (cf. tj-actions/changed-files CVE-2025-30066) stays boxed in read-only.

ci-lint.yml is the other workflow that doesn't declare permissions, but it's 21 lines and below the noise floor for a separate PR.

No behavioural change.

The nightly build_wheels job only checks out, configures bazel, runs
pypa/cibuildwheel, and uploads the resulting wheels as artifacts. No
GitHub API write beyond actions/checkout. contents:read is the floor.

Style matches the per-job permissions block already in build.yml
(id-token:write for trusted publishing).

ci-lint.yml is only 21 lines and left out of this PR.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
arpitjain099 force-pushed the chore/nightly-permissions branch from 999fe36 to b9f9186 Compare June 10, 2026 07:21
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