@@ -145,30 +145,37 @@ The best way to integrate with Fuzzit is by adding a two stages in your Continuo
145145
146146Fuzzing stage:
147147
148- * build a fuzz target
148+ * build a fuzzing target
149149* download ` fuzzit ` cli
150- * authenticate with ` fuzzit auth `
151- * create a fuzzing job by uploading the fuzz target
150+ * create a fuzzing job by uploading the fuzzing target
152151
153- Sanity stage
154- * build a fuzz target
152+ Regression stage
153+ * build a fuzzing target
155154* download ` fuzzit ` cli
156- * authenticate with ` fuzzit auth `
157- * create a local sanity fuzzing job - This will pull all the generated corpuses and run them through
155+ * create a local regression fuzzing job - This will pull all the generated corpuses and run them through
158156the fuzzing binary. If new bugs are introduced this will fail the CI and alert
159157
160- here is the relevant snippet from the [ ./ci/fuzzit.sh] ( https://github.com/fuzzitdev/example-go/blob/master/ci/fuzzit.sh )
158+ Here is the relevant snippet from the [ ./ci/fuzzit.sh] ( https://github.com/fuzzitdev/example-go/blob/master/ci/fuzzit.sh )
161159which is being run by [ .travis.yml] ( https://github.com/fuzzitdev/example-go/blob/master/.travis.yml )
162160
163161``` bash
164- wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.0.0/fuzzit_Linux_x86_64
162+
163+ if [ -z " ${FUZZIT_API_KEY} " ]; then
164+ echo " Please set env variable FUZZIT_API_KEY to api key for your project"
165+ echo " Api key for your account: https://app.fuzzit.dev/orgs/<ACCOUNT>/settings"
166+ exit 1
167+ fi
168+
169+ wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.17/fuzzit_Linux_x86_64
165170chmod a+x fuzzit
166- ./fuzzit auth ${FUZZIT_API_KEY}
167- export TARGET_ID=2n6hO2dQzylLxX5GGhRG
168- ./fuzzit create job --type $1 --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT $TARGET_ID ./fuzzer
171+
172+ export TARGET=example-go
173+ GIT_BRANCH=` git rev-parse --abbrev-ref HEAD`
174+ GIT_COMMIT=` git rev-parse --short HEAD`
175+ ./fuzzit create job --type $1 --branch $GIT_BRANCH --revision $GIT_COMMIT $TARGET ./fuzzer
169176```
170177
171- NOTE: In production it is advised to download a pinned version of the [ CLI] ( https://github.com/fuzzitdev/fuzzit )
178+ In production it is advised to download a pinned version of the [ CLI] ( https://github.com/fuzzitdev/fuzzit )
172179like in the example. In development you can use the latest version:
173180https://github.com/fuzzitdev/fuzzit/releases/latest/download/fuzzit_${OS}_${ARCH} .
174181Valid values for ` ${OS} ` are: ` Linux ` , ` Darwin ` , ` Windows ` .
@@ -179,8 +186,9 @@ The steps are:
179186* Upload the fuzzer via ` create job ` command and create the fuzzing job. In This example we use two type of jobs:
180187 * A fuzzing job which is run on every push to master, that continues the previous job with the new release.
181188 This means the current corpus is kept and the fuzzer will try to find new paths in the newly added code.
182- * In a Pull-Request the fuzzer will run a quick "sanity" test running the fuzzer through all the generated corpuses
189+ * In a Pull-Request the fuzzer will run a quick regression test running the fuzzer through all the generated corpuses
183190 and crashes to see if the Pull-Request doesnt introduce old or new crashes. This will be alred via the configured
184191 channel in the dashboard.
185- * The Target is not a secret. This ID can be retrieved from the dashboard after your create the appropriate target in the dashboard.
192+ * The name of the target is not a secret.
193+
186194Each target has its own corpus and crashes.
0 commit comments