gateway: emit zizmor unpinned-tools ignore off the uses: line (closes #952)#1034
Open
potiuk wants to merge 1 commit into
Open
gateway: emit zizmor unpinned-tools ignore off the uses: line (closes #952)#1034potiuk wants to merge 1 commit into
potiuk wants to merge 1 commit into
Conversation
…952) Dependabot's github_actions comment-updater only rewrites a version comment when the version is the trailing token of the comment; if any text follows (file_updater.rb: `comment.end_with?(version)`), it skips the update for safety. The gateway emitted the sentinel step's zizmor ignore right after the version on the uses: line: - uses: 1Password/load-secrets-action@<sha> # v4.0.0 # zizmor: ignore[unpinned-tools] ... so Dependabot bumped the hash but left the version stale, and zizmor's ref-version-mismatch (medium) then failed CI (had to be fixed by hand in #932). Emit the ignore on the `if: false` line instead -- still within the sentinel step's finding span (https://docs.zizmor.sh/usage/#ignoring-results), so unpinned-tools stays suppressed -- leaving the version tag as the trailing token of the uses: comment so Dependabot keeps it in sync. The composite is regenerated accordingly; the composite->actions.yml read-back is unchanged and round-trips cleanly. Generated-by: Claude Opus 4.8 (1M context) via Claude Code
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.
Fixes #952.
Problem
Dependabot's
github_actionscomment-updater only rewrites a# vX.Y.Zcomment when the version is the trailing token --file_updater.rbdeliberately skips comments with text after the version (comment.end_with?(version)). The gateway emitted the sentinel step's zizmor ignore right after the version on theuses:line:so on a bump Dependabot updated the hash but left
# v4.0.0stale, and zizmor'sref-version-mismatch(medium) then failed CI -- fixed by hand in #932 and set to recur on every future bump of an ignored action.Fix
Emit the ignore on the
if: falseline instead:It's still within the sentinel step's finding span (zizmor docs), so
unpinned-toolsstays suppressed, while the version tag is now the trailing token on theuses:line, so Dependabot keeps it in sync.gateway.py: build theuses:comment from the tag only; append the ignore to theif: falseline..github/actions/for-dependabot-triggered-reviews/action.yml(2-line diff).test_gateway.py: assert the new placement and that the ignore never lands on theuses:line.gateway/allowlist-checktests pass, prek clean, zizmor clean on the composite, and the composite ->actions.ymlread-back round-trips with no diff.🤖 Generated with Claude Code