Skip to content

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

Open
stefanogermano wants to merge 1 commit into
masterfrom
alert-autofix-1
Open

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#20
stefanogermano wants to merge 1 commit into
masterfrom
alert-autofix-1

Conversation

@stefanogermano
Copy link
Copy Markdown
Member

Potential fix for https://github.com/KRR-Oxford/RSAComb/security/code-scanning/1

To fix the problem, add an explicit permissions block to the workflow. Since the workflow needs to commit changes to the repository, it requires contents: write permission. The best way to do this is to add the following block at the top level of the workflow (just after the name field), so it applies to all jobs unless overridden. No other permissions are required for this workflow, so only contents: write should be specified. This change does not affect the existing functionality but ensures the workflow follows 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>
@stefanogermano stefanogermano marked this pull request as ready for review August 12, 2025 12:43
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