Skip to content

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

Merged
Dhruvacube merged 1 commit intomasterfrom
alert-autofix-18
Jun 15, 2025
Merged

Potential fix for code scanning alert no. 18: Workflow does not contain permissions#19
Dhruvacube merged 1 commit intomasterfrom
alert-autofix-18

Conversation

@Dhruvacube
Copy link
Copy Markdown
Member

Potential fix for https://github.com/Creatrix-Net/creatrix-net.github.io/security/code-scanning/18

To fix the issue, add a permissions block to the workflow. Since the workflow primarily interacts with repository contents and pushes Docker images, the permissions can be limited to contents: read. This ensures the workflow has only the necessary access to repository contents while preventing unintended write access.

The permissions block should be added at the root level of the workflow file to apply to all jobs. Alternatively, it can be added to the specific job (build) if different jobs require different permissions.

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>
Signed-off-by: Dhruva Shaw <dhruvashaw@gmail.com>
@Dhruvacube Dhruvacube marked this pull request as ready for review June 15, 2025 18:55
@Dhruvacube Dhruvacube merged commit 2ec258e into master Jun 15, 2025
6 checks passed
@Dhruvacube Dhruvacube deleted the alert-autofix-18 branch June 15, 2025 18:56
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