Skip to content

Set contents: read on the seven workflows without a permissions block - #4859

Open
Totara-thib wants to merge 2 commits into
redis:masterfrom
Totara-thib:contents-read-on-seven-workflows
Open

Totara-thib wants to merge 2 commits into
redis:masterfrom
Totara-thib:contents-read-on-seven-workflows

Conversation

@Totara-thib

Copy link
Copy Markdown

The permissions part of #4850 on its own, as ggivo asked there (46d0169, nothing else in it).

Seven workflows declare no permissions, so on pushes and releases their jobs get every write scope: snapshot.yml and version-and-release.yml, which hold the Maven Central credentials and the signing key, and the five test workflows. Each gets contents: read.

The note on #4527, carried over:

How I checked it: on my fork the five test workflows passed on a push with exactly this token (Contents: read, Metadata: read), job summaries and Maven cache included. One timing test needed a rerun. Snapshot and release cannot run there: they publish with OSSH_USERNAME and OSSH_TOKEN, and no step uses the GitHub token after the checkout.

Seven workflows declare no permissions, so their jobs run with the
repository default, which grants every write scope on pushes and
releases. Two of those jobs hold the Maven Central credentials and the
signing key (snapshot.yml and version-and-release.yml).

None of them uses the token for more than the checkout:
- the snapshot and release jobs publish to Sonatype with OSSH_USERNAME
  and OSSH_TOKEN
- the test result step only writes the job summary since redis#4838
  (check_run and comment_mode are off)
- the Codecov uploads use CODECOV_TOKEN
- cache access follows the trigger and cache-mode, not this block

Pull requests from forks already run the five test workflows with a
read-only token, so this is the token they pass with today.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T12:29:28.496054Z 0a6ae1f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Totara-thib

Copy link
Copy Markdown
Author

Merged master to fix the conflict with #4860. The permissions block now sits just above the new env block in each workflow. The change is still the same 22 lines.

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