Skip to content

Commit 6a3275f

Browse files
Merge pull request #30 from lisa-analyzer/reentrancy-checker
Reentrancy checker
2 parents aa627f6 + e3fb983 commit 6a3275f

File tree

21,652 files changed

+15121785
-97342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

21,652 files changed

+15121785
-97342
lines changed

.github/workflows/docker-image.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Docker build image test'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
docker-test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Build Docker image
20+
run: docker build -t evmlisa:test .
21+
22+
- name: Remove Docker image
23+
run: docker rmi evmlisa:test

.gitignore

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,33 @@
1010
# Ignore output directories that contain generated results
1111
evm-outputs/
1212
test-ground-truth-stats/
13-
evm-testcases/ground-truth/test/logs.txt
14-
evm-testcases/ground-truth/test/statistics.csv
13+
evm-testcases/ground-truth/test-ground-truth-results/logs.txt
14+
evm-testcases/ground-truth/test-ground-truth-results/statistics.csv
15+
16+
# Ignore benchmark results
17+
# SolidiFI reentrancy
18+
scripts/python/journal/reentrancy-solidifi/results/
19+
scripts/python/journal/reentrancy-solidifi/json/
20+
scripts/python/journal/reentrancy-solidifi/bytecode/
21+
scripts/python/journal/vanilla-solidifi/results/
22+
scripts/python/journal/vanilla-solidifi/json/
23+
scripts/python/journal/vanilla-solidifi/bytecode/
24+
25+
# smartbugs reentrancy
26+
scripts/python/journal/reentrancy-smartbugs/results/
27+
scripts/python/journal/reentrancy-smartbugs/json/
28+
scripts/python/journal/reentrancy-smartbugs/bytecode/
29+
30+
# SliSE reentrancy
31+
scripts/python/journal/reentrancy-slise-db1/results/
32+
scripts/python/journal/reentrancy-slise-db1/json/
33+
scripts/python/journal/reentrancy-slise-db1/bytecode/
34+
scripts/python/journal/reentrancy-slise-db1/match-file-index.json
35+
36+
scripts/python/journal/execution/
37+
scripts/python/journal/images/
38+
scripts/python/journal/DAppSCAN/
39+
scripts/python/journal/SliSE/
1540

1641
# Ignore downloaded bytecode
1742
evm-testcases/benchmark/

.project

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
33
<name>evm-lisa</name>
4-
<comment>Project emv-lisa created by Buildship.</comment>
4+
<comment></comment>
55
<projects>
66
</projects>
77
<buildSpec>
@@ -20,15 +20,4 @@
2020
<nature>org.eclipse.jdt.core.javanature</nature>
2121
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
2222
</natures>
23-
<filteredResources>
24-
<filter>
25-
<id>1698415238879</id>
26-
<name></name>
27-
<type>30</type>
28-
<matcher>
29-
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30-
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31-
</matcher>
32-
</filter>
33-
</filteredResources>
3423
</projectDescription>

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,25 @@ This command will initiate the analysis process for the specified smart contract
8888

8989
```
9090
Options:
91-
-a,--address <arg> address of an Ethereum smart contract
92-
-b,--benchmark <arg> filepath of the benchmark suite (i.e., a list of smart contract addresses)
93-
-C,--cores <arg> number of cores to use
94-
-c,--dump-cfg dump the CFG
95-
-d,--dump-analysis <arg> dump the analysis (html, dot)
96-
-D,--download-bytecode download the bytecode, without analyzing it
97-
-f,--filepath <arg> filepath of an EVM bytecode smart contract
98-
-o,--output <arg> output directory path
99-
-q,--stack-size <arg> maximal height of stack
100-
-s,--dump-stats dump statistics
101-
-S,--use-live-storage use the live storage in SLOAD
102-
-w,--stack-set-size <arg> maximal size of stack sets
91+
-a,--address <arg> Address of an Ethereum smart contract.
92+
-b,--benchmark <arg> Filepath of the benchmark.
93+
-c,--cores <arg> Number of cores used in benchmark.
94+
--checker-reentrancy Enable re-entrancy checker.
95+
--checker-txorigin Enable tx-origin checker.
96+
--creation-code Parse bytecode as creation code (instead of runtime code).
97+
--dot Export a dot-notation file.
98+
--download-bytecode Download the bytecode.
99+
--dump-report Dump analysis report.
100+
--dump-stats Dump statistics.
101+
-f,--filepath-bytecode <arg> Filepath of the bytecode file.
102+
--filepath-mnemonic <arg> Filepath of the mnemonic file.
103+
--html Export a graphic HTML report.
104+
--link-unsound-jumps-to-all-jumpdest Link all the unsound jumps to all jumpdest.
105+
-o,--output <arg> Output directory path.
106+
--serialize-inputs Serialize inputs.
107+
--stack-set-size <arg> Dimension of stack-set (default: 8).
108+
--stack-size <arg> Dimension of stack (default: 32).
109+
--use-live-storage Use the live storage in SLOAD.
103110
```
104111

105112
# 🔍 Abstract Stack Set Domain

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ dependencies {
3434
// Apache Commons CLI
3535
implementation 'commons-cli:commons-cli:1.4'
3636

37-
implementation 'io.github.lisa-analyzer:lisa-program:0.1b8'
38-
implementation 'io.github.lisa-analyzer:lisa-analyses:0.1b8'
39-
implementation 'io.github.lisa-analyzer:lisa-sdk:0.1b8'
40-
implementation 'io.github.lisa-analyzer:lisa-imp:0.1b8'
37+
implementation 'io.github.lisa-analyzer:lisa-program:0.1'
38+
implementation 'io.github.lisa-analyzer:lisa-analyses:0.1'
39+
implementation 'io.github.lisa-analyzer:lisa-sdk:0.1'
40+
implementation 'io.github.lisa-analyzer:lisa-imp:0.1'
4141
implementation group: 'commons-cli', name: 'commons-cli', version: '1.5.0'
4242
implementation 'io.github.cdimascio:dotenv-java:3.0.0'
4343

evm-testcases/cfs/add/report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"serializeInputs" : "false",
3232
"serializeResults" : "true",
3333
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
3435
"wideningThreshold" : "5",
3536
"workdir" : "evm-outputs/cfs/add"
3637
}

evm-testcases/cfs/addmod/report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"serializeInputs" : "false",
3232
"serializeResults" : "true",
3333
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
3435
"wideningThreshold" : "5",
3536
"workdir" : "evm-outputs/cfs/addmod"
3637
}

evm-testcases/cfs/and/report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"serializeInputs" : "false",
3232
"serializeResults" : "true",
3333
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
3435
"wideningThreshold" : "5",
3536
"workdir" : "evm-outputs/cfs/and"
3637
}

evm-testcases/cfs/byte/report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"serializeInputs" : "false",
3232
"serializeResults" : "true",
3333
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
3435
"wideningThreshold" : "5",
3536
"workdir" : "evm-outputs/cfs/byte"
3637
}

evm-testcases/cfs/div/report.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"serializeInputs" : "false",
3232
"serializeResults" : "true",
3333
"syntacticChecks" : "",
34+
"useWideningPoints" : "false",
3435
"wideningThreshold" : "5",
3536
"workdir" : "evm-outputs/cfs/div"
3637
}

0 commit comments

Comments
 (0)