Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#110

Merged
SpringMT merged 1 commit intomainSpringMT/zstd-ruby:mainfrom
alert-autofix-10SpringMT/zstd-ruby:alert-autofix-10Copy head branch name to clipboard
Aug 1, 2025
Merged

Potential fix for code scanning alert no. 10: Workflow does not contain permissions#110
SpringMT merged 1 commit intomainSpringMT/zstd-ruby:mainfrom
alert-autofix-10SpringMT/zstd-ruby:alert-autofix-10Copy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.