This repository was archived by the owner on Jul 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 1212
1313if [ -z " ${FUZZIT_API_KEY} " ]; then
1414 echo " Please set env variable FUZZIT_API_KEY to api key for your project"
15+ echo " Api key for your account: https://app.fuzzit.dev/orgs/<ACCOUNT>/settings"
1516 exit 1
1617fi
1718
1819# # Install go-fuzz
1920go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
2021
21- # # build fuzzer
22+ # # build fuzz target
2223go build ./...
23- go-fuzz-build -libfuzzer -o fuzzer.a .
24- clang -fsanitize=fuzzer fuzzer.a -o fuzzer
2524
26- wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.2/fuzzit_Linux_x86_64
25+ # target name can only contain lower-case letters (a-z), digits (0-9) and a dash (-)
26+ TARGET=parse-complex
27+
28+ go-fuzz-build -libfuzzer -o ${TARGET} .a .
29+ clang -fsanitize=fuzzer ${TARGET} .a -o ${TARGET}
30+
31+ # you can repeat the above for more fuzzing targets
32+
33+ wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.12/fuzzit_Linux_x86_64
2734chmod a+x fuzzit
35+
36+ # authenticate with fuzzit.dev server using api key from settings panel in the dashboard
2837./fuzzit auth ${FUZZIT_API_KEY}
2938
39+ # create fuzzing target on the server if it doesn't already exist
40+ ./fuzzit create target ${TARGET} || true
41+
3042if [ $1 == " fuzzing" ]; then
31- ./fuzzit create job --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT parse-complex ./fuzzer
43+ ./fuzzit create job --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT ${TARGET} ./${TARGET}
3244else
33- ./fuzzit create job --local parse-complex ./fuzzer
45+ ./fuzzit create job --local ${TARGET} ./${TARGET}
3446fi
You can’t perform that action at this time.
0 commit comments