Commit 26b79da
chore: Potential fix for code scanning alert no. 6: Workflow does not contain permissions (#122)
Potential fix for
[https://github.com/coze-dev/coze-java/security/code-scanning/6](https://github.com/coze-dev/coze-java/security/code-scanning/6)
To fix the problem, add an explicit `permissions` block set to the least
privilege at the job or workflow level.
- In general, this is best done at the top of the workflow for clarity
and maintainability.
- In this workflow, adding `permissions: contents: read` at the root
level ensures all jobs and steps only receive minimal access to
repository contents via the `GITHUB_TOKEN`.
- The block should be inserted between the workflow name and the `on:`
or after `on:`, before `jobs:`.
_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 ffd3528 commit 26b79da
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
0 commit comments