fix: resync ci_dependabot_automerge.yml with canonical template - #21
Merged
Conversation
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
There was a problem hiding this comment.
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_TOKENpermissions 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.
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.
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
github.event.pull_request.user.login), notgithub.actor— the old check silently no-op'd onreopenedor any human push to the branch.GITHUB_TOKENdrops to read-only; every write already goes throughDEPENDABOT_AUTOMERGE_TOKEN.Verification
Diffed byte-identical against
vln-devsecops/guidance@main, and verified with guidance'stests/automerge_gate_test.sh— 11/11 passing against this repo's copy.Token state
DEPENDABOT_AUTOMERGE_TOKENis provisioned here, so auto-merge is live and these changes take effect on merge.Closes #20