xonecas.io
8356
Wx

www-xonecas-io / files

www-xonecas-io / tickets / 1043-published-clones-expose-the-build-machine-s.md

1.6 KB
1---
2id: 1043
3title: Published clones expose the build machine's mirror path in <name>.git/config
4type: bug
5status: done
6priority: p2
7area: site
8created: 2026-11-08T07:04:04Z
9updated: 2026-11-08T16:01:05Z
10source: agent
11moves: 2026-11-08T14:41:37Z inbox doing drag; 2026-11-08T14:43:58Z doing review agent; 2026-11-08T16:01:05Z review done drag
12---
13
14Seen while testing 1042: writeClone (internal/site/clone.go) runs git clone --bare from the mirror, so every public/<name>.git/config keeps [remote "origin"] url = <absolute path of the mirror under repos/>, e.g. /home/sacenox/repos/www-xonecas-io/repos/github.com/... Anyone can fetch https://xonecas.io/<name>.git/config and read it. Seen in a scratch build. I did not check the live site or the other files in the clone (packed-refs, FETCH_HEAD).
15
16## Notes
17
18- 2026-11-08 07:08Z (agent): Triage: I filed this while working 1042. bug, p2, area site: a path leak in public files, with no breakage. It also affects repos hosted with remote new (1042).
19
20- 2026-11-08 14:43Z (agent): Fixed. writeClone (internal/site/clone.go) now runs git remote remove origin on each bare clone, so public/<name>.git/config has no [remote "origin"] url. TestClone checks the config has no origin; it fails without the fix (it showed url = /tmp/TestClone.../.git) and passes with it, and still clones over plain HTTP. make build wrote 82 clones; grep for /home/sacenox in every file under public/*.git outside objects/ finds nothing. packed-refs, description, HEAD and info/refs hold no paths, and there is no FETCH_HEAD. Not checked: the live site, which keeps the old configs until the next deploy.