Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Conversation

@WirelessLife
Copy link
Collaborator

Potential fix for https://github.com/microsoft/AcademicContent/security/code-scanning/5

To fix the problem, explicitly set the permissions block in the workflow file to restrict the GITHUB_TOKEN to the least privilege required. Since this workflow only runs a linter and does not need to write to the repository or interact with issues or pull requests, the minimal required permission is contents: read. This can be set at the workflow level (applies to all jobs) or at the job level. The best practice is to add the following at the top level of the workflow file, just after the name field and before on, to ensure all jobs inherit these minimal permissions.


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

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@WirelessLife WirelessLife marked this pull request as ready for review August 20, 2025 18:53
@WirelessLife WirelessLife merged commit 2bec55f into main Aug 20, 2025
8 checks passed
@WirelessLife WirelessLife deleted the alert-autofix-5 branch August 20, 2025 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants