Establish how fork approval behaves on this server's Gitea version #204

Closed
opened 2026-11-16 06:10:51 +00:00 by Claude · 1 comment
Owner

Part of #87

Question

No decision here: facts that How friends get code in and Threat model: what we defend against and what we accept rest on, which a review of the map found unverified or contradicted. Establish each, from Gitea's own release notes and source and by a live test where reading is not enough:

  1. Which Gitea version the server runs, and which published Actions approval fixes (fork approval bypasses, among them one through a workflow triggered by a pull request review) are missing from it. Name the lowest version that has them all.
  2. Whether approval is still asked for a fork's pushes after that account has had one pull request merged here. Test what a fork pull request can do on this Gitea listed this as not tested; two reviewers read the source as "no approval after a first merge".
  3. Whether a Restricted account is always asked for approval, and what a Restricted account can still see and do here (issues, forks, pull requests).
  4. Whether a push by another account onto a branch with a scheduled automerge cancels that merge.

From the review

  • Public advisories describe several fork-approval bypasses in Gitea Actions; third-party sources disagree on the fixed versions, so read Gitea's release notes.
  • The answer records the version, the test steps and what was seen, so the next ticket can decide on facts.
Part of #87 ## Question No decision here: facts that [How friends get code in](https://git.rkdr.net/Mortis/Kamino/issues/100) and [Threat model: what we defend against and what we accept](https://git.rkdr.net/Mortis/Kamino/issues/99) rest on, which a review of the map found unverified or contradicted. Establish each, from Gitea's own release notes and source and by a live test where reading is not enough: 1. Which Gitea version the server runs, and which published Actions approval fixes (fork approval bypasses, among them one through a workflow triggered by a pull request review) are missing from it. Name the lowest version that has them all. 2. Whether approval is still asked for a fork's pushes after that account has had one pull request merged here. [Test what a fork pull request can do on this Gitea](https://git.rkdr.net/Mortis/Kamino/issues/89) listed this as not tested; two reviewers read the source as "no approval after a first merge". 3. Whether a Restricted account is always asked for approval, and what a Restricted account can still see and do here (issues, forks, pull requests). 4. Whether a push by another account onto a branch with a scheduled automerge cancels that merge. ## From the review - Public advisories describe several fork-approval bypasses in Gitea Actions; third-party sources disagree on the fixed versions, so read Gitea's release notes. - The answer records the version, the test steps and what was seen, so the next ticket can decide on facts.
Claude added the
Wayfinder
Task
label 2026-11-16 06:10:51 +00:00
Claude added a new dependency 2026-11-16 06:11:27 +00:00
Defame1297 was assigned by Claude 2026-11-16 06:11:28 +00:00
Author
Owner

Resolution

Established by reading Gitea's release notes, its published security advisories and its source at the tag the server runs. No live test was run; what that leaves open is listed at the end.

1. Version and missing fixes. The server reports 28.0.0 (/api/v1/version). Upstream has released 28.1.0, 28.2.0, 28.3.0 and 28.4.0 since; there are no 28.0.x patch releases.

Missing from 28.0.0 Advisory Fixed in
A workflow triggered by a pull request review is read from the commit the review names and runs as a non-fork run, with secrets and a write token CVE-2026-118386 / GHSA-32h8-5xqg-h466 28.3.0
The Actions task token has no API scope GHSA-8r36-6j2c-3gmv 28.3.0
The Actions token can add a GPG key GHSA-mf6p-vqpw-3r7x 28.3.0
Removing a team review request can bypass required approvals GHSA-74jf-6hjp-549c 28.4.0
A repository transfer keeps workflow trust and exposes secrets GHSA-q3q9-39vr-q35j 28.4.0
Protected file patterns bypassed with quoted file names GHSA-w87g-xmrp-86v2 28.4.0

Already fixed in 28.0.0: approval decided by the event actor instead of the author, cancel-then-rerun of a waiting run, a one-time approval treated as permanent trust, and review events not attached to their pull request.

