Skip to content

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

Merged
SebastianLopezO merged 1 commit intomainfrom
alert-autofix-1
Jul 8, 2025
Merged

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

Conversation

@SebastianLopezO
Copy link
Member

Potential fix for https://github.com/SmartPotTech/SmartPot-IoT/security/code-scanning/1

To fix the issue, add a permissions block at the root of the workflow file. This block will apply to all jobs in the workflow unless overridden by a job-specific permissions block. Since the workflow only requires read access to the repository contents, the permissions block should specify contents: read. This change ensures that the workflow adheres to the principle of least privilege.


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>
@SebastianLopezO SebastianLopezO marked this pull request as ready for review July 3, 2025 14:56
@SebastianLopezO SebastianLopezO merged commit 5c8feac into main Jul 8, 2025
3 of 6 checks passed
@SebastianLopezO SebastianLopezO deleted the alert-autofix-1 branch July 8, 2025 04:10
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