Skip to content

Refactor workflow permissions for consistency across CI/CD files#199

Merged
frasermolyneux merged 4 commits intomainfrom
feature/workflow-permissions
Feb 7, 2026
Merged

Refactor workflow permissions for consistency across CI/CD files#199
frasermolyneux merged 4 commits intomainfrom
feature/workflow-permissions

Conversation

@frasermolyneux
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 5, 2026 20:19
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 pull request refactors GitHub Actions workflow files to move permissions declarations from the workflow level to the job level, following the principle of least privilege. This allows each job to have only the specific permissions it requires, improving security posture.

Changes:

  • Moved permissions blocks from workflow-level (top of file after on:) to job-level (under each job definition)
  • Applied this pattern consistently across 6 workflow files
  • No changes to permission scopes or values—only their location in the YAML structure

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/release-version-and-tag.yml Moved workflow-level contents: read to job-level; calculate-version and dotnet-ci get contents: read, tag-release gets contents: write
.github/workflows/release-publish-nuget.yml Moved workflow-level contents: write and actions: read to job-level under publish-nuget-packages job
.github/workflows/pr-verify.yml Moved workflow-level contents: read to job-level under build-and-test job
.github/workflows/dependabot-automerge.yml Moved workflow-level contents: write and pull-requests: write to job-level under dependabot job
.github/workflows/codequality.yml Moved workflow-level permissions to job-level; also reordered dependency-review job properties (permissions now appear before if and runs-on)
.github/workflows/build-and-test.yml Moved workflow-level contents: read to job-level under build-and-test job

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

4 similar comments
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copilot AI review requested due to automatic review settings February 5, 2026 20:50
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

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 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.

2 participants