Skip to content

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

Merged
halbothpa merged 1 commit into
alert-autofix-3from
alert-autofix-2
May 19, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#4
halbothpa merged 1 commit into
alert-autofix-3from
alert-autofix-2

Conversation

@halbothpa
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/halbothpa/flipper-dev-toolkit/security/code-scanning/2

Add an explicit top-level permissions block in .github/workflows/ci.yml so all jobs inherit minimal token access.

Best fix (without changing functionality): insert

permissions:
  contents: read

directly after the on: triggers (before jobs:).
This satisfies CodeQL and keeps behavior intact for the shown jobs, which only need to read repository contents.

No imports, methods, or dependencies are needed.

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>
@halbothpa halbothpa changed the base branch from main to alert-autofix-3 May 19, 2026 22:12
@halbothpa halbothpa marked this pull request as ready for review May 19, 2026 22:12
Copilot AI review requested due to automatic review settings May 19, 2026 22:12
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

Adds a minimal top-level permissions block to the CI workflow to address a CodeQL alert about missing workflow permissions, granting only contents: read token access.

Changes:

  • Insert top-level permissions: contents: read between on: triggers and jobs: in .github/workflows/ci.yml.

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

@halbothpa halbothpa merged commit 87e2647 into alert-autofix-3 May 19, 2026
11 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