Skip to content

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

Merged
chotchki merged 1 commit intomainfrom
alert-autofix-1
Sep 6, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#1
chotchki merged 1 commit intomainfrom
alert-autofix-1

Conversation

@chotchki
Copy link
Copy Markdown
Owner

@chotchki chotchki commented Sep 6, 2025

Potential fix for https://github.com/chotchki/tray-wrapper/security/code-scanning/1

To fix this issue, explicitly add a permissions block to the workflow configuration. This can be at the root level (applies to all jobs by default), or (redundantly) within each job. The best practice is to specify this at the workflow level, above the jobs: block. Since none of the steps writes to repository resources, the minimal required permission is contents: read. Add the following block after the workflow name and before the on: or after the on: block (either placement is accepted, but immediately after on: is more common and is shown in GitHub's own docs).

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>
@chotchki chotchki marked this pull request as ready for review September 6, 2025 20:03
@chotchki chotchki merged commit f143c57 into main Sep 6, 2025
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