Skip to content

Conversation

SpringMT
Copy link
Owner

@SpringMT SpringMT commented Aug 1, 2025

Potential fix for https://github.com/SpringMT/zstd-ruby/security/code-scanning/10

To fix the problem, you should add a permissions block to the workflow to explicitly restrict the permissions granted to the GITHUB_TOKEN. The best way to do this is to add the block at the root level of the workflow file (above jobs:), so it applies to all jobs unless overridden. For this workflow, which only checks out code and runs tests/benchmarks, the minimal required permission is contents: read. This change should be made by inserting the following block after the name: field and before on::

permissions:
  contents: read

No additional imports, methods, or definitions are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@SpringMT SpringMT marked this pull request as ready for review August 1, 2025 06:59
@SpringMT SpringMT merged commit 2cf26b4 into main Aug 1, 2025
9 checks passed
@SpringMT SpringMT deleted the alert-autofix-10 branch August 1, 2025 07:01
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