| 1 |
### Fuzzing |
| 2 |
|
| 3 |
The fuzzing of sigstore uses [go-fuzz](https://github.com/dvyukov/go-fuzz) for fuzzing. |
| 4 |
It is integrated into oss-fuzz https://github.com/google/oss-fuzz/pull/6890 for fuzzing continuously. |
| 5 |
|
| 6 |
#### Why not use go 1.18 fuzzing? |
| 7 |
The go-fuzz can be compatible with `libfuzzer`, which is supported by `oss-fuzz`. |
| 8 |
The go 1.18 doesn't have support for external fuzzer formats yet. |
| 9 |
|
| 10 |
#### What is corpus? |
| 11 |
>A set of inputs for a fuzz target. In most contexts, it refers to a set of minimal test inputs that generate maximal code coverage. |
| 12 |
https://google.github.io/clusterfuzz/reference/glossary/#corpus |
| 13 |
|
| 14 |
#### How do I run the fuzzer? |
| 15 |
1. `make fuzz` |
| 16 |
2. `go-fuzz -bin=signature-fuzz.zip -func FuzzED25529SignerVerfier` |
| 17 |
3. An example to use the `libfuzzer` `go-fuzz-build --libfuzzer -func FuzzRSASignerVerfier ./signature/...` |
| 18 |
and `clang -fsanitize=fuzzer reflect-fuzz.a -o fmt.libfuzzer` |
| 19 |
4. The `libfuzzer` option requires `linux`. |
| 20 |
|