Skip to content

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

Merged
coldhighsun merged 1 commit into
mainfrom
alert-autofix-1
Oct 15, 2026
Merged

coldhighsun merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/coldhighsun/AIUsageMonitor/security/code-scanning/1

Add an explicit permissions block to the build job in .github/workflows/ci.yml, setting least privilege needed for current behavior. The minimal safe setting here is:

  • contents: read

This preserves existing functionality (actions/checkout needs repository read access) while preventing implicit broader token permissions. Since release and finalize-release already define their own permissions, adding this to build is the smallest, most targeted fix and avoids changing behavior of other jobs.

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>
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coldhighsun
coldhighsun marked this pull request as ready for review October 15, 2026 01:50
@coldhighsun
coldhighsun merged commit 6eb28e8 into main Oct 15, 2026
8 checks passed
@coldhighsun
coldhighsun deleted the alert-autofix-1 branch October 15, 2026 01:51
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