Skip to content

Commit

Permalink
Pdfplumber: Integration (#12949)
Browse files Browse the repository at this point in the history
This pull request integrates the Dockerfile needed to build the fuzzers
for pdfplumber.

Note: The fuzzers were NOT merged upstream following discussion with the
project maintainer
[here](jsvine/pdfplumber#1245 (comment))
and with the precedence for out-of-repo fuzzers established
[here](#12467)

---------

Co-authored-by: bcapuano <[email protected]>
Co-authored-by: Bailey Capuano <[email protected]>
  • Loading branch information
3 people authored Jan 27, 2025
1 parent 7e8d53b commit ad1d940
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions projects/pdfplumber/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2025 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 pip3 install --upgrade pip
RUN mkdir $SRC/corpus

# Upstream wants fuzzers hosted elsewhere, so pull them from fork (https://github.com/jsvine/pdfplumber/pull/1245#issuecomment-2581682100)
RUN git clone --depth 1 https://github.com/ennamarie19/pdfplumber.git pdfplumber_fuzzer

RUN git clone --depth 1 https://github.com/jsvine/pdfplumber.git pdfplumber \
&& rm -rf pdfplumber/fuzz # Remove the directory, if it exists
RUN cp -r pdfplumber_fuzzer/fuzz pdfplumber \
&& cp pdfplumber/fuzz/build.sh $SRC/
WORKDIR $SRC/pdfplumber

0 comments on commit ad1d940

Please sign in to comment.