Skip to content

Conversation

@SebastianLopezO
Copy link
Member

Potential fix for https://github.com/SmartPotTech/SmartPot-API/security/code-scanning/12

To fix this issue, we need to add a permissions: block at the appropriate level in the workflow to restrict GITHUB_TOKEN permissions, ideally to the minimum required. Since the job appears to only need to read repository contents for code scanning, the minimal required permission is contents: read. The permissions block can be added either at the top level (applies to all jobs) or at the job level (just for the noir-security job). Since this workflow only has one job, either approach works, but adding at workflow root is simplest. This change should be placed before the jobs section on line 10, following the style in the correct usage samples. No imports or other definitions are required.

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>
@SebastianLopezO SebastianLopezO marked this pull request as ready for review November 15, 2025 03:56
@SebastianLopezO SebastianLopezO merged commit 134fa1c into main Nov 15, 2025
12 checks passed
@SebastianLopezO SebastianLopezO deleted the alert-autofix-12 branch November 15, 2025 04:03
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