Skip to content

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

Merged
CrazyBoy49z merged 1 commit intomainfrom
alert-autofix-2
May 30, 2025
Merged

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

Conversation

@CrazyBoy49z
Copy link
Copy Markdown
Member

Potential fix for https://github.com/step2dev/lazy-admin/security/code-scanning/2

To fix the issue, add a permissions block at the root level of the workflow file. This block will explicitly define the permissions required for the workflow. Since the workflow primarily involves checking out code, setting up PHP, installing dependencies, and running tests, it only requires contents: read permissions. This change ensures that the workflow adheres to the principle of least privilege and avoids unnecessary write access.

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>
@CrazyBoy49z CrazyBoy49z marked this pull request as ready for review May 30, 2025 10:15
@CrazyBoy49z CrazyBoy49z merged commit edf9908 into main May 30, 2025
11 checks passed
@CrazyBoy49z CrazyBoy49z deleted the alert-autofix-2 branch May 30, 2025 10:15
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