Skip to content

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#111

Merged
Cleboost merged 1 commit intomasterfrom
alert-autofix-4
Apr 10, 2026
Merged

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#111
Cleboost merged 1 commit intomasterfrom
alert-autofix-4

Conversation

@Cleboost
Copy link
Copy Markdown
Owner

@Cleboost Cleboost commented Apr 9, 2026

Potential fix for https://github.com/Cleboost/Rustmius/security/code-scanning/4

Add an explicit permissions block to the build job in .github/workflows/release.yml so it no longer relies on inherited defaults.

Best fix here (without changing behavior): define job-level permissions for build as:

  • contents: read (required for checkout)
  • actions: read (safe minimal explicit access for actions metadata)
  • id-token: none (explicitly deny if unused)

This keeps the job least-privileged and satisfies CodeQL’s requirement for explicit permission limits.

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses CodeQL code scanning alert #4 by making the build job in the release workflow explicitly least-privileged instead of relying on inherited/default GITHUB_TOKEN permissions.

Changes:

  • Add an explicit job-level permissions block to the build job.
  • Restrict build to contents: read, actions: read, and explicitly disable OIDC with id-token: none.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Cleboost Cleboost marked this pull request as ready for review April 10, 2026 17:13
@Cleboost Cleboost merged commit 6293af9 into master Apr 10, 2026
8 checks passed
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.

2 participants