fix(ci): close review-flagged gaps in dependabot-auto-merge.yml - #47
Merged
smartwatermelon merged 4 commits intoAug 4, 2026
Merged
Conversation
added 4 commits
August 3, 2026 20:03
…rop script - Fail closed when dependency-names parses to nothing but a non-empty string (e.g. all-whitespace/comma input), instead of treating it as an implicitly trusted empty remainder (#41). - Switch the job's bot-actor gate to github.event.pull_request.user.login, since github.actor is spoofable on pull_request_target (last committer, not PR author); document the resulting synchronize-trigger tradeoff instead of hiding it (#40). - Drop the now-fully-inert `gh pr review --approve` step: no repo in the fleet requires an approving review, confirmed by the dev-env#21 audit. - SHA-pin dependabot/fetch-metadata and suppress the intentional pull_request_target trigger finding, both caught by zizmor's pre-commit hook while preparing this change. - Reset clone-err.log per repo instead of leaving stale content from a prior repo's failed clone (#38). - Hoist commit-msg/PR-body template writes out of the per-repo loop in drop-noop-approve-step.sh; they never varied by iteration (#37). - Add retry-noop-approve-zizmor-fixes.sh, the follow-up script for the 20 fleet repos whose drop-noop-approve-step.sh run hit the same zizmor findings fixed here directly; dev-env is excluded from its repo list since this commit fixes it in place. Closes #41, #40, #38, #37. Claude-Session: https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE
…xes.sh Matches the #38 fix already applied to drop-noop-approve-step.sh; adversarial reviewer flagged the inconsistency on the prior commit. Claude-Session: https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE
- The comment claiming no pre-commit hook runs in scratch clones was wrong: core.hooksPath is machine-global, so it does fire (that's what caused the 20-repo zizmor failures this run's retry script exists to fix). Correct the comment to match reality. - The PR body claimed removing the approve step also removes pull-requests: write usage, but gh pr merge --auto requires that permission independently. Correct the claim. Closes #42, #43. Claude-Session: https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE
Every other failure path in this script echoes the captured detail inline; the gh pr create path silently dropped it, only writing it to the TSV log. Closes #44. Claude-Session: https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE
This was referenced Aug 4, 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.
Summary
Fixes the four auto-filed non-blocking review findings from PR #39's fleet remediation work, applied directly to this repo's
dependabot-auto-merge.ymlandscripts/drop-noop-approve-step.sh:DEP_NAMESis empty but omits the empty-check guard path #41 — major-bump path now fails closed whendependency-namesparses to an empty set from non-empty (whitespace/comma-only) input, instead of treating it as an implicitly-trusted empty remainder.github.event.pull_request.user.loginwidens who can trigger auto-merge on Dependabot PRs #40 — switches the job's bot-actor gate from the spoofablegithub.actortogithub.event.pull_request.user.login; documents the resultingsynchronize-trigger tradeoff rather than hiding it.clone-err.logis a shared, non-reset file — stale error content survives across repos on successful clones #38 — resetsclone-err.logper repo in both fleet scripts instead of leaving stale content from a prior repo's failed clone.commit_msg_fileandpr_body_fileare written inside the loop but to fixed paths — wasted writes per iteration #37 — hoists the commit-message/PR-body template writes out of the per-repo loop indrop-noop-approve-step.sh.Also, while fixing this file directly:
gh pr review --approvestep (dev-env#21 — no repo in the fleet requires an approving review).dependabot/fetch-metadataand suppresses the intentionalpull_request_targettrigger finding, both caught by the local zizmor pre-commit hook.scripts/retry-noop-approve-zizmor-fixes.sh, the follow-up script for the 20 fleet repos whose originaldrop-noop-approve-step.shrun hit the same zizmor findings —dev-envis excluded from its repo list since this PR fixes it in place.core.hooksPath— that's what caused the 20-repo zizmor failures) and a PR-body claim that removing the approve step also dropspull-requests: writeusage (it doesn't;gh pr merge --autoneeds it too) — closes Stale hook comment in drop-noop-approve-step.sh claims hooks don't run in scratch clones #42, PR body text claims removing the approve step eliminates pull-requests:write, but the permission is retained #43.gh pr createerror detail in terminal output, matching every other failure path in the script — closesgh pr createerror detail silently dropped in drop-noop-approve-step.sh #44.Two more non-blocking findings (#45, #46) were auto-filed during this branch's own push reviews. Left open for a follow-up pass rather than chased further here — diminishing returns on a docs/tooling-only branch.
Test plan
bash -nsyntax check on both shell scriptszizmorclean ondependabot-auto-merge.yml(was 3 findings, now 0)Closes #41, #40, #38, #37, #42, #43, #44.
https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE