Skip to content

Conversation

@Stieneee
Copy link
Owner

Potential fix for https://github.com/Stieneee/simple-zstd/security/code-scanning/1

The best way to fix this is to add a permissions block, explicitly setting the least privilege required. Since the jobs here only check out the code, build, and test, they do not require write permissions—only contents: read is needed. This block can be added either at the workflow root (to apply to all jobs) or inside each job. The most minimal and robust change is to add the following to the top of the workflow file, after name: and before on::

permissions:
  contents: read

Only the .github/workflows/ci.yml file needs to be changed, and no extra imports, dependencies, or methods are required.


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.

2 participants