Sign in

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

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.

Fuzz the metadata and workflow parsers

d9f5a930d9e6aa20b5dbfb00d154afd46df901ab · Keenan Nemetz · 10d ago · parent 16bf0ebf

Fuzz the metadata and workflow parsers

A push decides how much of this code runs: frontmatter becomes the object every
page renders, and workflow YAML becomes the job the runner executes. Neither was
fuzzed, and both accept bytes from anyone allowed to push.

Four targets, each asserting the property that makes the pair of reader and
writer safe rather than waiting for a panic: an accepted issue or comment must
render and re-parse identically, and a second write must not change a byte; an
accepted workflow must be one the runner can act on; an accepted image
definition must not add a line to the Dockerfile it renders.

FuzzParseComment found one asymmetry in under a second: a hand-written file
without a trailing newline is normalized on the first write. That is the format
working as designed, since every writer trims and nothing compares raw bodies, so
the property now says so and the input is committed as a seed.

The YAML bomb is pinned by a test with two assertions, because the parser refuses
it on the unknown keys before expansion is reached, and it is yaml.v3's own
aliasing limit that covers a bomb inside a field the schema knows.

Closes #97.

CONTRIBUTING.md +2−2

@@ -162,8 +162,8 @@ commands with the same flags the image sets
162 162 could not run.
163 163
164 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
165 `core/lfs`, `metadata`, and `ci` — and every one of them runs its seed corpus under
166 `go test ./...`, so a normal push covers everything already found. To spend longer on one, name it
167 167 and give it a budget:
168 168
169 169 ```sh