Commit 11dacc3
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
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
0 commit comments