Repository navigation
Description
Summary (security, high priority)
When the hive supersedes an adopted fork PR, including the DCO re-home, it pushes the fork's commits to a hive-owned branch inside the base repository and opens a new PR from that branch. The new PR is a same-repository PR. GitHub and the repository's own workflows therefore treat it as trusted: secrets are available, pull_request workflows get write tokens, and fork-only guards do not fire.
The result is that fork code no maintainer has reviewed runs with the repository's trusted CI identity. That bypasses the controls a repository sets up specifically for fork PRs. The hive should never raise a change's trust level by moving it.
Evidence
All times below are 2026-10-25 UTC.
- import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#609, by
kylerankin, came from the forkkylerankin/utah-packages. Its requiredCanarycheck fails on fork PRs by design: "a fork pull request cannot publish the canary image…". The repository's maintainer path is a separate, maintainer-run workflow,.github/workflows/canary-fork-pr.yml, added in ci(canary): let a maintainer run Canary on a reviewed fork pull request (#369) projectbluefin/utah-packages#619. - 19:07Z: the hive adopted import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#609 in place (
reason=grace-elapsed). - 19:25Z: the hive superseded import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#609 and shut it (
reason=dco-rehome mode=supersede superseded_by=626) and opened import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#626 fromprojectbluefin/utah-packages:hive/adopt-609. import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#626's body says the head is "import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#609's heada649edc02925as pushed by @kylerankin … unchanged".GET /compare/a649edc…a649edcconfirms the content is identical to the fork head. - Canary on import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#626,
pull_requestevent, run 40225945814, jobpass1 / publish / publish. The job log shows:published ghcr.io/projectbluefin/utah-packages:canary-pr626, digestsha256:e1c0b97c88e6a7e97467779e532fdaff75df32b79302159d66e50db1cc056684;- Sigstore keyless signing, with
tlog entry created with index: 3466681712and3466717091, andPushing signature to: ghcr.io/projectbluefin/utah-packages.
- No human review of import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#609 or import: codecs-media batch (libultrahdr, svt-vp9-libs) projectbluefin/utah-packages#626: the only reviews are the hive bot's comments.
So an unreviewed fork commit produced a signed, published image under the project's identity, with a permanent transparency-log record. That is exactly what the repository's fork guard and maintainer-run fork canary exist to prevent.
Where
At v6 becce0a8c, src/pkg/github/automerge/automerge_contributor_adopt.go:
adoptContributorPR(:552): when in-place adoption is not possible oradoptionNeedsDCORehome(:595), it callssupersedeAdoptedPR.supersedeAdoptedPR(:610): creates thehive/adopt-<n>branch in the base repository from the fork's head and opens the superseding PR.AdoptReasonDCORehome(:100): the second takeover of an in-place adoption.
The same applies to any supersession of a fork PR, not only the DCO re-home.
Ask
- Never re-home or supersede a fork PR into the base repository while it carries code nobody trusted has reviewed. Acceptable shapes:
- park at 085 for a maintainer instead;
- only after a trusted maintainer has approved the exact head being moved;
- push to a branch outside the base repository.
- Never re-home or supersede in a repository with fork-publication or fork-secrets guards. A small configurable per-repo opt-out works, as does detecting the guard (see the fork-guard routing below).
- If a superseded PR keeps its own branch in-repo for any reason, mark it so repository gates can treat it as a fork, for example with a label the repository's workflows can check. This is weaker than 1 and 2 and not sufficient on its own.
- Audit: list existing
hive/adopt-*branches and PRs whose original was a fork PR, so maintainers can review what ran.
Acceptance criteria
- A fork PR is never moved to an in-repo branch without a trusted maintainer's approval of that exact head.
- In a repo configured as having a fork guard, no supersession or DCO re-home of a fork PR happens at all; the PR parks at 085 with a maintainer note.
- The adoption and superseding-PR notes say the PR came from a fork and why it was not moved.
- Tests cover: a fork PR plus DCO re-home without approval (not moved), a fork PR with approval of the current head (moved), and a same-repo PR (unchanged).
Related
- The pending v6 PR for fork-guard routing (forward-port of 🐛 fix(stageengine): park fork PRs failing a fork-publication guard for a maintainer #14282) parks a fork PR whose only red check is a fork guard at 085, which does not yield to adoption. That removes this path for that one shape. It does not fix this issue: a fork PR with any other red check, or only a DCO problem, can still be adopted and re-homed in-repo.
- Adoption of a maintainer's own PR is filed separately.
🤖 Generated with Claude Code
Activity
hivecommons-hive commentedon Oct 25, 2026
🔒 Claimed by @arteeh (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 25, 2026
stage 020-claimed → 010-actionable: actionable
Danathar commentedon Oct 25, 2026
Superseded by a PR that implements the fix directly: #14306
hivecommons-hive commentedon Oct 25, 2026
🔓 Claim by @arteeh released (lease revoked).