Skip to content

Conversation

@djbender
Copy link
Owner

Potential fix for https://github.com/djbender/lizard-ruby/security/code-scanning/1

To fix the problem, we should add a permissions: block at the top-level of the workflow file (.github/workflows/ci.yml), just after the name: and before the on: block. This applies minimal permissions to all jobs unless overridden. For CI tasks such as running tests and lints, only read access for repository contents is necessary, so we add:

permissions:
  contents: read

No steps in the provided jobs require write access to GitHub resources. This change restricts the GitHub token to read-only for contents, following least privilege principles. The edit should be performed in .github/workflows/ci.yml by inserting the permissions: block as described.


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

@djbender djbender marked this pull request as ready for review October 30, 2025 19:09
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@djbender djbender merged commit ac1660b into main Oct 30, 2025
5 checks passed
@djbender djbender deleted the alert-autofix-1 branch October 30, 2025 19:34
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