Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

j-baines
Copy link
Contributor

@j-baines j-baines commented Jun 9, 2025

Potential fix for https://github.com/vulncheck-oss/go-exploit/security/code-scanning/18

To fix the issue, we need to add a permissions block to the workflow. This block should specify the minimal permissions required for the workflow to function correctly. Based on the actions performed in the workflow, the following permissions are needed:

  • contents: write for committing changes to the repository.
  • pull-requests: write for creating pull requests.

The permissions block can be added at the root level of the workflow to apply to all jobs, or it can be added specifically to the build job. In this case, adding it at the root level is sufficient and ensures clarity.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@j-baines j-baines marked this pull request as ready for review June 9, 2025 10:54
@j-baines j-baines merged commit c9afb60 into main Jun 9, 2025
6 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