diff options
author | DavidKorczynski <david@adalogics.com> | 2021-01-21 11:54:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 03:54:46 -0800 |
commit | 03de1c66f0dcd4cf4a82a4b8652c844dcc3c9bba (patch) | |
tree | 9e5d9ef133de801c01e84db1d8c8d36f963d6374 /projects/httplib2 | |
parent | 8f99fa0170fcd29a5f66a21290f44cc308cab70e (diff) |
httplib2: initial integration. (#5000)
Diffstat (limited to 'projects/httplib2')
-rw-r--r-- | projects/httplib2/Dockerfile | 22 | ||||
-rw-r--r-- | projects/httplib2/build.sh | 35 | ||||
-rw-r--r-- | projects/httplib2/project.yaml | 11 |
3 files changed, 68 insertions, 0 deletions
diff --git a/projects/httplib2/Dockerfile b/projects/httplib2/Dockerfile new file mode 100644 index 00000000..f7dcaf21 --- /dev/null +++ b/projects/httplib2/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2021 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 +RUN git clone --depth 1 https://github.com/httplib2/httplib2 + +COPY build.sh $SRC/ + +WORKDIR $SRC/httplib2 diff --git a/projects/httplib2/build.sh b/projects/httplib2/build.sh new file mode 100644 index 00000000..3a3d0eae --- /dev/null +++ b/projects/httplib2/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash -eu +# Copyright 2021 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. +# +################################################################################ + +pip3 install six +python3 setup.py install + +# Build fuzzers in $OUT. +for fuzzer in $(find ./tests/ -name 'fuzz_*.py'); do + fuzzer_basename=$(basename -s .py $fuzzer) + fuzzer_package=${fuzzer_basename}.pkg + pyinstaller --distpath $OUT --onefile --name $fuzzer_package $fuzzer + + # Create execution wrapper. + echo "#!/bin/sh +# LLVMFuzzerTestOneInput for fuzzer detection. +this_dir=\$(dirname \"\$0\") +LD_PRELOAD=\$this_dir/sanitizer_with_fuzzer.so \ +ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:external_symbolizer_path=\$this_dir/llvm-symbolizer:detect_leaks=0 \ +\$this_dir/$fuzzer_package \$@" > $OUT/$fuzzer_basename + chmod u+x $OUT/$fuzzer_basename +done diff --git a/projects/httplib2/project.yaml b/projects/httplib2/project.yaml new file mode 100644 index 00000000..210aa12a --- /dev/null +++ b/projects/httplib2/project.yaml @@ -0,0 +1,11 @@ +homepage: "https://github.com/httplib2/httplib2" +language: python +primary_contact: "temotor@gmail.com" +auto_ccs: + - "david@adalogics.com" +fuzzing_engines: + - libfuzzer +sanitizers: + - address + - undefined +main_repo: "https://github.com/httplib2/httplib2" |