diff --git a/projects/knative/Dockerfile b/projects/knative/Dockerfile index b1ae5fb1f..b576c04c8 100644 --- a/projects/knative/Dockerfile +++ b/projects/knative/Dockerfile @@ -15,6 +15,7 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder-go +RUN git clone --depth 1 https://github.com/cncf/cncf-fuzzing RUN git clone --depth 1 https://github.com/knative/pkg RUN git clone --depth 1 https://github.com/knative/serving WORKDIR $SRC/pkg diff --git a/projects/knative/build.sh b/projects/knative/build.sh index 8cd9bc9b8..5adcfb203 100644 --- a/projects/knative/build.sh +++ b/projects/knative/build.sh @@ -15,23 +15,4 @@ # ################################################################################ -printf "package metrics\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > $SRC/pkg/metrics/registerfuzzdep.go -go mod tidy && go mod vendor -cp $SRC/json_fuzzer.go $SRC/pkg/webhook/json/ -mv $SRC/pkg/webhook/json/decode_test.go $SRC/pkg/webhook/json/decode_test_fuzz.go -compile_go_fuzzer knative.dev/pkg/webhook/json FuzzJsonDecode fuzz_json_decode - -cp $SRC/fuzz_pkg_metrics.go $SRC/pkg/metrics/ -compile_native_go_fuzzer knative.dev/pkg/metrics FuzzNewObservabilityConfigFromConfigMap FuzzNewObservabilityConfigFromConfigMap - -cp $SRC/fuzz_pkg_websocket.go $SRC/pkg/websocket/ -mv $SRC/pkg/websocket/connection_test.go $SRC/pkg/websocket/connection_fuzz.go -compile_native_go_fuzzer knative.dev/pkg/websocket FuzzSendRawMessage FuzzSendRawMessage - -cp $SRC/fuzz_activatornet.go $SRC/serving/pkg/activator/net/ -cd $SRC/serving -mv pkg/activator/net/throttler_test.go pkg/activator/net/throttler_test_fuzz.go -mv pkg/activator/net/revision_backends_test.go pkg/activator/net/revision_backends_test_fuzz.go -printf "package net\nimport _ \"github.com/AdamKorcz/go-118-fuzz-build/testing\"\n" > $SRC/serving/pkg/activator/net/registerfuzzdep.go -go mod tidy && go mod vendor -compile_native_go_fuzzer knative.dev/serving/pkg/activator/net FuzzNewRevisionThrottler FuzzNewRevisionThrottler +$SRC/cncf-fuzzing/projects/knative/build.sh