Skip to content

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

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

ci: declare GITHUB_TOKEN permissions on cargo and nightly workflows#1020
arpitjain099 wants to merge 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>
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