Commit 0261696
Set read-only permissions for publish action (#58)
Potential fix for
[https://github.com/esphome-libs/micro-opus/security/code-scanning/1](https://github.com/esphome-libs/micro-opus/security/code-scanning/1)
Add an explicit `permissions` block to the `publish-platformio` job in
`.github/workflows/publish.yml`, scoped to the minimal permission
needed: `contents: read`.
Best single fix without changing functionality:
- Edit `.github/workflows/publish.yml`
- In job `publish-platformio` (right after `environment` is a clear
location), add:
- `permissions:`
- `contents: read`
This preserves current behavior while enforcing least privilege for
`GITHUB_TOKEN` in that job. No imports, methods, or additional
definitions are needed.
_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 18c22ea commit 0261696
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
| |||
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
0 commit comments