Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Code

527 commit(s) on main

Put job execution behind an interface Keenan Nemetz · 2h ago de3eec16
history blame raw 737 B
1//go:build unix
2
3package secure
4
5import "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.
17func Restrict() {
18 syscall.Umask(0o027)
19}
20