Skip to content

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

Merged
mrkara merged 1 commit into
masterfrom
alert-autofix-1
Aug 18, 2025
Merged

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

Conversation

@mrkara

@mrkara mrkara commented Aug 18, 2025

Copy link
Copy Markdown
Member

Potential fix for https://github.com/make-software/cspr-design/security/code-scanning/1

To fix the problem, add a permissions block to the workflow to explicitly set the minimum required permissions for the GITHUB_TOKEN. Since the workflow only checks out code, installs dependencies, builds, and runs tests, it only needs read access to repository contents. The best way to do this is to add permissions: contents: read at the top level of the workflow file, just below the name field and before the on field. This will apply the permission restriction to all jobs in the workflow.


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>
@mrkara mrkara marked this pull request as ready for review August 18, 2025 15:49
@mrkara mrkara requested review from eugenebelov and ihor August 18, 2025 15:49
@mrkara mrkara merged commit 111547e into master Aug 18, 2025
5 checks passed
@mrkara mrkara deleted the alert-autofix-1 branch August 18, 2025 16:33
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