Skip to content

Fix for code scanning alert: Workflow does not contain permissions #163

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

Merged
merged 2 commits into from
Jun 7, 2025

Conversation

igor-vovk
Copy link
Owner

Potential fix for https://github.com/igor-vovk/connect-rpc-scala/security/code-scanning/4

To fix the issue, we need to add a permissions block to the conformance job. Since the job only checks out the repository and runs Docker commands, it does not require any write permissions. The minimal permissions required are contents: read. This change ensures that the GITHUB_TOKEN has the least privilege necessary to execute the job.


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>
@igor-vovk igor-vovk requested a review from Copilot June 6, 2025 03:15
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Addresses a security code scanning alert by restricting the GITHUB_TOKEN permissions for the conformance job to the minimum required scope (contents: read).

  • Adds a permissions block under the conformance job
  • Grants only contents: read to limit token privileges

@igor-vovk igor-vovk marked this pull request as ready for review June 7, 2025 08:44
@igor-vovk igor-vovk changed the title Potential fix for code scanning alert no. 4: Workflow does not contain permissions Fix for code scanning alert: Workflow does not contain permissions Jun 7, 2025
@igor-vovk igor-vovk merged commit b9ee7a0 into main Jun 7, 2025
8 checks passed
@igor-vovk igor-vovk deleted the alert-autofix-4 branch June 7, 2025 08:45
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