Test what a fork pull request can do on this Gitea #89
Notifications
Due Date
No due date set.
Blocks
Reference: Mortis/Kamino#89
Reference in new issue
Block a user
Part of #87
Question
On this Gitea instance and version, what actually happens when an account with no write access opens a pull request from a fork?
Record, from a real test with an outsider account:
Context
Gitea's documentation says fork pull request runs need approval, but an earlier test here saw a fork Build start with no approval step (the tester may have had write access, so it proved nothing for outsiders). The documentation does not state that secrets are withheld. Needs the maintainer and a throwaway account without access.
Test checklist for the maintainer (2026-11-13)
Facts an agent could read without credentials: the instance reports Gitea
28.0.0; the repository is readable anonymously; the sign-up page answers (not proof that registration is open).The agent cannot do the rest: it needs an account with no access to the organisation or the repository. Use a throwaway account, not a collaborator, not an org member, not an instance admin.
PR A: an innocent change (approval behaviour)
README.mdon a branch, open a pull request againstmain.PR B: a second pull request from the same fork
PR C: the fork controls the workflow files
.gitea/workflows/probe.yml(below) and add a step- run: echo EDITED-BY-FORKas the first step oflint.yml. Open a pull request.Fork proberun at all (a new workflow file from a fork)?EDITED-BY-FORK(head version of the workflow used)?PRESENT/emptyline for each of the four names.201is a write that worked;403/404is refused).moleculejob get picked up by thekamino-moleculerunner, or stay waiting?The probe prints no secret value and passes context values through
env:only. If the branch probe returns201, it createdprobe/fork-tokenin this repository.Clean up
probe/fork-tokenif it exists, delete the probe comment, then delete the fork and the throwaway account.Report back
Paste the observations for steps 2, 3, 4 and 6 here or into the session; the resolution comment is written from them.
Resolution (2026-11-13)
Tested live on Gitea
28.0.0, runnerv5.1.0, with an outsider account that has no access to the organisation or the repository. Evidence: pull requests #109 (README edit) and #110 (probe workflow plus an editedlint.yml), runs 3658 to 3667.PACKAGE_PUSH_USER,PACKAGE_PUSH_TOKENandRENOVATE_BOT_TOKENwere all empty in the fork's own workflow.contents,issues,pull-requestsandpackages: write.kamino-dockerran in theciimage, and its job onkamino-moleculeran on the host executor asgitea-runner.lint.ymlexecuted, and the newprobe.ymlwas registered as a fourth run. Both were held for approval like the rest.What follows
if:guard inmolecule.ymlskipped the repository's own Molecule job but did nothing to stop the fork's own job on the same label.molecule.ymlheader (a fork Build starting at once, 2026-11-08) does not hold for an outsider; it belongs with the other stale claims.lint.ymlthat the job token is read-only for a fork pull request is now verified for issues and contents.Not tested
main).permissions:, never exercised).Side effects
None in this repository: both write probes were refused, so no branch and no comment were created. Left for the maintainer: close #109 and #110 (three runs of #109 are still held), then delete the fork and the throwaway account.
Review of the map (2026-11-17).
Partly superseded by Establish how fork approval behaves on this server's Gitea version: approval is asked on every push only for an account with no merged pull request here and no Actions write access; after a first merged pull request Gitea runs the fork's pushes unapproved. This answers the first "Not tested" line from the source at the server's tag, not from a live test.