diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-03-22 17:22:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 09:22:00 -0700 |
commit | 54b71a17d99112c24a0f440a4894013381b0ed24 (patch) | |
tree | 32e07ccc1b7d2fb12e04a3f22161dbb837e91fe6 | |
parent | a033165b14547c3607cfa6181607ad4a032ba9e2 (diff) |
[json-sanitizer] Fix dictionaries and add corpora (#5469)
-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) |