ci: add permissions - #178
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens GitHub Actions GITHUB_TOKEN usage by explicitly setting workflow-level permissions across CI workflows, aligning them with least-privilege defaults and making required write scopes explicit.
Changes:
- Add explicit top-level permissions for workflows that need repo/package write access (release, helm-release, stale management).
- Default some CI workflows to read-only
contentsaccess. - Explicitly disable token permissions for the PR label gate workflow (
permissions: {}).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/stale.yaml | Moves issue/PR write permissions to workflow scope for the stale bot workflow. |
| .github/workflows/release.yaml | Grants contents: write + packages: write needed for creating GitHub releases and pushing to GHCR. |
| .github/workflows/pr-labeled.yaml | Explicitly disables token permissions for a workflow that only inspects PR labels via event payload. |
| .github/workflows/main.yaml | Sets read-only contents permission for main CI workflow. |
| .github/workflows/helm.yaml | Sets read-only contents permission for chart linting workflow. |
| .github/workflows/helm-release.yaml | Grants contents: write for chart release publishing. |
| .github/workflows/e2e.yaml | Sets read-only contents permission for e2e workflow. |
| .github/workflows/create-chart-update-pr.yaml | Adds permissions for the chart bump PR workflow (but currently insufficient for its git push). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
ushitora-anqou
force-pushed
the
ci/add-permissions
branch
from
June 8, 2026 07:05
f34cfb4 to
76944ea
Compare
ushitora-anqou
marked this pull request as ready for review
June 8, 2026 07:32
toshipp
approved these changes
Jun 8, 2026
Closed
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.
Add
permissionsfield to the CI workflows.The following workflows are tested on this PR:
The following workflows are tested manually
However, the following workflows cannot be tested (I think), so I'd like to merge them first and fix any issues later.