Skip to content

Restrict build workflow GITHUB_TOKEN permissions - #2235

Merged
akurtakov merged 2 commits into
masterfrom
copilot/fix-code-scanning-alerts
Sep 23, 2026
Merged

akurtakov merged 2 commits into
masterfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

This change addresses the CodeQL workflow-permissions finding on the build pipeline. The build workflow did not declare explicit token scopes, so it inherited broader default GITHUB_TOKEN permissions than required.

  • What changed

    • Added an explicit top-level permissions block to .github/workflows/build.yml
    • Scoped the workflow token to the only access needed by this job: repository contents read access
  • Why this matters

    • Reduces ambient permissions for the build workflow
    • Aligns the workflow with GitHub Actions least-privilege guidance
    • Resolves the code scanning alert without changing job behavior
  • Resulting workflow shape

    permissions:
      contents: read

Co-authored-by: akurtakov <574788+akurtakov@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert #6 Restrict build workflow GITHUB_TOKEN permissions Sep 23, 2026
Copilot AI requested a review from akurtakov September 23, 2026 09:03
@akurtakov
akurtakov marked this pull request as ready for review September 23, 2026 09:11
@akurtakov
akurtakov merged commit e6f1cb1 into master Sep 23, 2026
12 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