Skip to content

fix: resync ci_dependabot_automerge.yml with canonical template - #21

Merged
blytkerchan merged 1 commit into
masterfrom
resync-dependabot-automerge-gate
Aug 4, 2026
Merged

fix: resync ci_dependabot_automerge.yml with canonical template#21
blytkerchan merged 1 commit into
masterfrom
resync-dependabot-automerge-gate

Conversation

@blytkerchan

Copy link
Copy Markdown
Member

Why

This repo carries a verbatim copy of the canonical auto-merge template. It had drifted from vln-devsecops/guidance@main (guidance#15 and guidance#16), so this resyncs it to byte-identical.

What changed

  • Trigger on the PR author (github.event.pull_request.user.login), not github.actor — the old check silently no-op'd on reopened or any human push to the branch.
  • Refuse to merge PRs carrying non-Dependabot commits (explicit authorship check).
  • Fail closed when no sibling check ever appears, instead of merging unguarded.
  • Re-check the PR head SHA before enabling auto-merge, closing a race where a Dependabot push mid-poll could get an unchecked commit merged.
  • GITHUB_TOKEN drops to read-only; every write already goes through DEPENDABOT_AUTOMERGE_TOKEN.

Verification

Diffed byte-identical against vln-devsecops/guidance@main, and verified with guidance's tests/automerge_gate_test.sh — 11/11 passing against this repo's copy.

Token state

DEPENDABOT_AUTOMERGE_TOKEN is provisioned here, so auto-merge is live and these changes take effect on merge.

Closes #20

Byte-identical to vln-devsecops/guidance@main. Picks up the gate
hardening from guidance#15 and guidance#16: PR-author trigger
instead of github.actor, refusal of PRs carrying non-Dependabot
commits, fail-closed when no sibling check ever appears, a
head-SHA re-check before enabling auto-merge, and read-only
GITHUB_TOKEN.

Verified with guidance's tests/automerge_gate_test.sh (11/11).

Closes #20
Copilot AI lite review requested due to automatic review settings August 4, 2026 17:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Resyncs this repository’s Dependabot auto-merge GitHub Actions workflow to the canonical vln-devsecops/guidance@main template, tightening correctness and security for pull_request_target-based automerge.

Changes:

  • Switch gating to the PR author (github.event.pull_request.user.login) and add an explicit commit-authorship check to ensure only Dependabot-authored commits are eligible.
  • Fail closed when no sibling checks appear, and re-validate the PR head SHA before enabling auto-merge to avoid race conditions.
  • Reduce GITHUB_TOKEN permissions to read-only and clean up the “automerge disabled” notice formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@blytkerchan
blytkerchan merged commit 8a6648a into master Aug 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resync ci_dependabot_automerge.yml with the canonical template (guidance#15)

2 participants