Repository navigation
Move dependabot-auto-merge off pull_request_target - #3110
Jesse Hills (jesserockz) wants to merge 4 commits into
Conversation
Dependabot runs on pull_request respect the workflow's permissions block, so auto-merge keeps working without the privileged trigger.
Merging this PR will not alter performance
Comparing Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3110 +/- ##
===========================================
+ Coverage 99.77% 100.00% +0.22%
===========================================
Files 305 305
Lines 27006 27006
===========================================
+ Hits 26945 27006 +61
+ Misses 61 0 -61
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The workflow executes PR-proposed action code with a write-capable token before review or required checks, allowing a compromised release to modify repository contents or PRs.
1 open issue
What changed in this PR
Moves the repository’s Dependabot auto-merge workflow from pull_request_target to pull_request, ahead of the GitHub restriction described in #3083.
Changes:
- Switches the workflow trigger to
pull_request. - Requires the triggering actor to be
dependabot[bot], alongside existing PR-author and repository checks. - Adds comments explaining the retained write permissions.
| File | Description |
|---|---|
.github/workflows/dependabot-auto-merge.yml |
Changes the trigger, tightens the job guard, and documents token permissions. |
Review effort: Max (adaptive)
The metadata job runs the PR-proposed fetch-metadata action with a read-only token; the write-scoped job runs only gh pr merge.
There was a problem hiding this comment.
🟡 Changes recommended
The auto-merge workflow trusts metadata from the proposed dependabot/fetch-metadata version, allowing a compromised or broken major update to classify itself as a patch and bypass the major-update gate.
1 open issue
1 resolved since last review
Review effort: Max (adaptive)
The proposed fetch-metadata version would otherwise classify its own update.
Replaces dependabot/fetch-metadata with a stdlib script fetched from the default branch, so the workflow runs no action a bump could propose.


What does this implement/fix?
Moves
dependabot-auto-merge.ymlfrompull_request_targetto plainpull_request, ahead of GitHub blockingpull_request_targetby default in public repos from 2026-12-02.On
pull_requestthe workflow is loaded from the PR merge commit, so it no longer runs any action a bump could propose:dependabot/fetch-metadatais replaced byscript/dependabot_update_type.py, a stdlib script fetched from the default branch.classifyjob runs it overgh pr diffand reportsmajor,minor,patchorunknown.auto-mergejob holds the write grants, runs onlygh pr merge --auto --squash, and only forminororpatch.permissionsis{}.Other notes:
pull_requestruns get a read-onlyGITHUB_TOKENunlesspermissions:raises it, so the job-level grants keep auto-merge working. No other secrets are used.github.actor == 'dependabot[bot]', so a run triggered by a human pushing to a Dependabot branch is skipped.main(notarget-branchindependabot.yml), so the workflow file comes frommainonce this merges.Related issue or feature (if applicable):
dependabot-auto-merge.ymloffpull_request_target#3083Types of changes
bugfixnew-featureenhancementbreaking-changerefactordocsmaintenancecidependenciesFrontend coordination
Checklist
ruff,codespell, yaml/json/python checks).tests/where applicable.components.index.json/definitions/components/*.jsonhave not been hand-edited (regenerate viascript/sync_components.pyif a sync is needed).docs/ARCHITECTURE.mdand/ordocs/API.md.