Skip to content

Add least-privilege permissions to build.yml workflow#392

Merged
dthaler merged 2 commits intomainfrom
copilot/add-permissions-to-workflows
Feb 21, 2026
Merged

Add least-privilege permissions to build.yml workflow#392
dthaler merged 2 commits intomainfrom
copilot/add-permissions-to-workflows

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

GitHub workflows without explicit permissions inherit the repository default, which may be write-all. The build.yml workflow was the only one missing an explicit permissions key.

Changes

  • build.yml: Added permissions: contents: read at the workflow root — the minimum required for checkout, build, test, and artifact upload (which uses an internal runtime token, not GITHUB_TOKEN)

The other workflows already had appropriate permissions (validate-yaml.yml: contents: read, release.yml: contents: write).

Original prompt

This section details on the original issue you should resolve

<issue_title>Add permissions to github workflows</issue_title>
<issue_description>Add the permissions key to the job or the root of workflow (in this case it is applied to all jobs in the workflow that do not have their own permissions key) and assign the least privileges required to complete the task.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dthaler <6547784+dthaler@users.noreply.github.com>
Copilot AI changed the title [WIP] Add permissions to GitHub workflows Add least-privilege permissions to build.yml workflow Feb 21, 2026
Copilot AI requested a review from dthaler February 21, 2026 00:48
@dthaler dthaler marked this pull request as ready for review February 21, 2026 00:55
@dthaler dthaler merged commit 03299c5 into main Feb 21, 2026
6 checks passed
@dthaler dthaler deleted the copilot/add-permissions-to-workflows branch February 21, 2026 00:58
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.

Add permissions to github workflows

2 participants