Security: CI shares persistent Go cache volumes across the fork-PR / trusted-main trust boundary #272
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#272
Loading…
Add table
Add a link
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?
Every job in both workflows mounts the same runner-local named volumes:
(
.forgejo/workflows/ci.yml- present on all jobs, verified lines 79/112/139/171/207/238/271/302/329/...; same pattern indrift.yml). These volumes persist on the runner and are shared across both fork-PR runs and trustedmainruns.Once the repo is public and takes fork PRs, a hostile fork PR's
go test/go buildhas write access to both caches. Scenario: the PR job poisonsmadtea-gobuildormadtea-gomod; a later trustedmainrun reuses the poisoned cache, producing a compromised build or a falsely-green gate. Go's content-addressing andgo.sumblunt naive tampering, but a shared mutable cache spanning a trust boundary is the anti-pattern regardless.Blast radius is limited because release artifacts are built locally on the maintainer machine, never on this runner (confirmed separately) - so a poisoned CI cache can corrupt gate results but not shipped binaries. Still worth closing before public launch.
Fix: do not share build/mod caches between fork-PR runs and trusted runs - disable the cache mount for fork PRs, or namespace the volume by trust level (e.g. a separate throwaway cache for PR runs).
Acceptance: fork-PR jobs and trusted
mainjobs no longer read/write the same cache volume.