From 9cc1232c075c1128bac22e6c5abebdeaaa4ef320 Mon Sep 17 00:00:00 2001 From: AdamKorcz <44787359+AdamKorcz@users.noreply.github.com> Date: Tue, 27 Dec 2022 13:38:57 +0000 Subject: [PATCH] knative: move fuzzers to cncf-fuzzing (#9282) Signed-off-by: AdamKorcz Signed-off-by: AdamKorcz --- projects/knative/Dockerfile | 1 + projects/knative/build.sh | 21 +-------------------- 2 files changed, 2 insertions(+), 20 deletions(-) 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