Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nnicora
Copy link
Contributor

@nnicora nnicora commented Jun 21, 2025

Potential fix for https://github.com/openkcm/api-sdk/security/code-scanning/1

To fix the issue, add a permissions block to the root of the workflow. This block will explicitly define the least privileges required for the workflow to function correctly. Based on the context, the workflow likely needs read access to repository contents and possibly write access to pull requests. If additional permissions are required, they can be added after further analysis of the workflow's functionality.

The permissions block should be added directly under the name key at the top of the workflow file. This ensures that the permissions apply to all jobs in the workflow unless overridden by job-specific permissions blocks.

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

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 21, 2025, 10:20 AM

Copy link

sonarqubecloud bot commented Jul 7, 2025

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