Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions - #105

Merged
CornFlakesPC merged 1 commit into
masterfrom
alert-autofix-1
Jul 21, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#105
CornFlakesPC merged 1 commit into
masterfrom
alert-autofix-1

Conversation

@CornFlakesPC

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/CornFlakesPC/ASRockWiki/security/code-scanning/1

Add an explicit permissions block to .github/workflows/publish-gem.yml so the GITHUB_TOKEN is constrained to only what this workflow needs.

Best fix here (without changing workflow behavior) is to define permissions at the workflow root (applies to all jobs) right after the on trigger. Since this job checks out code and publishes to GitHub Packages, use:

  • contents: read (for actions/checkout)
  • packages: write (required to push gem to GitHub Packages)

This resolves the CodeQL finding and preserves existing functionality.

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>
@CornFlakesPC
CornFlakesPC marked this pull request as ready for review July 21, 2026 21:25
@CornFlakesPC
CornFlakesPC merged commit bb6e032 into master Jul 21, 2026
5 checks passed
@CornFlakesPC
CornFlakesPC deleted the alert-autofix-1 branch July 21, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant