| 1 | --- |
| 2 | type: bug |
| 3 | id: bd-500adf7 |
| 4 | status: open |
| 5 | title: The bus service runs as the git user — repositories are readable by a compromised server |
| 6 | created: 2026-07-17 |
| 7 | source: security review of phase1/event-log, 2026-07-17 |
| 8 | --- |
| 9 | |
| 10 | # The bus service runs as the git user |
| 11 | |
| 12 | The valley-bus unit runs as the same user that owns the repositories. The systemd sandbox confines |
| 13 | writes to the stream's store directory, but ProtectHome does not cover the data directory, so a |
| 14 | compromised nats-server can read every private repository. Acceptable while the bus listens only on |
| 15 | localhost; before the bus becomes network-reachable, the service needs its own user. |
| 16 | |
| 17 | The integrator now runs under its own unix user, which is the first half of that split and settles |
| 18 | its shape. The bus cannot take the same shape, though. The integrator reaches the repositories |
| 19 | through the git group, and the repositories it serves are group-shared so it can write refs — so |
| 20 | putting the bus in that group would now grant it write as well as read. The bus needs a user in no |
| 21 | shared group, and that in turn needs its store directory moved out from under the data directory: |
| 22 | storage can only be granted on its own if it does not sit inside the repositories'. |