Skip to content

ci: add explicit GITHUB_TOKEN permissions (CodeQL alert #2) - #1

Merged
slepp merged 3 commits into
mainfrom
copilot/fix-code-scanning-alerts
Aug 3, 2026
Merged

ci: add explicit GITHUB_TOKEN permissions (CodeQL alert #2)#1
slepp merged 3 commits into
mainfrom
copilot/fix-code-scanning-alerts

Conversation

Copilot AI commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Workflows without explicit permissions inherit repository/org defaults, which may be read-write — violating least privilege. Adds a top-level permissions block to restrict the GITHUB_TOKEN to the minimum actually required.

Changes

  • .github/workflows/ci.yml: add permissions: contents: read at workflow root; applies to both test and msrv jobs, neither of which needs write access
permissions:
  contents: read

Copilot AI requested review from Copilot and removed request for Copilot August 3, 2026 04:44
Copilot AI requested review from Copilot and removed request for Copilot August 3, 2026 04:45
Copilot AI changed the title [WIP] Fix code scanning alerts flagged in the repository ci: add explicit GITHUB_TOKEN permissions (CodeQL alert #2) Aug 3, 2026
Copilot AI requested a review from slepp August 3, 2026 04:46
@slepp
slepp marked this pull request as ready for review August 3, 2026 04:49
Copilot AI review requested due to automatic review settings August 3, 2026 04:49

Copilot AI left a comment

Copy link
Copy Markdown

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 tightens CI workflow security by adding an explicit top-level permissions block so GITHUB_TOKEN does not inherit potentially broader org/repo defaults.

Changes:

  • Added workflow-level permissions to restrict GITHUB_TOKEN (currently contents: read) for the CI workflow.

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

Comment thread .github/workflows/ci.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@slepp
slepp merged commit 73cf691 into main Aug 3, 2026
5 checks passed
@slepp
slepp deleted the copilot/fix-code-scanning-alerts branch August 3, 2026 04:59
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.

3 participants