Skip to content

Conversation

@arnested
Copy link
Owner

Potential fix for https://github.com/arnested/go-version-action/security/code-scanning/8

To fix the issue, set an explicit permissions block granting only the minimal required permissions to the GITHUB_TOKEN for this workflow. Since none of the shown workflow steps require write or elevated permissions (there are no steps for checking in code, opening issues, or modifying PRs), it is appropriate to add permissions: { contents: read } at the top-level of the workflow. This restricts the GITHUB_TOKEN to only have read access to repository contents for all jobs in this workflow, satisfying CodeQL and security best-practices. The permission block should be inserted after the name: Build and test line (i.e., as line 3). No other workflow, code, or method changes are necessary.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@arnested arnested marked this pull request as ready for review August 23, 2025 20:22
@arnested arnested merged commit 7d015e5 into main Aug 23, 2025
13 checks passed
@arnested arnested deleted the alert-autofix-8 branch August 23, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants