Go-fuzz targets
To fuzz Go code, use the setup steps to install all the needed dependencies. Then, specify the package and method to fuzz in the harness field.
This is an example of the configuration of a target written in Go, with a fuzz method named FuzzMe in package github.com/x/y/z/a/b/c:
1
# ---- base, global setup, and global environment omitted
2
language: go
3
version: "1.11"
4
# checkout specifies where in the Gopath to place your code
5
# this repository will be placed in the directory:
6
# ~/go/src/github.com/x/y
7
checkout: github.com/x/
8
targets:
9
- name: my-target
10
setup:
11
- dep ensure # make sure all dependencies are installed
12
corpus: ./my_target/corpus
13
harness:
14
# the name of your method
15
function: FuzzMe
16
# build tags are optional
17
build_tags: tag1 tag2 tag3
18
# package specifies the package to import the
19
# desired function from
20
package: github.com/x/y/z/a/b/c
21
Copied!
You're ready to go! Push your project to Fuzzbuzz and it will detect your targets automatically.
Last modified 2yr ago
Copy link