Standardize Dependabot auto-merge safeguards - #167
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| .github/scripts/dependabot-auto-merge.mjs | Implements fail-closed Dependabot provenance, file-scope, commit-history, and base-ancestry authorization. |
| .github/workflows/ci.yml | Authorizes Dependabot pull requests from trusted base content before checking out their heads. |
| .github/workflows/dependabot-auto-merge.yml | Gates write-capable auto-merge operations on successful trusted-base authorization. |
| ui/dependabot_auto_merge_test.js | Covers direct and Update-branch histories, reopened events, ancestry evidence, provenance, and ecosystem scope. |
| ui/dependabot_workflow_contract_test.js | Verifies workflow permissions, trusted checkout ordering, authoritative API dataflow, and write-job dependencies. |
Reviews (2): Last reviewed commit: "fix: verify Dependabot merge ancestry" | Re-trigger Greptile
Summary
Standardizes Dependabot auto-merge authorization around trusted base content and verified update history, so dependency PR heads are not executed before their provenance and scope are validated.
What Changed
Why
The previous policy duplicated static assumptions about allowed update shapes. Resolving policy from the checked-out base revision keeps authorization fail-closed when repository tooling changes while allowing Dependabot's legitimate lockfile-only and Update-branch flows.
Validation
npm run testonlyprek run --all-files(including actionlint)Review follow-up
dependabot[bot]author and a verifiedweb-flowcommitter, matching live GitHub payloads.BASE_SHAthrough their environment.