vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Fuzz the parsers that read untrusted input
16bf0ebf8054de5044a52f93d156402542f0f71a · Keenan Nemetz · 10d ago · parent 70ba9a69
Fuzz the parsers that read untrusted input The SSH exec line, the Git HTTP route, and the LFS packet stream are all hand-written parsers on bytes a client controls, and each was covered only by a table of examples someone thought to write. Six targets, each asserting a property rather than waiting for a panic: the command parser cannot invent bytes and its output survives being quoted back, a route re-routes from its own parts and never names more than one path segment, a repository argument is a name and not a path, and the packet reader's lines survive being framed again. The seeds are the shapes the clients actually send, so go test ./... keeps guarding them and a fuzz target costs a push nothing. The route fuzzer found one gap on its first run: /git/.git/info/refs gave back an empty repository name with ok set, and only the store refused it. A route that answers ok now means a name the rest of the path applies to. Closes #96.
CONTRIBUTING.md +13
| @@ -161,6 +161,19 @@ commands with the same flags the image sets | |||
| 161 | 161 | `CGO_ENABLED=1 go test -tags libsqlite3 -race ./...`) and say which check you | |
| 162 | 162 | could not run. | |
| 163 | 163 | ||
| 164 | Fuzz targets live beside the parsers they drive — `server/ssh`, `server/githttp`, | ||
| 165 | and `core/lfs` — and every one of them runs its seed corpus under `go test ./...`, | ||
| 166 | so a normal push covers everything already found. To spend longer on one, name it | ||
| 167 | and give it a budget: | ||
| 168 | |||
| 169 | ```sh | ||
| 170 | go test -run '^$' -fuzz '^FuzzSplitCommand$' -fuzztime=60s ./server/ssh | ||
| 171 | ``` | ||
| 172 | |||
| 173 | When a run finds a failure, Go writes the input to | ||
| 174 | `testdata/fuzz/<FuzzName>/` and fails. Commit that file with the fix: it is the | ||
| 175 | regression test, and nothing else records the input. | ||
| 176 | |||
| 164 | 177 | ## Dependencies and licenses | |
| 165 | 178 | ||
| 166 | 179 | Adding a dependency means distributing someone else's code. `licenses.toml` at | |