aboutsummaryrefslogtreecommitdiff
path: root/projects/gcloud-go
diff options
context:
space:
mode:
authorOliver Chang <oliverchang@users.noreply.github.com>2020-09-25 12:00:32 +1000
committerGitHub <noreply@github.com>2020-09-25 12:00:32 +1000
commitffc4bb4f9b9aae3c9f53d21a5379243033e42eaf (patch)
tree02de418eb16825e6adf3fdb952923e0d9be74b3e /projects/gcloud-go
parent9c86c342583b53363df1a03c0ed4bd0e7b2e2ebf (diff)
downloadoss-fuzz-ffc4bb4f9b9aae3c9f53d21a5379243033e42eaf.tar.gz
Rename google-cloud-go to gcloud-go. (#4480)
google-cloud-go causes issues as "google" is not allowed in bucket names.
Diffstat (limited to 'projects/gcloud-go')
-rw-r--r--projects/gcloud-go/Dockerfile21
-rw-r--r--projects/gcloud-go/build.sh28
-rw-r--r--projects/gcloud-go/project.yaml7
3 files changed, 56 insertions, 0 deletions
diff --git a/projects/gcloud-go/Dockerfile b/projects/gcloud-go/Dockerfile
new file mode 100644
index 000000000..1d2b38e53
--- /dev/null
+++ b/projects/gcloud-go/Dockerfile
@@ -0,0 +1,21 @@
+# 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
+LABEL maintainer="codyoss@google.com"
+RUN go get cloud.google.com/go/spanner
+COPY build.sh $SRC/
+WORKDIR $SRC/
diff --git a/projects/gcloud-go/build.sh b/projects/gcloud-go/build.sh
new file mode 100644
index 000000000..38db5cb90
--- /dev/null
+++ b/projects/gcloud-go/build.sh
@@ -0,0 +1,28 @@
+#!/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
+}
+
+compile_fuzzer cloud.google.com/go/spanner/spansql FuzzParseQuery fuzz_parse_query
diff --git a/projects/gcloud-go/project.yaml b/projects/gcloud-go/project.yaml
new file mode 100644
index 000000000..f336624e0
--- /dev/null
+++ b/projects/gcloud-go/project.yaml
@@ -0,0 +1,7 @@
+homepage: "https://github.com/googleapis/google-cloud-go"
+primary_contact: "codyoss@google.com"
+language: go
+fuzzing_engines:
+ - libfuzzer
+sanitizers:
+ - address