Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions source/support/test/oyente/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/* \
Expand All @@ -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"]
5 changes: 3 additions & 2 deletions source/tools/runOyente.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down