Skip to content

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

Merged
sinwe merged 1 commit into
mainfrom
alert-autofix-1
Aug 21, 2026
Merged

sinwe merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@sinwe

@sinwe sinwe commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/sinwe/update-detector/security/code-scanning/1

Add an explicit permissions block at the workflow root in .github/workflows/ci.yml, just below the trigger (on) and before jobs.
For this workflow, the least-privilege setting is:

  • contents: read

This preserves current functionality (actions/checkout can read code; build/test steps need no write scopes) while ensuring the token cannot write if repository/org defaults change.

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>
@sinwe
sinwe marked this pull request as ready for review August 21, 2026 10:53
@sinwe
sinwe merged commit b02b125 into main Aug 21, 2026
8 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