Skip to content

Comments

Potential fix for code scanning alert no. 5: Workflow does not contain permissions#1641

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

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

Conversation

@kevinherron
Copy link
Contributor

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

The fix is to explicitly restrict the permissions for the workflow to the minimal set required. The workflow runs Maven verification and checks out code, which only requires the workflow to read repository contents, not write. Thus, adding a permissions: block with contents: read at the root of the workflow is sufficient and adheres to the principle of least privilege. The most robust way is to insert a block like permissions: contents: read at the top-level, just below name: (line 2 or 3), before the on: block.


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>
@kevinherron kevinherron marked this pull request as ready for review November 3, 2025 13:19
@kevinherron kevinherron merged commit b4b751b 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