ci: fix Lint workflow broken since #1091 - #1116
Open
msarkor718 wants to merge 1 commit into
Open
Conversation
msarkor718
force-pushed
the
ci/fix-lint-check-permissions
branch
from
July 30, 2026 19:37
233894a to
c8033ce
Compare
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.
Summary
The Lint workflow has been failing on every run since #1091 merged on 2026-04-30, including on
pushtomain. This restores it without giving back the write capability that #1091 correctly removed.Two changes:
checks: writeadded to thepermissionsblock.github_tokenrestored as an input towearerequired/lint-action.Why it broke
lint-actioncreates a GitHub check run through the API on every invocation — not only whenauto_fixis enabled. #1091 removedgithub_tokenon the reasonable assumption thatauto_fix: falsemade it unnecessary, so that API call now runs unauthenticated:The job then exits non-zero regardless of whether Prettier found anything.
Why this is still hardened
The commit-injection path #1091 closed stays closed, by three independent mechanisms:
contents: read— the token cannot push, so there is no commit path even with a token present.--ignore-scripts— dependency lifecycle scripts do not execute, so a poisoned dependency has no way to run and reach the token.auto_fix: false— the action does not attempt to push.checks: writegrants only the ability to create check runs.Verification
This configuration is confirmed working in Uniswap/v3-periphery#472, where the identical change took the job from the 401 above to a passing
Run lintersand a successfulPrettiercheck run — the exact API call that was failing.🤖 Generated with Claude Code