Repository navigation
ci: allow trusted Dependabot branches through issue policy - #493
codeforester wants to merge 1 commit into
Conversation
| # Dependabot bot, and only when its branch lives in this repository; | ||
| # all human- or fork-owned branches still require the canonical | ||
| # issue-backed format below. | ||
| if [[ "$author_login" == "dependabot[bot]" && |
There was a problem hiding this comment.
Security (real gap): the Dependabot bypass trusts .user.login (the PR's original opener, fixed for the PR's lifetime) instead of verifying the current head commit was actually produced by Dependabot — it authenticates the PR, not the commit. A Dependabot PR is opened (author_login=dependabot[bot], same-repo, dependabot/* branch name) and passes this check; if any repo collaborator with push access later pushes an arbitrary commit onto that same branch, the synchronize event re-runs this function with the new head SHA, but author_login/head_repo_full_name/the branch-name prefix are all unchanged, so it still returns success — completely bypassing the category/calendar-date/issue-existence checks enforced for every other branch, for content Dependabot never produced.
| # Dependabot bot, and only when its branch lives in this repository; | ||
| # all human- or fork-owned branches still require the canonical | ||
| # issue-backed format below. | ||
| if [[ "$author_login" == "dependabot[bot]" && |
There was a problem hiding this comment.
Test gap: no automated test exercises this new Dependabot-bypass branch. tests/validate.sh only checks that the workflow file exists, not that its logic behaves correctly — a later refactor that weakens the author_login/head_repo_full_name/branch_name triple check (e.g. to just branch_name == dependabot/*) would ship without any test catching the widened trust gap.
Summary
dependabot[bot]Why
The required
base/issue-branch-policycheck currently rejects every open Dependabot update because generateddependabot/*branches cannot encode an issue number. This blocks routine dependency and action updates even when all functional checks pass.This is a narrow prerequisite for the v1.0 security/dependency stabilization work tracked by #490. It does not relax the policy for human branches or fork-owned branches.
Validation
git diff --checkpassesRelates to #490.