So 28.3.0 closes the fork-approval gap and 28.4.0 is the lowest version with every fix found.

2. Approval after a first merge. Approval is not asked. In services/actions/notifier_helper.go at v28.0.0, a fork pull request run needs approval unless the user has Actions write access or has one merged pull request in the repository (// trust the user only after a merged PR). The rule is identical at v28.4.0. Both the pull request author and the user who triggered the event are checked; one of them failing is enough to require approval. An earlier "approve and run" click does not count as trust.

3. Restricted accounts. The restricted check comes first: a Restricted account is always asked for approval, even with a merged pull request or write access.

4. Push onto a scheduled merge. A new push does not cancel a scheduled automerge, whoever pushes. The merge waits for the new head's checks and branch protection, then runs as the user who scheduled it. The schedule ends only on merge, on close, on re-scheduling or on an explicit cancel.

Not established

  • What a Restricted account can see and do here. The source shows no restriction on forking, filing issues or opening pull requests for a Restricted account that can read the repository, and Gitea's FAQ and source disagree on what such an account can see. Test this if Restricted accounts are chosen as the boundary.
  • Whether the first-merge rule behaves on this server as the source reads. The reading is of the exact tag, so confidence is high.
  • Whether approvals are dismissed on a new push, which matters for scheduled merges on branches that need approval.
## Resolution Established by reading Gitea's release notes, its published security advisories and its source at the tag the server runs. No live test was run; what that leaves open is listed at the end. **1. Version and missing fixes.** The server reports `28.0.0` (`/api/v1/version`). Upstream has released 28.1.0, 28.2.0, 28.3.0 and 28.4.0 since; there are no 28.0.x patch releases. | Missing from 28.0.0 | Advisory | Fixed in | |---|---|---| | A workflow triggered by a pull request review is read from the commit the review names and runs as a non-fork run, with secrets and a write token | CVE-2026-118386 / GHSA-32h8-5xqg-h466 | 28.3.0 | | The Actions task token has no API scope | GHSA-8r36-6j2c-3gmv | 28.3.0 | | The Actions token can add a GPG key | GHSA-mf6p-vqpw-3r7x | 28.3.0 | | Removing a team review request can bypass required approvals | GHSA-74jf-6hjp-549c | 28.4.0 | | A repository transfer keeps workflow trust and exposes secrets | GHSA-q3q9-39vr-q35j | 28.4.0 | | Protected file patterns bypassed with quoted file names | GHSA-w87g-xmrp-86v2 | 28.4.0 | Already fixed in 28.0.0: approval decided by the event actor instead of the author, cancel-then-rerun of a waiting run, a one-time approval treated as permanent trust, and review events not attached to their pull request. So 28.3.0 closes the fork-approval gap and 28.4.0 is the lowest version with every fix found. **2. Approval after a first merge.** Approval is not asked. In `services/actions/notifier_helper.go` at `v28.0.0`, a fork pull request run needs approval unless the user has Actions write access or has one merged pull request in the repository (`// trust the user only after a merged PR`). The rule is identical at `v28.4.0`. Both the pull request author and the user who triggered the event are checked; one of them failing is enough to require approval. An earlier "approve and run" click does not count as trust. **3. Restricted accounts.** The restricted check comes first: a Restricted account is always asked for approval, even with a merged pull request or write access. **4. Push onto a scheduled merge.** A new push does not cancel a scheduled automerge, whoever pushes. The merge waits for the new head's checks and branch protection, then runs as the user who scheduled it. The schedule ends only on merge, on close, on re-scheduling or on an explicit cancel. **Not established** - What a Restricted account can see and do here. The source shows no restriction on forking, filing issues or opening pull requests for a Restricted account that can read the repository, and Gitea's FAQ and source disagree on what such an account can see. Test this if Restricted accounts are chosen as the boundary. - Whether the first-merge rule behaves on this server as the source reads. The reading is of the exact tag, so confidence is high. - Whether approvals are dismissed on a new push, which matters for scheduled merges on branches that need approval.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#204