mirror of https://github.com/google/oss-fuzz.git
python-phonenumbers: initial integration (#9369)
Fuzzer for Python port of Google's libphonenumber [Tests mentioned](https://google.github.io/oss-fuzz/getting-started/new-project-guide/#testing-locally) in docs have been run: ``` python infra/helper.py build_image python-phonenumbers python infra/helper.py build_fuzzers --sanitizer address python-phonenumbers python infra/helper.py check_build python-phonenumbers python infra/helper.py run_fuzzer python-phonenumbers python_phonenumbers_fuzzer ```
This commit is contained in:
parent
6211c9d86e
commit
f59601ac2b
|
@ -0,0 +1,27 @@
|
|||
# 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-python
|
||||
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool
|
||||
RUN git clone --depth 1 https://github.com/daviddrysdale/python-phonenumbers.git python-phonenumbers
|
||||
RUN git clone --depth 1 https://github.com/rikfie/python-phonenumbers-fuzzer.git ppf && \
|
||||
mv ppf/*_fuzzer.py $SRC/ && \
|
||||
rm -rf ppf
|
||||
|
||||
WORKDIR python-phonenumbers/python
|
||||
|
||||
COPY build.sh $SRC/
|
|
@ -0,0 +1,24 @@
|
|||
#!/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.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
pip3 install --upgrade pip
|
||||
pip3 install .
|
||||
|
||||
# Build fuzzers in $OUT.
|
||||
for fuzzer in $(find $SRC -name '*_fuzzer.py'); do
|
||||
compile_python_fuzzer $fuzzer
|
||||
done
|
|
@ -0,0 +1,11 @@
|
|||
homepage: "https://github.com/daviddrysdale/python-phonenumbers"
|
||||
language: python
|
||||
primary_contact: "rik@purpleguy.nl"
|
||||
auto_ccs:
|
||||
- "drysdale@google.com"
|
||||
main_repo: "https://github.com/daviddrysdale/python-phonenumbers.git"
|
||||
fuzzing_engines:
|
||||
- libfuzzer
|
||||
sanitizers:
|
||||
- address
|
||||
- undefined
|
Loading…
Reference in New Issue