PST-098: Pull-request workflow runs share the runner cache with main through restore-keys prefixes #827
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#827
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in the security audit of 2026-10-10 (
SECURITY-AUDIT-2026-10-10.md), run againstmainatc30851bfrom 8 to 10 October 2026, as PST-098. Severity: Informational (not settled: see below).The text below is the audit's entry, unchanged apart from links to the other issues it names. The finding was produced by automated review and checked by a second automated pass; re-check it before acting on it.
.forgejo/workflows/ci.yml(31,83-91,207-213,290-296)Who can do it, and what they need. An external contributor who opens a pull request, if the Forgejo instance runs PR workflows from forks and the forgejo-runner cache is not isolated by ref. Precondition: both of those, which depend on the instance's configuration and runner version and were not verifiable from the repository.
How it works.
restore-keys: uv-${{ runner.os }}-3.14-.Impact. Falsified CI results on main at most; no release credential is reachable because release.yml does not restore any cache. Recorded as informational because the precondition is outside the repository.
Evidence.
Verification (verdict: uncertain; severity after verification: Informational). Missing to settle it: (a) forgejo-runner 6.4's cache scoping (per repository only, or per ref), and (b) the instance's setting for running fork pull-request workflows without approval. Drop postgres and security from the list of affected jobs; affected are ci.yml browser, test and checks only. Line refs: browser cache step is ci.yml:82-90, test cache step 203-212 (uses at 207), checks cache step 289-295. Remediation if the runner does not scope by ref: do not use restore-keys prefixes on pull_request runs, or skip cache restore when github.event_name == 'pull_request'; require approval for fork PR workflows.
Suggested remediation. Confirm the instance's PR-from-fork policy and the runner's cache scoping; if caches are shared, drop restore-keys prefixes (exact key only) or skip the cache step on pull_request events.
Fixed in
9d7c4f9c2on main.