Refactor workflow permissions to remove 'read-all' and standardize to…#201
Merged
frasermolyneux merged 1 commit intomainfrom Feb 7, 2026
Merged
Refactor workflow permissions to remove 'read-all' and standardize to…#201frasermolyneux merged 1 commit intomainfrom
frasermolyneux merged 1 commit intomainfrom
Conversation
… empty permissions
There was a problem hiding this comment.
Pull request overview
Hardens GitHub Actions security by removing broad default GITHUB_TOKEN permissions at the workflow level and relying on explicit, least-privilege job permissions; also adjusts Dependabot auto-merge behavior.
Changes:
- Replaced workflow-level
permissions: read-allwithpermissions: {}across all workflows. - Added
id-token: writeto the secure scanning job incodequality.ymlto support OIDC. - Updated Dependabot auto-merge to use squash merges (
gh pr merge --squash).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/build-and-test.yml | Removes broad workflow-level permissions; relies on job-scoped permissions. |
| .github/workflows/pr-verify.yml | Removes broad workflow-level permissions; relies on job-scoped permissions. |
| .github/workflows/codequality.yml | Removes broad workflow-level permissions; adds OIDC (id-token: write) for secure scanning job. |
| .github/workflows/copilot-setup-steps.yml | Removes broad workflow-level permissions; relies on job-scoped permissions. |
| .github/workflows/dependabot-automerge.yml | Removes broad workflow-level permissions; switches Dependabot auto-merge to squash strategy. |
| .github/workflows/release-version-and-tag.yml | Removes broad workflow-level permissions; keeps explicit job-level permissions for tagging. |
| .github/workflows/release-publish-nuget.yml | Removes broad workflow-level permissions; keeps explicit job-level permissions for publishing and releases. |
|
This was referenced Feb 20, 2026
Closed
Closed
This was referenced Mar 1, 2026
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.



This pull request updates several GitHub Actions workflow files to improve security and workflow behavior. The main changes involve tightening workflow permissions by replacing the broad
read-allpermission with empty or more restrictive permission sets, and adjusting the Dependabot auto-merge strategy.Workflow permissions hardening:
Replaced
permissions: read-allwithpermissions: {}in multiple workflow files to minimize default permissions and adhere to the principle of least privilege. This affects.github/workflows/build-and-test.yml,.github/workflows/codequality.yml,.github/workflows/copilot-setup-steps.yml,.github/workflows/dependabot-automerge.yml,.github/workflows/pr-verify.yml,.github/workflows/release-publish-nuget.yml, and.github/workflows/release-version-and-tag.yml. [1] [2] [3] [4] [5] [6] [7]In
.github/workflows/codequality.yml, addedid-token: writeto thepermissionsfor the secure scanning job, enabling OIDC authentication for improved security in the scanning process.Dependabot workflow update:
gh pr mergecommand to use--squashinstead of--merge, ensuring a cleaner commit history for automated dependency updates.