Skip to content

fix: scope php-lint workflow token to read-only contents access - #15

Merged
zaccesss merged 1 commit into
mainfrom
fix/php-lint-workflow-permissions
Aug 5, 2026
Merged

fix: scope php-lint workflow token to read-only contents access#15
zaccesss merged 1 commit into
mainfrom
fix/php-lint-workflow-permissions

Conversation

@zaccesss

@zaccesss zaccesss commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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.

@zaccesss zaccesss added security Security relevant chore Housekeeping autoclose Close this issue when a PR that references it merges labels Aug 5, 2026
@zaccesss zaccesss added the autoclose Close this issue when a PR that references it merges label Aug 5, 2026

@zaccesss zaccesss left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zaccesss
zaccesss merged commit aeea86c into main Aug 5, 2026
3 checks passed
@zaccesss
zaccesss deleted the fix/php-lint-workflow-permissions branch August 5, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autoclose Close this issue when a PR that references it merges chore Housekeeping security Security relevant

Development

Successfully merging this pull request may close these issues.

actions/missing-workflow-permissions: php-lint.yml has no explicit permissions block

1 participant