Skip to content

Update workflow permissions to empty object for consistency#720

Merged
frasermolyneux merged 2 commits into
mainfrom
feature/workflow-updates
Feb 7, 2026
Merged

Update workflow permissions to empty object for consistency#720
frasermolyneux merged 2 commits into
mainfrom
feature/workflow-updates

Conversation

@frasermolyneux

Copy link
Copy Markdown
Owner

This pull request makes several improvements to the project's GitHub Actions workflows, primarily by tightening permissions and updating automation behavior. The main focus is on enhancing security by removing the broad read-all permission from all workflows and replacing it with more restrictive or explicit permissions. Additionally, there are minor updates to workflow steps and documentation.

Workflow permissions and security improvements:

  • Replaced the global permissions: read-all setting with permissions: {} in all workflow files, reducing the default permissions granted to GitHub Actions and following the principle of least privilege. (.github/workflows/build-and-test.yml [1] .github/workflows/codequality.yml [2] .github/workflows/copilot-setup-steps.yml [3] .github/workflows/dependabot-automerge.yml [4] .github/workflows/deploy-dev.yml [5] .github/workflows/deploy-prd.yml [6] .github/workflows/destroy-development.yml [7] .github/workflows/destroy-environment.yml [8] .github/workflows/integration-tests.yml [9] .github/workflows/pr-verify.yml [10] .github/workflows/release-publish-nuget.yml [11] .github/workflows/release-version-and-tag.yml [12] .github/workflows/update-dashboard-from-staging.yml [13]

  • In .github/workflows/codequality.yml, explicitly granted id-token: write permission to the devops-secure-scanning job, which is required for secure scanning workflows.

Workflow automation and behavior changes:

  • Updated the Dependabot auto-merge workflow to use the --squash merge strategy instead of --merge, ensuring merged PRs are squashed into a single commit. (.github/workflows/dependabot-automerge.yml .github/workflows/dependabot-automerge.ymlL25-R28)

Documentation updates:

  • Removed the DevOps Secure Scanning badge from the README.md to reflect workflow or visibility changes. (README.md README.mdL5)

Copilot AI review requested due to automatic review settings February 7, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown

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 tightens GitHub Actions security by removing broad default workflow permissions and requiring each job to explicitly request only the permissions it needs, alongside a small automation tweak and README badge update.

Changes:

  • Replaced workflow-level permissions: read-all with permissions: {} across workflows, relying on job-level permission grants.
  • Updated the Dependabot auto-merge workflow to use squash merges (gh pr merge --auto --squash).
  • Removed the DevOps Secure Scanning badge from README.md.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Removes the DevOps Secure Scanning badge from the workflows section.
.github/workflows/build-and-test.yml Switches workflow default permissions to {} while keeping job-scoped permissions.
.github/workflows/codequality.yml Switches workflow default permissions to {} and adds id-token: write for secure scanning job.
.github/workflows/copilot-setup-steps.yml Switches workflow default permissions to {} for least-privilege baseline.
.github/workflows/dependabot-automerge.yml Switches workflow default permissions to {} and changes Dependabot merge strategy to squash.
.github/workflows/deploy-dev.yml Switches workflow default permissions to {} while retaining job-scoped permissions for OIDC and repo access.
.github/workflows/deploy-prd.yml Switches workflow default permissions to {} while retaining job-scoped permissions for OIDC and repo access.
.github/workflows/destroy-development.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/destroy-environment.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/integration-tests.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/pr-verify.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/release-publish-nuget.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/release-version-and-tag.yml Switches workflow default permissions to {} while retaining job-scoped permissions.
.github/workflows/update-dashboard-from-staging.yml Switches workflow default permissions to {} while retaining job-scoped permissions.

Comment thread .github/workflows/dependabot-automerge.yml Outdated
Comment thread .github/workflows/dependabot-automerge.yml
@sonarqubecloud

sonarqubecloud Bot commented Feb 7, 2026

Copy link
Copy Markdown

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