Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions infra/base-images/base-builder/compile_native_go_fuzzer
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,11 @@ function build_native_go_fuzzer() {
tags="-tags gofuzz"

if [[ $SANITIZER == *coverage* ]]; then
current_dir=$(pwd)
mkdir $OUT/rawfuzzers || true
cd $abs_file_dir
go test $tags -c -run $fuzzer -o $OUT/$fuzzer -cover
cp "${fuzzer_filename}" "${OUT}/rawfuzzers/${fuzzer}"

fuzzed_repo=$(go list $tags -f {{.Module}} "$path")
abspath_repo=`go list -m $tags -f {{.Dir}} $fuzzed_repo || go list $tags -f {{.Dir}} $fuzzed_repo`
# give equivalence to absolute paths in another file, as go test -cover uses golangish pkg.Dir
echo "s=$fuzzed_repo"="$abspath_repo"= > $OUT/$fuzzer.gocovpath

cd $current_dir
fuzzed_repo=$(go list $tags -f {{.Module}} "$path")
go-118-fuzz-build $tags -o $fuzzer -sanitizer=coverage -coverpkg=$fuzzed_repo/... -func $function $abs_file_dir
abspath_repo=`go list -m $tags -f {{.Dir}} $fuzzed_repo || go list $tags -f {{.Dir}} $fuzzed_repo`
# give equivalence to absolute paths in another file, as go test -cover uses golangish pkg.Dir
echo "s=$fuzzed_repo"="$abspath_repo"= > $OUT/$fuzzer.gocovpath
else
go-118-fuzz-build $tags -o $fuzzer.a -func $function $abs_file_dir
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer
Expand Down
20 changes: 4 additions & 16 deletions infra/base-images/base-runner/coverage
Original file line number Diff line number Diff line change
Expand Up @@ -137,30 +137,18 @@ function run_go_fuzz_target {
export FUZZ_CORPUS_DIR="$CORPUS_DIR/${target}/"
export FUZZ_PROFILE_NAME="$DUMPS_DIR/$target.perf"

# setup for native go fuzzers
cd $OUT
mkdir -p "testdata/fuzz/${target}"
cp -r "${FUZZ_CORPUS_DIR}" "testdata/fuzz/"

# rewrite libFuzzer corpus to Std Go corpus if native fuzzing
grep "TestFuzzCorpus" $target > /dev/null 2>&1 && $SYSGOPATH/bin/convertcorpus $target "testdata/fuzz/${target}"
cd -

timeout $TIMEOUT $OUT/$target -test.coverprofile $DUMPS_DIR/$target.profdata &> $LOGS_DIR/$target.log
if (( $? != 0 )); then
echo "Error occured while running $target:"
cat $LOGS_DIR/$target.log
fi

# cleanup after native go fuzzers
rm -r "${OUT}/testdata/fuzz/${target}"

# The Go 1.18 fuzzers are renamed to "*_fuzz_.go" during "infra/helper.py build_fuzzers".
# They are are therefore refered to as "*_fuzz_.go" in the profdata files.
# Since the copies named "*_fuzz_.go" do not exist in the file tree during
# The Go 1.18 fuzzers are renamed to "*libFuzzer.go" during "infra/helper.py build_fuzzers".
# They are are therefore refered to as "*_libFuzzer.go" in the profdata files.
# Since the copies named "*_libFuzzer.go" do not exist in the file tree during
# the coverage build, we change the references in the .profdata files
# to the original file names.
#sed -i "s/_test.go_fuzz_.go/_test.go/g" $DUMPS_DIR/$target.profdata
sed -i "s/_libFuzzer.go/_test.go/g" $DUMPS_DIR/$target.profdata
# translate from golangish paths to current absolute paths
cat $OUT/$target.gocovpath | while read i; do sed -i $i $DUMPS_DIR/$target.profdata; done
# cf PATH_EQUIVALENCE_ARGS
Expand Down
1 change: 1 addition & 0 deletions projects/atomic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/uber-go/atomic
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR $SRC/atomic
COPY build.sh fuzz_test.go $SRC/
9 changes: 8 additions & 1 deletion projects/atomic/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@
#
################################################################################

cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/atomic

cp $SRC/fuzz_test.go ./
go mod tidy
printf "package atomic\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy
compile_native_go_fuzzer go.uber.org/atomic FuzzTest FuzzTest
22 changes: 14 additions & 8 deletions projects/cert-manager/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
################################################################################


cp $SRC/pki_fuzzer.go $SRC/cert-manager/pkg/util/pki/

# These test files break the build, so removing; the fuzz tests don't need them
Expand All @@ -32,14 +33,19 @@ go mod tidy
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build=$SRC/go-118-fuzz-build
go mod tidy
compile_native_go_fuzzer github.com/cert-manager/cert-manager/internal/webhook/admission/certificaterequest/approval FuzzValidate FuzzValidate_approval
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/trigger FuzzProcessItem FuzzProcessItem_trigger
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/revisionmanager FuzzProcessItem FuzzProcessItem_revisionmanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/issuing FuzzProcessItem FuzzProcessItem_issuing
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/readiness FuzzProcessItem FuzzProcessItem_readiness
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/keymanager FuzzProcessItem FuzzProcessItem_keymanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/requestmanager FuzzProcessItem FuzzProcessItem_requestmanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificaterequests/vault FuzzVaultCRController FuzzVaultCRController
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificaterequests/venafi FuzzVenafiCRController FuzzVenafiCRController
compile_go_fuzzer github.com/cert-manager/cert-manager/pkg/util/pki FuzzUnmarshalSubjectStringToRDNSequence FuzzUnmarshalSubjectStringToRDNSequence
compile_go_fuzzer github.com/cert-manager/cert-manager/pkg/util/pki FuzzDecodePrivateKeyBytes FuzzDecodePrivateKeyBytes

# temporary fix until https://github.com/golang/go/pull/73824 has been merged
if [ "$SANITIZER" != "coverage" ]
then
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/trigger FuzzProcessItem FuzzProcessItem_trigger
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/revisionmanager FuzzProcessItem FuzzProcessItem_revisionmanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/issuing FuzzProcessItem FuzzProcessItem_issuing
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/readiness FuzzProcessItem FuzzProcessItem_readiness
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/keymanager FuzzProcessItem FuzzProcessItem_keymanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificates/requestmanager FuzzProcessItem FuzzProcessItem_requestmanager
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificaterequests/vault FuzzVaultCRController FuzzVaultCRController
compile_native_go_fuzzer github.com/cert-manager/cert-manager/pkg/controller/certificaterequests/venafi FuzzVenafiCRController FuzzVenafiCRController
fi

1 change: 1 addition & 0 deletions projects/clock/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/benbjohnson/clock
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR clock
COPY build.sh fuzz_test.go $SRC/
9 changes: 8 additions & 1 deletion projects/clock/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
#
################################################################################

cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/clock
printf "package clock\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
mv $SRC/fuzz_test.go $SRC/clock/
go mod tidy
go get github.com/AdamKorcz/go-118-fuzz-build/testing
compile_native_go_fuzzer github.com/benbjohnson/clock FuzzClock FuzzClock
1 change: 1 addition & 0 deletions projects/containerd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ FROM gcr.io/oss-fuzz-base/base-builder-go
RUN apt-get update && apt-get install -y btrfs-progs libc-dev pkg-config libseccomp-dev gcc wget libbtrfs-dev
RUN git clone --depth 1 https://github.com/containerd/containerd
RUN git clone --depth=1 https://github.com/AdamKorcz/instrumentation
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
COPY build.sh $SRC/
WORKDIR $SRC/containerd
8 changes: 8 additions & 0 deletions projects/containerd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
#
################################################################################

cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/containerd
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build

$SRC/containerd/contrib/fuzz/oss_fuzz_build.sh
1 change: 1 addition & 0 deletions projects/demangle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/ianlancetaylor/demangle
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR $SRC/demangle
COPY build.sh fuzz_test.go $SRC/
9 changes: 8 additions & 1 deletion projects/demangle/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
################################################################################

cp $SRC/fuzz_test.go ./
go mod tidy
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/demangle
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
cp $SRC/fuzz_test.go ./
printf "package demangle\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod tidy
compile_native_go_fuzzer github.com/ianlancetaylor/demangle FuzzTest FuzzTest
2 changes: 1 addition & 1 deletion projects/fasthttp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/valyala/fasthttp

RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
COPY build.sh $SRC/
WORKDIR $SRC/fasthttp
12 changes: 11 additions & 1 deletion projects/fasthttp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,18 @@
#
################################################################################

go get github.com/AdamKorcz/go-118-fuzz-build/testing
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd $SRC/fasthttp
printf "package fasthttp\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy

# breaks the coverage build
rm fs_fs_test.go
compile_native_go_fuzzer github.com/valyala/fasthttp FuzzCookieParse fuzzCookieParse
compile_native_go_fuzzer github.com/valyala/fasthttp FuzzVisitHeaderParams fuzzVisitHeaderParams
compile_native_go_fuzzer github.com/valyala/fasthttp FuzzResponseReadLimitBody fuzzResponseReadLimitBody
Expand Down
1 change: 1 addition & 0 deletions projects/fsnotify/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/fsnotify/fsnotify
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR $SRC/fsnotify
COPY build.sh fuzz_test.go $SRC/
10 changes: 8 additions & 2 deletions projects/fsnotify/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@
#
################################################################################

cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/fsnotify

cp $SRC/fuzz_test.go ./
go mod tidy
printf "package fsnotify\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy
echo building
compile_native_go_fuzzer github.com/fsnotify/fsnotify FuzzInotify FuzzInotify
3 changes: 2 additions & 1 deletion projects/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ RUN wget https://go.dev/dl/go1.24.0.linux-amd64.tar.gz \
&& apt-get update \
&& apt-get install -y btrfs-progs libbtrfs-dev

RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
RUN git clone --depth 1 https://github.com/envoyproxy/gateway.git

COPY build.sh $SRC/
COPY build.sh $SRC/
21 changes: 20 additions & 1 deletion projects/gateway/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,23 @@
#
################################################################################

$SRC/gateway/test/fuzz/oss_fuzz_build.sh
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/gateway

set -o nounset
set -o pipefail
set -o errexit
set -x
printf "package envoygateway\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy

# compile native-format fuzzers
compile_native_go_fuzzer github.com/envoyproxy/gateway/test/fuzz FuzzGatewayAPIToXDS FuzzGatewayAPIToXDS

# add seed corpus
zip -j "$OUT"/FuzzGatewayAPIToXDS_seed_corpus.zip "$SRC"/gateway/test/fuzz/testdata/FuzzGatewayAPIToXDS/*
1 change: 1 addition & 0 deletions projects/gitea/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone https://github.com/go-gitea/gitea
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
COPY build.sh $SRC/
WORKDIR $SRC/gitea
12 changes: 11 additions & 1 deletion projects/gitea/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
#
################################################################################

go get github.com/AdamKorcz/go-118-fuzz-build/testing
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/gitea

printf "package routers\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > ./routers/register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy

compile_native_go_fuzzer code.gitea.io/gitea/tests/fuzz FuzzMarkdownRenderRaw fuzz_markdown_render_raw gofuzz
compile_native_go_fuzzer code.gitea.io/gitea/tests/fuzz FuzzMarkupPostProcess fuzz_markup_post_process gofuzz
1 change: 1 addition & 0 deletions projects/go-cmp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/google/go-cmp
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR go-cmp
COPY build.sh fuzz_test.go $SRC/
7 changes: 7 additions & 0 deletions projects/go-cmp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
################################################################################

cp $SRC/fuzz_test.go ./cmp/
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd $SRC/go-cmp
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy
printf "package cmp\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod tidy
Expand Down
1 change: 1 addition & 0 deletions projects/go-humanize/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/dustin/go-humanize
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR $SRC/go-humanize
COPY build.sh fuzz_test.go $SRC/
10 changes: 8 additions & 2 deletions projects/go-humanize/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
################################################################################

cp $SRC/fuzz_test.go ./
go mod tidy
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/go-humanize

go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
printf "package humanize\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod tidy
echo building
compile_native_go_fuzzer github.com/dustin/go-humanize FuzzParseBytes FuzzParseBytes
1 change: 1 addition & 0 deletions projects/go-readline/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/chzyer/readline
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR readline
COPY build.sh fuzz_test.go $SRC/
10 changes: 8 additions & 2 deletions projects/go-readline/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
#
################################################################################

go mod tidy
cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/readline
cp $SRC/fuzz_test.go ./
printf "package readline\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > ./register.go
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
go mod tidy
cp $SRC/fuzz_test.go ./
compile_native_go_fuzzer github.com/chzyer/readline FuzzReadline FuzzReadline
1 change: 1 addition & 0 deletions projects/go-shlex/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/google/shlex
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR $SRC/shlex
COPY build.sh fuzz_test.go $SRC/
9 changes: 7 additions & 2 deletions projects/go-shlex/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
#
################################################################################

cd "$SRC"/go-118-fuzz-build
go build
rm "$GOPATH"/bin/go-118-fuzz-build
mv go-118-fuzz-build "$GOPATH"/bin/

cd "$SRC"/shlex
go mod edit -replace github.com/AdamKorcz/go-118-fuzz-build="$SRC"/go-118-fuzz-build
cp $SRC/fuzz_test.go ./
go mod tidy
printf "package shlex\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > register.go
go mod tidy
echo building
compile_native_go_fuzzer github.com/google/shlex FuzzLexer FuzzLexer
1 change: 1 addition & 0 deletions projects/go-yaml/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/go-yaml/yaml
RUN git clone --depth=1 --branch=november-backup https://github.com/AdamKorcz/go-118-fuzz-build
WORKDIR yaml
COPY build.sh fuzz_test.go $SRC/
Loading
Loading