Skip to content

ci: grant contents: read explicitly on presubmit and deploy entry workflows#525

Merged
0405ysj merged 1 commit into
google:mainfrom
arpitjain099:ci/add-permissions
May 13, 2026
Merged

ci: grant contents: read explicitly on presubmit and deploy entry workflows#525
0405ysj merged 1 commit into
google:mainfrom
arpitjain099:ci/add-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Three workflow files declare no permissions: block. deployment.yaml (the reusable one called by postsubmit and unstable-channel) already has an explicit permissions: contents: read, but the three entry workflows still rely on the repo default.

  • presubmit.yaml — build + test + format + vet + staticcheck + Debian/Docker artifact builds + E2E tests. All read-side from a GITHUB_TOKEN perspective.
  • postsubmit.yaml and unstable-channel.yaml — both just delegate to deployment.yaml with secrets. Adding contents: read here intersects with the reusables declared contents: read= same scope, no regression. TheARTIFACT_REGISTRY_UPLOADER` secret is what authenticates the actual GCP push.

YAML parses cleanly.

The two deploy callers (postsubmit, unstable-channel) only pass secrets
through to the reusable deployment.yaml. The reusable already declares
contents: read at its workflow level, so the callers' explicit contents: read
intersects to the same scope - no scope regression.

presubmit.yaml builds Go, runs tests + lint, builds Debian and Docker
artifacts, and runs E2E tests. All read-side from a GITHUB_TOKEN
perspective.
@0405ysj
Copy link
Copy Markdown
Collaborator

0405ysj commented May 13, 2026

Thanks for the contribution, and clear description in PR! Approved the PR.

@0405ysj 0405ysj self-requested a review May 13, 2026 07:57
@0405ysj 0405ysj added this pull request to the merge queue May 13, 2026
Merged via the queue into google:main with commit e0ace27 May 13, 2026
7 of 8 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