vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Verify the runner's host and re-check the job it is given
f5456470d22fb7ca06197a8856ed0da7fc56fdd2 · Keenan Nemetz · 12d ago · parent edf9db6e
Verify the runner's host and re-check the job it is given A runner executes repository code, so the instance it talks to decides what runs on it. The client built ssh command lines with no host-key policy: a man in the middle, or a loose known_hosts, could answer in the instance's place and feed a runner any job it liked. Host keys are now verified against known_hosts by default, for the runner's control channel, for git's own clone/fetch/push and for the LFS transfer. `--known-hosts` names a file instead of the default, VOLE_KNOWN_HOSTS does the same for every command, and `--insecure-host-key` / VOLE_INSECURE_HOST_KEY is the explicit override for tests and throwaway instances, with a warning when it is used. The options are placed before any configured ones because ssh takes the first value for an option, so GIT_SSH_COMMAND or VOLE_SSH_COMMAND cannot quietly turn the check off. The test package opts out once, in TestMain, rather than every fixture learning to trust everything. The runner also re-checks the job it leases before acting on it. The server validated the workflow at push time, but the runner is the party that turns the payload into paths, container arguments and scripts. Run id, repository, attempt, commit, ref, branch, tag, workflow and job names, image (or image-file plus its pinned digest), steps, artifact patterns, pages path and environment are all validated; a malformed job stops the runner with the reason instead of being built from. The artifact and pages path rules move into ci/validate.go, so the push-time check and the runner use one implementation rather than two that can drift. Joining them also closes the gap the runner-side check was for: `..`, absolute paths, `**`, globs where a directory belongs, and control characters are refused identically on both sides. Tests: strict-by-default and known_hosts options, the environment losing to the explicit policy, the insecure override, and every job field refused when it climbs out, is the wrong shape, or is missing.
server/integration_test.go +5
| @@ -127,6 +127,11 @@ func TestMain(m *testing.M) { | |||
| 127 | 127 | fmt.Fprintln(os.Stderr, err) | |
| 128 | 128 | os.Exit(1) | |
| 129 | 129 | } | |
| 130 | // Every fixture talks to a throwaway instance on a random port whose host key | ||
| 131 | // nobody has pinned. Host-key verification is on by default — the runner's | ||
| 132 | // control channel is a security boundary — so the test package uses the explicit | ||
| 133 | // override rather than teaching the tests to trust everything implicitly. | ||
| 134 | os.Setenv("VOLE_INSECURE_HOST_KEY", "1") | ||
| 130 | 135 | code := m.Run() | |
| 131 | 136 | os.RemoveAll(dir) | |
| 132 | 137 | os.Exit(code) | |