Skip to content

ci: declare GITHUB_TOKEN permissions on cargo and nightly workflows#1020

Merged
copybara-service[bot] merged 1 commit into
google:mainfrom
arpitjain099:ci/add-permissions
May 28, 2026
Merged

ci: declare GITHUB_TOKEN permissions on cargo and nightly workflows#1020
copybara-service[bot] merged 1 commit into
google:mainfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Two workflows currently leave GITHUB_TOKEN scope implicit:

  • nightly.yaml — stub that just echoes a redirect message and exit 1s. No checkout, no install, no API. permissions: {} (deny all) is correct here.
  • rust.yml — two jobs (test, test_cmake) running cargo test / cargo build / cmake build && ctest. Pure CI; contents: read at the workflow level covers the actions/checkout step and the cache restore. Nothing here pushes commits or calls write APIs.

mdbook.yaml already declares explicit permissions for the GH Pages deployment; this just brings the other two in line.

nightly.yaml is a stub that just echoes a redirect message and exits 1 (the
real workflow lives on the test-matrix branch). It doesn't need any
GITHUB_TOKEN scope, so permissions: {}.

rust.yml runs cargo test + cargo build + cmake test on every push/PR. Two
jobs, both pure CI - contents: read is enough.

The mdbook.yaml workflow already declares explicit permissions for the
GitHub Pages deployment; this aligns the remaining cargo + nightly
workflows with that pattern.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
Copy link
Copy Markdown
Contributor Author

Hello, Checking in on review timing. Glad to rebase whenever convenient. Appreciated.

@thunderseethe
Copy link
Copy Markdown
Contributor

Whoops sorry thank you for the ping (and the PR!). I will get this merged.

copybara-service Bot pushed a commit that referenced this pull request May 28, 2026
--
975e131 by Arpit Jain <arpitjain099@gmail.com>:

ci: add explicit GITHUB_TOKEN permissions to nightly and cargo workflows

nightly.yaml is a stub that just echoes a redirect message and exits 1 (the
real workflow lives on the test-matrix branch). It doesn't need any
GITHUB_TOKEN scope, so permissions: {}.

rust.yml runs cargo test + cargo build + cmake test on every push/PR. Two
jobs, both pure CI - contents: read is enough.

The mdbook.yaml workflow already declares explicit permissions for the
GitHub Pages deployment; this aligns the remaining cargo + nightly
workflows with that pattern.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
FUTURE_COPYBARA_INTEGRATE_REVIEW=#1020 from arpitjain099:ci/add-permissions 975e131
PiperOrigin-RevId: 921709603
@copybara-service copybara-service Bot merged commit 329cbdf into google:main May 28, 2026
1 of 3 checks passed
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.

2 participants