aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--projects/dragonfly/Dockerfile34
-rwxr-xr-xprojects/dragonfly/build.sh30
-rw-r--r--projects/dragonfly/project.yaml9
3 files changed, 73 insertions, 0 deletions
diff --git a/projects/dragonfly/Dockerfile b/projects/dragonfly/Dockerfile
new file mode 100644
index 00000000..932c86f2
--- /dev/null
+++ b/projects/dragonfly/Dockerfile
@@ -0,0 +1,34 @@
+# Copyright 2020 Google Inc.
+#
+# 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
+MAINTAINER zj3142063@gmail.com
+RUN go get github.com/go-openapi/swag \
+ github.com/go-openapi/validate \
+ gopkg.in/warnings.v0 \
+ github.com/gorilla/mux \
+ github.com/prometheus/client_golang/prometheus \
+ github.com/pkg/errors \
+ github.com/sirupsen/logrus \
+ gopkg.in/gcfg.v1 \
+ github.com/valyala/fasthttp \
+ gopkg.in/natefinch/lumberjack.v2 \
+ github.com/emirpasic/gods/maps/treemap \
+ github.com/emirpasic/gods/utils \
+ github.com/willf/bitset
+RUN git clone https://github.com/dragonflyoss/Dragonfly
+COPY build.sh $SRC/
+WORKDIR $SRC/
diff --git a/projects/dragonfly/build.sh b/projects/dragonfly/build.sh
new file mode 100755
index 00000000..432d7651
--- /dev/null
+++ b/projects/dragonfly/build.sh
@@ -0,0 +1,30 @@
+#/bin/bash -eu
+# Copyright 2020 Google Inc.
+#
+# 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.
+#
+################################################################################
+function compile_fuzzer {
+ path=$1
+ function=$2
+ fuzzer=$3
+
+ go-fuzz -func $function -o $fuzzer.a $path
+
+ $CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -o $OUT/$fuzzer
+}
+mkdir $GOPATH/src/github.com/dragonflyoss
+cp -r $SRC/Dragonfly $GOPATH/src/github.com/dragonflyoss/
+
+compile_fuzzer github.com/dragonflyoss/Dragonfly/dfget/core/uploader FuzzParseParams uploader_fuzz
+compile_fuzzer github.com/dragonflyoss/Dragonfly/supernode/daemon/mgr/cdn Fuzz cdn_fuzz
diff --git a/projects/dragonfly/project.yaml b/projects/dragonfly/project.yaml
new file mode 100644
index 00000000..1b297eb0
--- /dev/null
+++ b/projects/dragonfly/project.yaml
@@ -0,0 +1,9 @@
+homepage: "https://github.com/dragonflyoss/Dragonfly"
+primary_contact: "zj3142063@gmail.com"
+auto_ccs :
+ - "adam@adalogics.com"
+language: go
+fuzzing_engines:
+ - libfuzzer
+sanitizers:
+ - address