Skip to content

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

Merged
bitkarrot merged 1 commit into
mainfrom
alert-autofix-1
Jan 25, 2026
Merged

bitkarrot merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@bitkarrot

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/bitkarrot/curator/security/code-scanning/1

To fix the problem, add a permissions block specifying the least privilege necessary for the workflow to function. Since this workflow only checks out code, installs dependencies, and runs tests, it does not need write permissions to the repository. Therefore, a block at the job level (inside the test: job) or at the root level (to apply to all jobs) with contents: read is sufficient. This change should be added above or within the job definition, in .github/workflows/test.yml. No imports or additional code changes are required; just a YAML configuration block added. The most direct fix is to add permissions: contents: read at the root level just below the name: or above 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>
@bitkarrot
bitkarrot marked this pull request as ready for review January 25, 2026 23:58
@bitkarrot
bitkarrot merged commit 454b061 into main Jan 25, 2026
3 of 5 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