Skip to content

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

Draft
boyan-velinov wants to merge 1 commit into
masterfrom
alert-autofix-2
Draft

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

Conversation

@boyan-velinov
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/cloudfoundry/multiapps-cli-plugin/security/code-scanning/2

Add an explicit permissions block to the workflow so GITHUB_TOKEN is least-privileged and documented.
Best fix without changing functionality: set workflow-level permissions to contents: read and pull-requests: read, since the script only lists PR commits and does not write anything.

Edit file .github/workflows/check-commit-message.yml, adding the permissions block after the on section (before jobs). No imports, methods, or dependencies are needed.

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>
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