Declare contents: read on the seven workflows without an explicit scope#2558
Open
arpitjain099 wants to merge 1 commit into
Open
Declare contents: read on the seven workflows without an explicit scope#2558arpitjain099 wants to merge 1 commit into
arpitjain099 wants to merge 1 commit into
Conversation
Two pure-CI workflows (cloud-init-image-for-cuttlefish, gigabyte-ampere) check out the repo and build packages/images inside debian containers. presubmit.yaml has multiple read-only jobs (buildozer, staticcheck, frontend unit tests, etc.). The four deploy/cache callers (postsubmit, scheduled-cache-update, stable-channel, unstable-channel) all delegate to update-cache-and-deployment.yaml, which uses google-github-actions/auth@v3 with the ARTIFACT_REGISTRY_UPLOADER JSON-creds secret. The GCP auth path doesn't need GITHUB_TOKEN write scopes; contents: read is enough for the checkout step in the reusable. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
304c1fb to
b8ab8f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seven workflows in
.github/workflows/currently leaveGITHUB_TOKENscope implicit:cloud-init-image-for-cuttlefish,gigabyte-ampere-cuttlefish-installer,presubmit— all check out the repo and run build/test/lint inside debian containers or Ubuntu runners. No writes.postsubmit,scheduled-cache-update,stable-channel,unstable-channel— each delegates toupdate-cache-and-deployment.yamlwith secrets. The reusable usesgoogle-github-actions/auth@v3to authenticate to GCP via theARTIFACT_REGISTRY_UPLOADERJSON-creds secret (not OIDC), so it doesnt needid-token: write.contents: readcovers the checkout in the reusable and stays consistent with whatupdate-cache-and-deployment.yaml` actually needs.YAML validates locally.