aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects
diff options
context:
space:
mode:
authorGravatar AdamKorcz <44787359+AdamKorcz@users.noreply.github.com>2022-07-12 14:54:40 +0100
committerGravatar GitHub <noreply@github.com>2022-07-12 13:54:40 +0000
commiteac26e48ee32ea607d4c34d4bd10ee78954228de (patch)
tree65158ab3b2d2b9a61f5c1c54dbbfc44b28b4d391 /projects
parent0975cbfc0aa085ffaca8a5a5150f098db86d7c3e (diff)
[crossplane] Initial integration (#5422)
* [crossplane] Initial integration Signed-off-by: AdamKorcz <adam@adalogics.com> * Update Dockerfile * Update build.sh * Update fuzz.go Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>
Diffstat (limited to 'projects')
-rw-r--r--projects/crossplane/Dockerfile20
-rw-r--r--projects/crossplane/build.sh22
-rw-r--r--projects/crossplane/fuzz.go34
-rw-r--r--projects/crossplane/project.yaml13
4 files changed, 89 insertions, 0 deletions
diff --git a/projects/crossplane/Dockerfile b/projects/crossplane/Dockerfile
new file mode 100644
index 00000000..32071aa8
--- /dev/null
+++ b/projects/crossplane/Dockerfile
@@ -0,0 +1,20 @@
+# 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.
+#
+################################################################################
+
+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/
+WORKDIR $SRC/crossplane
diff --git a/projects/crossplane/build.sh b/projects/crossplane/build.sh
new file mode 100644
index 00000000..8546158e
--- /dev/null
+++ b/projects/crossplane/build.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -eu
+# 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.
+#
+################################################################################
+
+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
diff --git a/projects/crossplane/fuzz.go b/projects/crossplane/fuzz.go
new file mode 100644
index 00000000..8757a31e
--- /dev/null
+++ b/projects/crossplane/fuzz.go
@@ -0,0 +1,34 @@
+// 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
+}
diff --git a/projects/crossplane/project.yaml b/projects/crossplane/project.yaml
new file mode 100644
index 00000000..dd8237c9
--- /dev/null
+++ b/projects/crossplane/project.yaml
@@ -0,0 +1,13 @@
+homepage: "https://github.com/crossplane/crossplane"
+main_repo: "https://github.com/crossplane/crossplane"
+primary_contact: "jbw976@gmail.com"
+auto_ccs :
+ - "me@muvaf.com"
+ - "nicc@rk0n.org"
+vendor_ccs :
+ - "adam@adalogics.com"
+language: go
+fuzzing_engines:
+ - libfuzzer
+sanitizers:
+ - address