Skip to content

ci: add permissions - #178

Merged
toshipp merged 1 commit into
mainfrom
ci/add-permissions
Jun 8, 2026
Merged

toshipp merged 1 commit into
mainfrom
ci/add-permissions

Conversation

@ushitora-anqou

@ushitora-anqou ushitora-anqou commented Jun 4, 2026 •

Copy link
Copy Markdown
Member

Add permissions field to the CI workflows.

The following workflows are tested on this PR:

  • e2e.yaml
  • main.yaml
  • pr-labeled.yaml

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.

  • helm-release.yaml
  • helm.yaml
  • release.yaml
  • stale.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 contents access.
  • 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.

Comment thread .github/workflows/create-chart-update-pr.yaml
Comment thread .github/workflows/stale.yaml
Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
@toshipp
toshipp merged commit 2b68fa8 into main Jun 8, 2026
8 of 9 checks passed
@toshipp
toshipp deleted the ci/add-permissions branch June 8, 2026 08:16
@ushitora-anqou ushitora-anqou mentioned this pull request Jun 9, 2026
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.

4 participants