Skip to content

Conversation

@wforney
Copy link
Member

@wforney wforney commented Jun 14, 2025

Potential fix for https://github.com/improvgroup/sharedcode/security/code-scanning/45

To fix the issue, add a permissions block to the workflow. Since the workflow only runs tests and does not require write access, the permissions can be limited to contents: read. This block should be added at the root level of the workflow to apply to all jobs, as there is no indication that any job requires additional permissions.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@wforney wforney marked this pull request as ready for review June 14, 2025 09:18
@wforney wforney requested a review from Copilot June 14, 2025 09:18
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 addresses code scanning alert no. 45 by adding a global permissions block to the workflow to limit access to contents: read for improved security.

  • Added a permissions block at the root level of the workflow
  • Ensured the permissions apply globally for all jobs
Comments suppressed due to low confidence (1)

.github/workflows/dotnet.yml:3

  • The addition of the permissions block limits workflow permissions to read access, addressing the code scanning alert. Confirm that this global setting does not conflict with any job-specific configurations.
permissions:

@wforney wforney merged commit 6ece0c4 into main Jun 14, 2025
8 checks passed
@wforney wforney deleted the alert-autofix-45 branch June 14, 2025 09:37
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