Skip to content

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

Merged
xdrew87 merged 1 commit into
mainfrom
alert-autofix-1
May 15, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#8
xdrew87 merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@xdrew87
Copy link
Copy Markdown
Owner

@xdrew87 xdrew87 commented May 15, 2026

Potential fix for https://github.com/xdrew87/wraith/security/code-scanning/1

To fix this, add an explicit permissions block to the workflow so the GITHUB_TOKEN is limited to least privilege.
Best fix without changing behavior: define workflow-level permissions with contents: read, since all shown steps only need repository read access (primarily for actions/checkout).

Change location:

  • File: .github/workflows/ci.yml
  • Insert directly under the on: trigger block (before jobs:), or near the top-level keys.
  • No new 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>
@xdrew87 xdrew87 marked this pull request as ready for review May 15, 2026 17:21
@xdrew87 xdrew87 merged commit 8acf5aa into main May 15, 2026
2 of 4 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.

1 participant