Skip to content

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

Merged
inimaz merged 1 commit into
masterfrom
alert-autofix-22
Jul 12, 2025
Merged

Potential fix for code scanning alert no. 22: Workflow does not contain permissions#897
inimaz merged 1 commit into
masterfrom
alert-autofix-22

Conversation

@SaboniAmine

Copy link
Copy Markdown
Member

Potential fix for https://github.com/mlco2/codecarbon/security/code-scanning/22

To fix the issue, we will add a permissions block to the root of the workflow file. This block will define the minimum required permissions for the GITHUB_TOKEN. Based on the workflow's tasks, the contents: read permission is sufficient for most jobs, as they primarily involve checking out code, installing dependencies, and running tests. If any job requires additional permissions (e.g., pull-requests: write), we will specify them at the job level.


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>
@SaboniAmine SaboniAmine requested a review from inimaz July 12, 2025 14:36
@inimaz inimaz marked this pull request as ready for review July 12, 2025 14:39
@inimaz inimaz merged commit 439f2ec into master Jul 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants