Skip to content

Conversation

@bk2204
Copy link
Contributor

@bk2204 bk2204 commented Nov 21, 2025

We'd like to run GitHub Actions with the least possible permissions assigned to the token for security reasons. To make this possible, let's add a permissions block to each workflow that lacks one.

In addition, add the missing document header, since this is a best practice and yamllint warns about omitting it.

Fixes #151

This is a best practice and yamllint warns about omitting it.
We'd like to run GitHub Actions with the least possible permissions
assigned to the token for security reasons.  To make this possible,
let's add a permissions block to each workflow that lacks one.
@bk2204 bk2204 marked this pull request as ready for review November 21, 2025 18:57
@bk2204 bk2204 requested a review from a team as a code owner November 21, 2025 18:57
Copilot AI review requested due to automatic review settings November 21, 2025 18:57
Copilot finished reviewing on behalf of bk2204 November 21, 2025 18:58
Copy link

Copilot AI left a comment

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 enhances the security posture of GitHub Actions workflows by implementing the principle of least privilege through explicit permissions blocks. It also adds YAML document headers (---) as a best practice.

  • Added permissions: contents: read to test.yml and lint.yml workflows
  • Added YAML document headers (---) to all three workflow files for yamllint compliance

Reviewed changes

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

File Description
.github/workflows/test.yml Added YAML document header and read-only contents permission for test workflow
.github/workflows/release.yml Added YAML document header (permissions already existed)
.github/workflows/lint.yml Added YAML document header and read-only contents permission for linting workflow

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

@bk2204 bk2204 merged commit 846ee0b into master Nov 24, 2025
15 checks passed
@bk2204 bk2204 deleted the workflow-permissions branch November 24, 2025 14:13
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.

Please define actions workflow permissions

3 participants