forked from google/oss-fuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[firestore] Add Firestore sdk project (google#1645)
* Add Firestore project * Firestore project docker image and build script * Firestore project docker image and build script * Clone Firebase from Git and build with Fuzzing * Add a collaborator and comments for cmake version * Moving fuzzing target to test folder
- Loading branch information
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2018 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 varconst@google.com | ||
RUN apt-get update && apt-get install -y make autoconf automake libtool wget golang | ||
RUN git clone --depth 1 https://github.com/firebase/firebase-ios-sdk.git | ||
COPY build.sh $SRC/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash -eu | ||
# Copyright 2018 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. | ||
# | ||
################################################################################ | ||
|
||
# The cmake version that is available on Ubuntu 16.04 is 3.5.1. While Firestore | ||
# itself requires cmake 3.5, it depends on leveldb which requires cmake 3.9 | ||
# (https://github.com/google/leveldb/blob/master/CMakeLists.txt#L5). | ||
# There is an open issue (https://github.com/google/leveldb/issues/607) to | ||
# lower the required cmake version of leveldb. Therefore, we need to download | ||
# a newer version of cmake until leveldb lowers the required version or a newer | ||
# cmake version becomes available in the OSS Fuzz environment. | ||
cd $WORK | ||
wget https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.tar.gz | ||
tar -xzf cmake-3.12.0-Linux-x86_64.tar.gz | ||
rm cmake-3.12.0-Linux-x86_64.tar.gz | ||
|
||
# Build the project using cmake with FUZZING option enabled to link to OSS Fuzz | ||
# fuzzing library defined in ${LIB_FUZZING_ENGINE}. | ||
cd $SRC/firebase-ios-sdk | ||
mkdir build && cd build | ||
$WORK/cmake-3.12.0-Linux-x86_64/bin/cmake -DFUZZING=ON .. | ||
make -j$(nproc) | ||
|
||
# Copy fuzzing targets, dictionaries, and zipped corpora to $OUT. | ||
FUZZERS_DIR=Firestore/core/test/firebase/firestore/fuzzing | ||
find ${FUZZERS_DIR} -name '*_fuzzer' -exec cp -v '{}' $OUT ';' | ||
find ${FUZZERS_DIR} -name '*_fuzzer.dict' -exec cp -v '{}' $OUT ';' | ||
find ${FUZZERS_DIR} -name "*_fuzzer_seed_corpus" -type d -execdir zip -r ${OUT}/{}.zip {} ';' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
homepage: "https://firebase.google.com/docs/firestore/" | ||
primary_contact: "varconst@google.com" | ||
auto_ccs: | ||
- "varconst@google.com" | ||
- "minafarid@google.com" | ||
- "rgowman@google.com" | ||
sanitizers: | ||
- address | ||
- undefined |