Skip to content

TPT-3778: Add explicit GitHub Actions permissions - #233

Merged
zliang-akamai merged 1 commit into
linode:mainfrom
zliang-akamai:fix/workflow-permissions
Jul 31, 2026
Merged

TPT-3778: Add explicit GitHub Actions permissions#233
zliang-akamai merged 1 commit into
linode:mainfrom
zliang-akamai:fix/workflow-permissions

Conversation

@zliang-akamai

@zliang-akamai zliang-akamai commented Jul 21, 2026

Copy link
Copy Markdown
Member

📝 Description

Add explicit least-privilege GITHUB_TOKEN permissions to the build, labeler, and release workflows.

This addresses code scanning alerts 1 through 4 for actions/missing-workflow-permissions. Read-only CI receives contents: read, label synchronization receives contents: read and issues: write, and GoReleaser receives contents: write to publish release assets.

@zliang-akamai
zliang-akamai requested review from a team as code owners July 21, 2026 22:00
@zliang-akamai
zliang-akamai requested review from psnoch-akamai and yec-akamai and removed request for a team July 21, 2026 22:00
@zliang-akamai zliang-akamai changed the title Add explicit GitHub Actions permissions TPT-3778: Add explicit GitHub Actions permissions Jul 21, 2026
@zliang-akamai
zliang-akamai requested a review from Copilot July 21, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds explicit, least-privilege GITHUB_TOKEN permissions to the repository’s GitHub Actions workflows to satisfy actions/missing-workflow-permissions code scanning alerts and reduce default token scope.

Changes:

  • Set permissions: contents: read for the build/test CI workflow.
  • Set permissions: contents: read and issues: write for the label synchronization workflow.
  • Set permissions: contents: write for the GoReleaser workflow that publishes release assets.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/build-test.yml Restricts CI token to read-only repository contents.
.github/workflows/labeler.yml Grants minimal rights needed to sync labels (issues: write) plus read access to repo contents.
.github/workflows/release.yml Grants contents: write required for release publication/upload steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zliang-akamai
zliang-akamai merged commit d6ef629 into linode:main Jul 31, 2026
7 of 8 checks passed
@zliang-akamai
zliang-akamai deleted the fix/workflow-permissions branch July 31, 2026 19:03
@zliang-akamai zliang-akamai added the repo-ci-improvement for improvements in the repository or CI workflow in the changelog. label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repo-ci-improvement for improvements in the repository or CI workflow in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants