Skip to content

chore: fix actions permission#140

Merged
fuzzzerd merged 1 commit intomasterfrom
fix-ci-permissions
Sep 25, 2025
Merged

chore: fix actions permission#140
fuzzzerd merged 1 commit intomasterfrom
fix-ci-permissions

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/fuzzzerd/SharpFM/security/code-scanning/1

To fix the workflow so it adheres to least privilege principles, you should add a permissions block to either the root of the workflow (to apply to all jobs), or directly under the release job (to apply only to that job). Since there is only one job in this workflow and no step requires special permissions, the best fix is to add permissions: contents: read just below the workflow name near the top of the file. This will restrict GITHUB_TOKEN for all steps, preventing accidental privilege escalation and aligning with GitHub recommended practices. No other lines need to change, and no imports or definitions are required.


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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@fuzzzerd fuzzzerd changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions chore: fix actions permission Sep 25, 2025
@fuzzzerd fuzzzerd marked this pull request as ready for review September 25, 2025 00:38
@fuzzzerd fuzzzerd merged commit f52e685 into master Sep 25, 2025
6 checks passed
@fuzzzerd fuzzzerd deleted the fix-ci-permissions branch September 25, 2025 00:39
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