Skip to content

Comments

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

Merged
dan-rosenbrock merged 1 commit intomainfrom
alert-autofix-7
Jun 23, 2025
Merged

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

Conversation

@shivam-sood89
Copy link
Collaborator

Potential fix for https://github.com/seequent/return-dispatch/security/code-scanning/7

To fix the issue, we need to add an explicit permissions block to the workflow. This block should limit the GITHUB_TOKEN permissions to the minimum required for the jobs. Based on the workflow's operations, the contents: read permission is sufficient for most steps, and no write permissions are needed.

The permissions block can be added at the root level of the workflow to apply to all jobs, or it can be added individually to each job. In this case, adding it at the root level is more efficient since all jobs appear to require the same minimal permissions.

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>
@shivam-sood89 shivam-sood89 marked this pull request as ready for review June 23, 2025 15:24
@dan-rosenbrock dan-rosenbrock merged commit 8a4443e into main Jun 23, 2025
7 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.

2 participants