Skip to content

Commit 11dacc3

Browse files
chore: fix actions permission (#139)
Potential fix for [https://github.com/fuzzzerd/SharpFM/security/code-scanning/2](https://github.com/fuzzzerd/SharpFM/security/code-scanning/2) To fix the problem, add an explicit `permissions` block to the `release` job. This should specify the least set of privileges needed. For this workflow, the main requirements are: - Read access to repository contents (to check out/build). - Write access to releases, since the workflow uploads release assets via `softprops/action-gh-release@v2`. Add the following block as a child of the `release` job, above or below `runs-on` (but before `steps`): ```yaml permissions: contents: read releases: write ``` No changes to imports or methods are necessary; just add the specified block to the job configuration in `.github/workflows/release-artifacts.yml`, preferably before the `runs-on` key to match conventions. _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 bb6b842 commit 11dacc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/release-artifacts.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
jobs:
88
release:
99
name: Release
10+
permissions:
11+
contents: read
12+
releases: write
1013
strategy:
1114
matrix:
1215
kind: ['linux', 'windows', 'macOS']

0 commit comments

Comments
 (0)