Skip to content

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

Merged
N0tHorizon merged 1 commit into📦Currentfrom
alert-autofix-3
Sep 23, 2025
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#7
N0tHorizon merged 1 commit into📦Currentfrom
alert-autofix-3

Conversation

@N0tHorizon
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/N0tHorizon/WindowsTelemetryBlocker/security/code-scanning/3

To fix this issue, add an explicit permissions block to limit the GITHUB_TOKEN capabilities for the workflow. The minimal and recommended default is contents: read, which allows reads but denies writes to repository contents and other privileged actions. This permissions block can be added at the top "root" level of the workflow (affecting all jobs) or at the individual job level. Since this workflow's steps are informational and only need to read code and files, contents: read is sufficient. Insert the following directly after the name: line and before on: to define it globally for the workflow.

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>
@N0tHorizon N0tHorizon marked this pull request as ready for review September 23, 2025 19:21
@N0tHorizon N0tHorizon merged commit 23f9a43 into 📦Current Sep 23, 2025
5 checks passed
@N0tHorizon N0tHorizon deleted the alert-autofix-3 branch September 23, 2025 19:34
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