fix: scope php-lint workflow token to read-only contents access - #15
Merged
Conversation
zaccesss
commented
Aug 5, 2026
zaccesss
left a comment
Owner
Author
There was a problem hiding this comment.
I check this against the CodeQL alert it closes. The change is a single-line addition, it scopes the workflow token to read-only contents access, which matches what the job actually does: checkout and a PHP syntax check, no writes anywhere. I confirm the diff is minimal and does not touch the job logic. GitHub does not let me approve my own pull request, so this is a review comment rather than a formal approval.
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #14
I add an explicit permissions: contents: read block to php-lint.yml. The job only checks out the repo and runs a PHP syntax check, it never writes back to the repository, so it does not need anything beyond read access to contents.