vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
|
8f24ae1f
Keenan Nemetz
12d ago
|
1 | //go:build unix |
| 2 | ||
| 3 | package secure | |
| 4 | ||
| 5 | import "syscall" | |
| 6 | ||
| 7 | // Restrict sets the process umask so everything this process creates is at most | |
| 8 | // group-readable: the service account writes, its group reads, everybody else | |
| 9 | // gets nothing. | |
| 10 | // | |
| 11 | // Vole creates its own secrets at FileMode regardless. The umask is what covers | |
| 12 | // the files other programs create on its behalf — SQLite's databases, git's | |
| 13 | // objects and logs, the CI spool, and the ACME client's cache. A packaged Linux | |
| 14 | // install gets it from the systemd unit; launchd has no equivalent, so the | |
| 15 | // long-running commands set it themselves. Setting it where the unit already did | |
| 16 | // is harmless: a umask belongs to the process, not to the unit. | |
| 17 | func Restrict() { | |
| 18 | syscall.Umask(0o027) | |
| 19 | } |