aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects
diff options
context:
space:
mode:
authorGravatar AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>2022-07-13 17:49:52 +0100
committerGravatar GitHub <noreply@github.com>2022-07-13 12:49:52 -0400
commit060f02a8daa5968f0bad258463279032cae74d26 (patch)
tree3a45cf6a678f8280ea80461fbbdea6650918f689 /projects
parent65b562e175f3b673068d084595bd9bfaaa62823b (diff)
crossplane: Move fuzzer to cncf-fuzzing (#8003)
Signed-off-by: AdamKorcz <adam@adalogics.com>
Diffstat (limited to 'projects')
-rw-r--r--projects/crossplane/Dockerfile3
-rw-r--r--projects/crossplane/build.sh6
-rw-r--r--projects/crossplane/fuzz.go34
3 files changed, 3 insertions, 40 deletions
diff --git a/projects/crossplane/Dockerfile b/projects/crossplane/Dockerfile
index 32071aa8..4068bb84 100644
--- a/projects/crossplane/Dockerfile
+++ b/projects/crossplane/Dockerfile
@@ -16,5 +16,6 @@
FROM gcr.io/oss-fuzz-base/base-builder-go
RUN git clone --depth 1 https://github.com/crossplane/crossplane
-COPY build.sh fuzz.go $SRC/
+RUN git clone --depth 1 https://github.com/cncf/cncf-fuzzing
+COPY build.sh $SRC/
WORKDIR $SRC/crossplane
diff --git a/projects/crossplane/build.sh b/projects/crossplane/build.sh
index 8546158e..5ac52ac6 100644
--- a/projects/crossplane/build.sh
+++ b/projects/crossplane/build.sh
@@ -15,8 +15,4 @@
#
################################################################################
-mv $SRC/fuzz.go $SRC/crossplane/internal/xpkg/
-go mod tidy
-rm /root/go/pkg/mod/github.com/aws/aws-sdk-go-v2/internal/ini@v1.3.11/fuzz.go
-
-compile_go_fuzzer github.com/crossplane/crossplane/internal/xpkg FuzzParse fuzz_parse
+$SRC/cncf-fuzzing/projects/crossplane/build.sh
diff --git a/projects/crossplane/fuzz.go b/projects/crossplane/fuzz.go
deleted file mode 100644
index 8757a31e..00000000
--- a/projects/crossplane/fuzz.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2022 Google LLC
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-package xpkg
-
-import (
- "bytes"
- "context"
- "io/ioutil"
-
- "github.com/crossplane/crossplane-runtime/pkg/parser"
- "k8s.io/apimachinery/pkg/runtime"
-)
-
-func FuzzParse(data []byte) int {
- objScheme := runtime.NewScheme()
- metaScheme := runtime.NewScheme()
- p := parser.New(metaScheme, objScheme)
- r := ioutil.NopCloser(bytes.NewReader(data))
- _, _ = p.Parse(context.TODO(), r)
- return 1
-}