Skip to content

Conversation

@myood
Copy link
Owner

@myood myood commented Oct 3, 2025

Potential fix for https://github.com/myood/willhook-rs/security/code-scanning/1

To fix this problem, we should explicitly declare a permissions block at either the workflow root (affecting all jobs) or at the job level (inside the build job). Since the workflow only checks out code and runs the build/test steps, it does not seem to require any write permission, so specifying the minimum required permissions (usually just contents: read) is appropriate. This change should be added either directly after the workflow name (line 2), or as a child property of the build job (after line 11), depending on whether this minimal permission is intended for all jobs should you add more in the future. In this case, adding it at the workflow root will be simplest and more robust, and only requires modification of .github/workflows/build.yml. No additional methods, imports or definitions are required—this is a configuration change to a YAML workflow file.


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>
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.

2 participants