diff --git a/source/support/test/oyente/Dockerfile b/source/support/test/oyente/Dockerfile index bcdb977a3..6877440b2 100644 --- a/source/support/test/oyente/Dockerfile +++ b/source/support/test/oyente/Dockerfile @@ -11,18 +11,12 @@ RUN apt-get update \ && apt-get install -y software-properties-common \ && apt-get install -y unzip -RUN wget --quiet https://github.com/Z3Prover/z3/archive/z3-4.5.0.zip \ - && unzip z3-4.5.0.zip -d /tmp \ - && cd /tmp/z3-z3-4.5.0 \ - && python scripts/mk_make.py --python \ +RUN cd /tmp && git clone https://github.com/Z3Prover/z3.git && cd z3 \ + && python scripts/mk_make.py --python --debug --trace \ && cd build \ - && make \ + && make -j8 \ && make install -RUN wget --quiet https://github.com/melonproject/oyente/archive/master.zip \ - && unzip master.zip -d /tmp \ - && mv /tmp/oyente-master/oyente /usr/local/lib/python2.7/site-packages - RUN wget --quiet https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.8.2-b8b9f7f4.tar.gz \ && tar -xvf geth-alltools-linux-amd64-1.8.2-b8b9f7f4.tar.gz \ && chmod a+x geth-alltools-linux-amd64-1.8.2-b8b9f7f4/* \ @@ -34,11 +28,13 @@ RUN pip install --upgrade pip setuptools \ && pip install --upgrade pip-tools \ && pip install requests +RUN pip install --no-dependencies git+https://github.com/cryptomental/oyente.git@feature/exclude-selected-vulnerabilities + # Copy source COPY source/contracts/ /app/source/contracts/ COPY source/tools/ /app/source/tools/ # Run the oyente test script -RUN python source/tools/runOyente.py -p +RUN python source/tools/runOyente.py -p -a -v ENTRYPOINT ["npm"] diff --git a/source/tools/runOyente.py b/source/tools/runOyente.py index efdf19219..052c31947 100644 --- a/source/tools/runOyente.py +++ b/source/tools/runOyente.py @@ -35,14 +35,15 @@ def main(): root.addHandler(ch) global_params.CHECK_ASSERTIONS = 1 + global_params.IGNORE_VULNERABILITIES = ["AssertionFailure", "MoneyConcurrency"] + global_params.DEBUG_MODE = 1 results, exit_code = run_solidity_analysis(inputs) if input_args.analyze: analyze_results(results) - # We have a bunch of stuff that is erroneous at the moment - exit(0) + exit(exit_code) def generate_inputs(): inputs = []