Skip to content

Comments

Potential fix for code scanning alert no. 12: Workflow does not contain permissions#1638

Merged
kevinherron merged 1 commit into1.0from
alert-autofix-12
Nov 3, 2025
Merged

Potential fix for code scanning alert no. 12: Workflow does not contain permissions#1638
kevinherron merged 1 commit into1.0from
alert-autofix-12

Conversation

@kevinherron
Copy link
Contributor

Potential fix for https://github.com/eclipse-milo/milo/security/code-scanning/12

The fix is to add a permissions block specifying the least privilege necessary for this workflow. The minimal required permission for most workflows unrelated to repository modifications is contents: read. This restricts the GITHUB_TOKEN to only be able to read repository contents, mitigating the risk of tokens being abused to manipulate code, issues, or PRs.
Place the following block at the top of the workflow file, just after the name line and before the on: block for clarity and to apply to all jobs in the workflow (global setting). No further permissions (for issues, deployments, etc.) appear necessary from the steps shown.


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>
@kevinherron kevinherron marked this pull request as ready for review November 3, 2025 13:19
@kevinherron kevinherron merged commit f2d89ef into 1.0 Nov 3, 2025
6 of 7 checks passed
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.

1 participant