Skip to content

Commit f52e685

Browse files
chore: fix actions permission (#140)
Potential fix for [https://github.com/fuzzzerd/SharpFM/security/code-scanning/1](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>
1 parent 11dacc3 commit f52e685

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: CI Builds
2+
permissions:
3+
contents: read
24

35
on:
46
pull_request:

0 commit comments

Comments
 (0)