@@ -8,7 +8,7 @@ This is an example of how to integrate your [go-fuzz](https://github.com/dvyukov
8
8
9
9
This example will show the following steps:
10
10
* [ Building and running locally a simple go-fuzz target] ( #building-go-fuzz-target )
11
- * [ Integrate the go-fuzz target with Fuzzit via Travis-CI] ( #integrating-with-fuzzit )
11
+ * [ Integrate the go-fuzz target with Fuzzit via Travis-CI] ( #integrating-with-fuzzit-from-ci )
12
12
13
13
Result:
14
14
* Fuzzit will run the fuzz targets continuously on daily basis with the latest release.
@@ -82,7 +82,7 @@ go get github.com/fuzzitdev/example-go
82
82
83
83
``` bash
84
84
cd /go/src/github.com/fuzzitdev/example-go
85
- go-fuzz-build -libfuzzer -o fuzzer.a ./...
85
+ go-fuzz-build -libfuzzer -o fuzzer.a .
86
86
clang-9 -fsanitize=fuzzer fuzzer.a -o fuzzer
87
87
```
88
88
@@ -138,27 +138,33 @@ artifact_prefix='./'; Test unit written to ./crash-df779ced6b712c5fca247e465de2d
138
138
Base64: RlVaWkk=
139
139
```
140
140
141
+ ## Integrating with Fuzzit from CI
141
142
142
- ## Integrating with Fuzzit
143
-
144
- The integration with fuzzit is easy and consists of adding a travis stage, downloading the fuzzit cli,
145
- authenticating and uploading the fuzzer to fuzzit.
143
+ The best way to integrate with Fuzzit is by adding a stage in your Contintous Build system
144
+ (like Travis CI or Circle CI). In that stage:
145
+ * build a fuzz target
146
+ * download ` fuzzit ` cli
147
+ * authenticate with ` fuzzit auth `
148
+ * create a fuzzing job by uploading fuzz target
146
149
147
150
here is the relevant snippet from the [ ./ci/fuzzit.sh] ( https://github.com/fuzzitdev/example-go/blob/master/ci/fuzzit.sh )
148
151
which is being run by [ .travis.yml] ( https://github.com/fuzzitdev/example-go/blob/master/.travis.yml )
149
152
150
153
``` bash
151
- wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v1.2.7 /fuzzit_Linux_x86_64
154
+ wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.0.0 /fuzzit_Linux_x86_64
152
155
chmod a+x fuzzit
153
156
./fuzzit auth ${FUZZIT_API_KEY}
154
157
export TARGET_ID=2n6hO2dQzylLxX5GGhRG
155
158
./fuzzit create job --type $1 --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT $TARGET_ID ./fuzzer
156
159
```
157
160
158
161
NOTE: In production it is advised to download a pinned version of the [ CLI] ( https://github.com/fuzzitdev/fuzzit )
159
- like in the example. In development you can use latest with the following link:
160
- https://github.com/fuzzitdev/fuzzit/releases/latest/download/fuzzit_\ <Os\> _ \< Arch\>
162
+ like in the example. In development you can use latest version:
163
+ https://github.com/fuzzitdev/fuzzit/releases/latest/download/fuzzit_${OS}_${ARCH} .
164
+ Valid values for ` ${OS} ` are: ` Linux ` , ` Darwin ` , ` Windows ` .
165
+ Valid values for ` ${ARCH} ` are: ` x86_64 ` and ` i386 ` .
161
166
167
+ The steps are:
162
168
* Authenticate with the API key (you should keep this secret) you can find in the fuzzit settings dashboard.
163
169
* Upload the fuzzer via create job command and create the fuzzing job. In This example we use two type of jobs:
164
170
* Fuzzing job which is run on every push to master which continuous the previous job just with the new release.
0 commit comments