diff options
-rw-r--r-- | projects/json-sanitizer/Dockerfile | 17 | ||||
-rwxr-xr-x | projects/json-sanitizer/build.sh | 5 |
2 files changed, 12 insertions, 10 deletions
diff --git a/projects/json-sanitizer/Dockerfile b/projects/json-sanitizer/Dockerfile index 05a3b1fc..f36a1362 100644 --- a/projects/json-sanitizer/Dockerfile +++ b/projects/json-sanitizer/Dockerfile @@ -22,15 +22,14 @@ RUN git clone --depth 1 https://github.com/google/fuzzing RUN cat fuzzing/dictionaries/json.dict \ fuzzing/dictionaries/html.dict \ fuzzing/dictionaries/xml.dict \ - > $OUT/DenylistFuzzer.dict -RUN cat fuzzing/dictionaries/json.dict \ - fuzzing/dictionaries/html.dict \ - fuzzing/dictionaries/xml.dict \ - > $OUT/IdempotenceFuzzer.dict -RUN cat fuzzing/dictionaries/json.dict \ - fuzzing/dictionaries/html.dict \ - fuzzing/dictionaries/xml.dict \ - > $OUT/ValidJsonFuzzer.dict + > $SRC/DenylistFuzzer.dict +RUN cp fuzzing/dictionaries/json.dict $SRC/IdempotenceFuzzer.dict +RUN cp fuzzing/dictionaries/json.dict $SRC/ValidJsonFuzzer.dict + +RUN git clone --depth 1 https://github.com/dvyukov/go-fuzz-corpus && \ + zip -q $SRC/DenylistFuzzer_seed_corpus.zip go-fuzz-corpus/json/corpus/* && \ + zip -q $SRC/IdempotenceFuzzer_seed_corpus.zip go-fuzz-corpus/json/corpus/* && \ + zip -q $SRC/ValidJsonFuzzer_seed_corpus.zip go-fuzz-corpus/json/corpus/* RUN git clone --depth 1 https://github.com/OWASP/json-sanitizer COPY build.sh $SRC/ diff --git a/projects/json-sanitizer/build.sh b/projects/json-sanitizer/build.sh index 4010f884..64df5e5c 100755 --- a/projects/json-sanitizer/build.sh +++ b/projects/json-sanitizer/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -# Copyright 2021 Google Inc. +# 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. @@ -15,6 +15,9 @@ # ################################################################################ +# Move seed corpus and dictionary. +mv $SRC/{*.zip,*.dict} $OUT + # Build the json-sanitizer jar. CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \ -Dexpression=project.version -q -DforceStdout) |