mirror of https://github.com/crytic/slither
commit
09c559c148
@ -1,60 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "msg.sender.send(this.balance)", |
||||
"source_mapping": { |
||||
"filename": "tests/arbitrary_send.sol", |
||||
"length": 29, |
||||
"lines": [ |
||||
12 |
||||
], |
||||
"start": 174 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "direct", |
||||
"source_mapping": { |
||||
"filename": "tests/arbitrary_send.sol", |
||||
"length": 63, |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13 |
||||
], |
||||
"start": 147 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "destination.send(this.balance)", |
||||
"source_mapping": { |
||||
"filename": "tests/arbitrary_send.sol", |
||||
"length": 30, |
||||
"lines": [ |
||||
20 |
||||
], |
||||
"start": 307 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "indirect", |
||||
"source_mapping": { |
||||
"filename": "tests/arbitrary_send.sol", |
||||
"length": 66, |
||||
"lines": [ |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"start": 278 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "arbitrary-send", "impact": "High", "confidence": "Medium", "description": "Test.direct (tests/arbitrary_send.sol#11-13) sends eth to arbirary user\n\tDangerous calls:\n\t- msg.sender.send(this.balance) (tests/arbitrary_send.sol#12)\n", "function": {"name": "direct", "source_mapping": {"start": 147, "length": 63, "filename": "tests/arbitrary_send.sol", "lines": [11, 12, 13]}, "contract": {"name": "Test", "source_mapping": {"start": 0, "length": 809, "filename": "tests/arbitrary_send.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41]}}}, "expressions": [{"expression": "msg.sender.send(this.balance)", "source_mapping": {"start": 174, "length": 29, "filename": "tests/arbitrary_send.sol", "lines": [12]}}]}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium", "description": "Test.indirect (tests/arbitrary_send.sol#19-21) sends eth to arbirary user\n\tDangerous calls:\n\t- destination.send(this.balance) (tests/arbitrary_send.sol#20)\n", "function": {"name": "indirect", "source_mapping": {"start": 278, "length": 66, "filename": "tests/arbitrary_send.sol", "lines": [19, 20, 21]}, "contract": {"name": "Test", "source_mapping": {"start": 0, "length": 809, "filename": "tests/arbitrary_send.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41]}}}, "expressions": [{"expression": "destination.send(this.balance)", "source_mapping": {"start": 307, "length": 30, "filename": "tests/arbitrary_send.sol", "lines": [20]}}]}] |
@ -1 +1 @@ |
||||
[{"check": "backdoor", "function": {"name": "i_am_a_backdoor", "source_mapping": {"start": 18, "length": 74, "filename": "tests/backdoor.sol", "lines": [4, 5, 6]}}}] |
||||
[{"check": "backdoor", "impact": "High", "confidence": "High", "description": "Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)\n", "function": {"name": "i_am_a_backdoor", "source_mapping": {"start": 18, "length": 74, "filename": "tests/backdoor.sol", "lines": [4, 5, 6]}, "contract": {"name": "C", "source_mapping": {"start": 1, "length": 94, "filename": "tests/backdoor.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}}] |
@ -1 +1 @@ |
||||
[{"check": "suicidal", "function": {"name": "i_am_a_backdoor", "source_mapping": {"start": 18, "length": 74, "filename": "tests/backdoor.sol", "lines": [4, 5, 6]}}}] |
||||
[{"check": "suicidal", "impact": "High", "confidence": "High", "description": "C.i_am_a_backdoor (tests/backdoor.sol#4-6) allows anyone to destruct the contract\n", "function": {"name": "i_am_a_backdoor", "source_mapping": {"start": 18, "length": 74, "filename": "tests/backdoor.sol", "lines": [4, 5, 6]}, "contract": {"name": "C", "source_mapping": {"start": 1, "length": 94, "filename": "tests/backdoor.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}}] |
@ -1,56 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "constable-states", |
||||
"variables": [ |
||||
{ |
||||
"name": "myFriendsAddress", |
||||
"source_mapping": { |
||||
"filename": "tests/const_state_variables.sol", |
||||
"length": 76, |
||||
"lines": [ |
||||
7 |
||||
], |
||||
"start": 130 |
||||
} |
||||
}, |
||||
{ |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"filename": "tests/const_state_variables.sol", |
||||
"length": 20, |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"start": 235 |
||||
} |
||||
}, |
||||
{ |
||||
"name": "text2", |
||||
"source_mapping": { |
||||
"filename": "tests/const_state_variables.sol", |
||||
"length": 20, |
||||
"lines": [ |
||||
14 |
||||
], |
||||
"start": 331 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"variables": [ |
||||
{ |
||||
"name": "mySistersAddress", |
||||
"source_mapping": { |
||||
"filename": "tests/const_state_variables.sol", |
||||
"length": 76, |
||||
"lines": [ |
||||
26 |
||||
], |
||||
"start": 494 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
[{"check": "constable-states", "impact": "Informational", "confidence": "High", "description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\nA.test should be constant (tests/const_state_variables.sol#10)\nA.text2 should be constant (tests/const_state_variables.sol#14)\n", "variables": [{"name": "myFriendsAddress", "source_mapping": {"start": 130, "length": 76, "filename": "tests/const_state_variables.sol", "lines": [7]}}, {"name": "test", "source_mapping": {"start": 235, "length": 20, "filename": "tests/const_state_variables.sol", "lines": [10]}}, {"name": "text2", "source_mapping": {"start": 331, "length": 20, "filename": "tests/const_state_variables.sol", "lines": [14]}}]}, {"check": "constable-states", "impact": "Informational", "confidence": "High", "description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", "variables": [{"name": "mySistersAddress", "source_mapping": {"start": 494, "length": 76, "filename": "tests/const_state_variables.sol", "lines": [26]}}]}] |
@ -1,80 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "constant-function", |
||||
"contains_assembly": false, |
||||
"function": { |
||||
"name": "test_view_bug", |
||||
"source_mapping": { |
||||
"filename": "tests/constant.sol", |
||||
"length": 58, |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"start": 45 |
||||
} |
||||
}, |
||||
"variables": [ |
||||
{ |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"filename": "tests/constant.sol", |
||||
"length": 6, |
||||
"lines": [ |
||||
3 |
||||
], |
||||
"start": 28 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constant-function", |
||||
"contains_assembly": false, |
||||
"function": { |
||||
"name": "test_constant_bug", |
||||
"source_mapping": { |
||||
"filename": "tests/constant.sol", |
||||
"length": 66, |
||||
"lines": [ |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"start": 113 |
||||
} |
||||
}, |
||||
"variables": [ |
||||
{ |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"filename": "tests/constant.sol", |
||||
"length": 6, |
||||
"lines": [ |
||||
3 |
||||
], |
||||
"start": 28 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constant-function", |
||||
"contains_assembly": true, |
||||
"function": { |
||||
"name": "test_assembly_bug", |
||||
"source_mapping": { |
||||
"filename": "tests/constant.sol", |
||||
"length": 66, |
||||
"lines": [ |
||||
22, |
||||
23, |
||||
24 |
||||
], |
||||
"start": 324 |
||||
} |
||||
}, |
||||
"variables": [] |
||||
} |
||||
] |
||||
[{"check": "constant-function", "impact": "Medium", "confidence": "Medium", "description": "Constant.test_view_bug (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a\n", "function": {"name": "test_view_bug", "source_mapping": {"start": 45, "length": 58, "filename": "tests/constant.sol", "lines": [5, 6, 7]}, "contract": {"name": "Constant", "source_mapping": {"start": 0, "length": 392, "filename": "tests/constant.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}}, "variables": [{"name": "a", "source_mapping": {"start": 28, "length": 6, "filename": "tests/constant.sol", "lines": [3]}}], "contains_assembly": false}, {"check": "constant-function", "impact": "Medium", "confidence": "Medium", "description": "Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a\n", "function": {"name": "test_constant_bug", "source_mapping": {"start": 113, "length": 66, "filename": "tests/constant.sol", "lines": [9, 10, 11]}, "contract": {"name": "Constant", "source_mapping": {"start": 0, "length": 392, "filename": "tests/constant.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}}, "variables": [{"name": "a", "source_mapping": {"start": 28, "length": 6, "filename": "tests/constant.sol", "lines": [3]}}], "contains_assembly": false}, {"check": "constant-function", "impact": "Medium", "confidence": "Medium", "description": "Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code\n", "function": {"name": "test_assembly_bug", "source_mapping": {"start": 324, "length": 66, "filename": "tests/constant.sol", "lines": [22, 23, 24]}, "contract": {"name": "Constant", "source_mapping": {"start": 0, "length": 392, "filename": "tests/constant.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}}, "variables": [], "contains_assembly": true}] |
@ -1,61 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "controlled-delegatecall", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "addr_bad.delegatecall(data)", |
||||
"source_mapping": { |
||||
"filename": "tests/controlled_delegatecall.sol", |
||||
"length": 27, |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"start": 178 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "bad_delegate_call", |
||||
"source_mapping": { |
||||
"filename": "tests/controlled_delegatecall.sol", |
||||
"length": 120, |
||||
"lines": [ |
||||
8, |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"start": 92 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "controlled-delegatecall", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "addr_bad.delegatecall(func_id,data)", |
||||
"source_mapping": { |
||||
"filename": "tests/controlled_delegatecall.sol", |
||||
"length": 36, |
||||
"lines": [ |
||||
19 |
||||
], |
||||
"start": 356 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "bad_delegate_call2", |
||||
"source_mapping": { |
||||
"filename": "tests/controlled_delegatecall.sol", |
||||
"length": 92, |
||||
"lines": [ |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"start": 307 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium", "description": "C.bad_delegate_call (tests/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\taddr_bad.delegatecall(data) (tests/controlled_delegatecall.sol#10)\n", "function": {"name": "bad_delegate_call", "source_mapping": {"start": 92, "length": 120, "filename": "tests/controlled_delegatecall.sol", "lines": [8, 9, 10, 11]}, "contract": {"name": "C", "source_mapping": {"start": 0, "length": 505, "filename": "tests/controlled_delegatecall.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}}, "expressions": [{"expression": "addr_bad.delegatecall(data)", "source_mapping": {"start": 178, "length": 27, "filename": "tests/controlled_delegatecall.sol", "lines": [10]}}]}, {"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium", "description": "C.bad_delegate_call2 (tests/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\taddr_bad.delegatecall(func_id,data) (tests/controlled_delegatecall.sol#19)\n", "function": {"name": "bad_delegate_call2", "source_mapping": {"start": 307, "length": 92, "filename": "tests/controlled_delegatecall.sol", "lines": [18, 19, 20]}, "contract": {"name": "C", "source_mapping": {"start": 0, "length": 505, "filename": "tests/controlled_delegatecall.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}}}, "expressions": [{"expression": "addr_bad.delegatecall(func_id,data)", "source_mapping": {"start": 356, "length": 36, "filename": "tests/controlled_delegatecall.sol", "lines": [19]}}]}] |
@ -1,71 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "external-function", |
||||
"function": { |
||||
"name": "funcNotCalled3", |
||||
"source_mapping": { |
||||
"filename": "tests/external_function.sol", |
||||
"length": 41, |
||||
"lines": [ |
||||
13, |
||||
14, |
||||
15 |
||||
], |
||||
"start": 257 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"function": { |
||||
"name": "funcNotCalled2", |
||||
"source_mapping": { |
||||
"filename": "tests/external_function.sol", |
||||
"length": 41, |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19 |
||||
], |
||||
"start": 304 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"function": { |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"filename": "tests/external_function.sol", |
||||
"length": 40, |
||||
"lines": [ |
||||
21, |
||||
22, |
||||
23 |
||||
], |
||||
"start": 351 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"function": { |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"filename": "tests/external_function.sol", |
||||
"length": 304, |
||||
"lines": [ |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39 |
||||
], |
||||
"start": 552 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "external-function", "impact": "Informational", "confidence": "High", "description": "ContractWithFunctionNotCalled.funcNotCalled3 (tests/external_function.sol#13-15) should be declared external\n", "function": {"name": "funcNotCalled3", "source_mapping": {"start": 257, "length": 41, "filename": "tests/external_function.sol", "lines": [13, 14, 15]}, "contract": {"name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 211, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}}, {"check": "external-function", "impact": "Informational", "confidence": "High", "description": "ContractWithFunctionNotCalled.funcNotCalled2 (tests/external_function.sol#17-19) should be declared external\n", "function": {"name": "funcNotCalled2", "source_mapping": {"start": 304, "length": 41, "filename": "tests/external_function.sol", "lines": [17, 18, 19]}, "contract": {"name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 211, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}}, {"check": "external-function", "impact": "Informational", "confidence": "High", "description": "ContractWithFunctionNotCalled.funcNotCalled (tests/external_function.sol#21-23) should be declared external\n", "function": {"name": "funcNotCalled", "source_mapping": {"start": 351, "length": 40, "filename": "tests/external_function.sol", "lines": [21, 22, 23]}, "contract": {"name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 211, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}}, {"check": "external-function", "impact": "Informational", "confidence": "High", "description": "ContractWithFunctionNotCalled2.funcNotCalled (tests/external_function.sol#32-39) should be declared external\n", "function": {"name": "funcNotCalled", "source_mapping": {"start": 552, "length": 304, "filename": "tests/external_function.sol", "lines": [32, 33, 34, 35, 36, 37, 38, 39]}, "contract": {"name": "ContractWithFunctionNotCalled2", "source_mapping": {"start": 471, "length": 387, "filename": "tests/external_function.sol", "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]}}}}] |
@ -1,55 +1 @@ |
||||
[ |
||||
{ |
||||
"assembly": [ |
||||
{ |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_contract.sol", |
||||
"length": 628, |
||||
"lines": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"start": 191 |
||||
} |
||||
} |
||||
], |
||||
"check": "assembly", |
||||
"function": { |
||||
"name": "at", |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_contract.sol", |
||||
"length": 700, |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"start": 119 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20)\n\t- tests/inline_assembly_contract.sol#7-20\n", "function": {"name": "at", "source_mapping": {"start": 119, "length": 700, "filename": "tests/inline_assembly_contract.sol", "lines": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, "contract": {"name": "GetCode", "source_mapping": {"start": 97, "length": 724, "filename": "tests/inline_assembly_contract.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, "assembly": [{"source_mapping": {"start": 191, "length": 628, "filename": "tests/inline_assembly_contract.sol", "lines": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}}]}] |
@ -1,106 +1 @@ |
||||
[ |
||||
{ |
||||
"assembly": [ |
||||
{ |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_library.sol", |
||||
"length": 114, |
||||
"lines": [ |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"start": 720 |
||||
} |
||||
} |
||||
], |
||||
"check": "assembly", |
||||
"function": { |
||||
"name": "sumAsm", |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_library.sol", |
||||
"length": 247, |
||||
"lines": [ |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22 |
||||
], |
||||
"start": 593 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"assembly": [ |
||||
{ |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_library.sol", |
||||
"length": 677, |
||||
"lines": [ |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"start": 1000 |
||||
} |
||||
} |
||||
], |
||||
"check": "assembly", |
||||
"function": { |
||||
"name": "sumPureAsm", |
||||
"source_mapping": { |
||||
"filename": "tests/inline_assembly_library.sol", |
||||
"length": 754, |
||||
"lines": [ |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"start": 923 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumAsm uses assembly (tests/inline_assembly_library.sol#16-22)\n\t- tests/inline_assembly_library.sol#18-21\n", "function": {"name": "sumAsm", "source_mapping": {"start": 593, "length": 247, "filename": "tests/inline_assembly_library.sol", "lines": [16, 17, 18, 19, 20, 21, 22]}, "contract": {"name": "VectorSum", "source_mapping": {"start": 98, "length": 1581, "filename": "tests/inline_assembly_library.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, "assembly": [{"source_mapping": {"start": 720, "length": 114, "filename": "tests/inline_assembly_library.sol", "lines": [18, 19, 20, 21]}}]}, {"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library.sol#25-47)\n\t- tests/inline_assembly_library.sol#26-47\n", "function": {"name": "sumPureAsm", "source_mapping": {"start": 923, "length": 754, "filename": "tests/inline_assembly_library.sol", "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}, "contract": {"name": "VectorSum", "source_mapping": {"start": 98, "length": 1581, "filename": "tests/inline_assembly_library.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, "assembly": [{"source_mapping": {"start": 1000, "length": 677, "filename": "tests/inline_assembly_library.sol", "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}}]}] |
@ -1 +1 @@ |
||||
[{"check": "locked-ether", "functions": [{"name": "receive", "source_mapping": {"start": 47, "length": 72, "filename": "tests/locked_ether.sol", "lines": [4, 5, 6]}}], "contract": {"name": "OnlyLocked", "source_mapping": {"start": 368, "length": 32, "filename": "tests/locked_ether.sol", "lines": [26]}}}] |
||||
[] |
@ -1,31 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "low-level-calls", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "_receiver.call.value(msg.value).gas(7777)()", |
||||
"source_mapping": { |
||||
"filename": "tests/low_level_calls.sol", |
||||
"length": 43, |
||||
"lines": [ |
||||
6 |
||||
], |
||||
"start": 100 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "send", |
||||
"source_mapping": { |
||||
"filename": "tests/low_level_calls.sol", |
||||
"length": 101, |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"start": 49 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "low-level-calls", "impact": "Informational", "confidence": "High", "description": "Low level call in Sender.send (tests/low_level_calls.sol#5-7):\n\t-_receiver.call.value(msg.value).gas(7777)() tests/low_level_calls.sol#6\n", "function": {"name": "send", "source_mapping": {"start": 49, "length": 101, "filename": "tests/low_level_calls.sol", "lines": [5, 6, 7]}, "contract": {"name": "Sender", "source_mapping": {"start": 27, "length": 125, "filename": "tests/low_level_calls.sol", "lines": [4, 5, 6, 7, 8]}}}, "expressions": [{"expression": "_receiver.call.value(msg.value).gas(7777)()", "source_mapping": {"start": 100, "length": 43, "filename": "tests/low_level_calls.sol", "lines": [6]}}]}] |
@ -1,246 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "CapWords", |
||||
"name": { |
||||
"name": "naming", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 598, |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"start": 26 |
||||
} |
||||
}, |
||||
"type": "contract" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "CapWords", |
||||
"name": { |
||||
"name": "numbers", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 23, |
||||
"lines": [ |
||||
6 |
||||
], |
||||
"start": 77 |
||||
} |
||||
}, |
||||
"type": "enum" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "CapWords", |
||||
"name": { |
||||
"name": "event_", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 19, |
||||
"lines": [ |
||||
23 |
||||
], |
||||
"start": 303 |
||||
} |
||||
}, |
||||
"type": "event" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "CapWords", |
||||
"name": { |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 20, |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"start": 227 |
||||
} |
||||
}, |
||||
"type": "structure" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "UPPER_CASE_WITH_UNDERSCORES", |
||||
"name": { |
||||
"name": "MY_other_CONSTANT", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 35, |
||||
"lines": [ |
||||
9 |
||||
], |
||||
"start": 141 |
||||
} |
||||
}, |
||||
"type": "variable_constant" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "l_O_I_should_not_be_used", |
||||
"name": { |
||||
"name": "l", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 10, |
||||
"lines": [ |
||||
67 |
||||
], |
||||
"start": 847 |
||||
} |
||||
}, |
||||
"type": "variable" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "GetOne", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 71, |
||||
"lines": [ |
||||
30, |
||||
31, |
||||
32, |
||||
33 |
||||
], |
||||
"start": 405 |
||||
} |
||||
}, |
||||
"type": "function" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "CantDo", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 36, |
||||
"lines": [ |
||||
41, |
||||
42, |
||||
43 |
||||
], |
||||
"start": 545 |
||||
} |
||||
}, |
||||
"type": "modifier" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "Number2", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 12, |
||||
"lines": [ |
||||
35 |
||||
], |
||||
"start": 512 |
||||
} |
||||
}, |
||||
"type": "parameter" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "_used", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 10, |
||||
"lines": [ |
||||
59 |
||||
], |
||||
"start": 748 |
||||
} |
||||
}, |
||||
"type": "parameter" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "Var_One", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 16, |
||||
"lines": [ |
||||
11 |
||||
], |
||||
"start": 183 |
||||
} |
||||
}, |
||||
"type": "variable" |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"convention": "mixedCase", |
||||
"name": { |
||||
"name": "_myPublicVar", |
||||
"source_mapping": { |
||||
"filename": "tests/naming_convention.sol", |
||||
"length": 17, |
||||
"lines": [ |
||||
56 |
||||
], |
||||
"start": 695 |
||||
} |
||||
}, |
||||
"type": "variable" |
||||
} |
||||
] |
||||
[{"check": "naming-convention", "type": "contract", "convention": "CapWords", "name": {"name": "naming", "source_mapping": {"start": 26, "length": 598, "filename": "tests/naming_convention.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, {"check": "naming-convention", "type": "structure", "convention": "CapWords", "name": {"name": "test", "source_mapping": {"start": 227, "length": 20, "filename": "tests/naming_convention.sol", "lines": [14, 15, 16]}}}, {"check": "naming-convention", "type": "event", "convention": "CapWords", "name": {"name": "event_", "source_mapping": {"start": 303, "length": 19, "filename": "tests/naming_convention.sol", "lines": [23]}}}, {"check": "naming-convention", "type": "function", "convention": "mixedCase", "name": {"name": "GetOne", "source_mapping": {"start": 405, "length": 71, "filename": "tests/naming_convention.sol", "lines": [30, 31, 32, 33]}}}, {"check": "naming-convention", "type": "parameter", "convention": "mixedCase", "name": {"name": "Number2", "source_mapping": {"start": 512, "length": 12, "filename": "tests/naming_convention.sol", "lines": [35]}}}, {"check": "naming-convention", "type": "variable_constant", "convention": "UPPER_CASE_WITH_UNDERSCORES", "name": {"name": "MY_other_CONSTANT", "source_mapping": {"start": 141, "length": 35, "filename": "tests/naming_convention.sol", "lines": [9]}}}, {"check": "naming-convention", "type": "variable", "convention": "mixedCase", "name": {"name": "Var_One", "source_mapping": {"start": 183, "length": 16, "filename": "tests/naming_convention.sol", "lines": [11]}}}, {"check": "naming-convention", "type": "enum", "convention": "CapWords", "name": {"name": "numbers", "source_mapping": {"start": 77, "length": 23, "filename": "tests/naming_convention.sol", "lines": [6]}}}, {"check": "naming-convention", "type": "modifier", "convention": "mixedCase", "name": {"name": "CantDo", "source_mapping": {"start": 545, "length": 36, "filename": "tests/naming_convention.sol", "lines": [41, 42, 43]}}}, {"check": "naming-convention", "type": "parameter", "convention": "mixedCase", "name": {"name": "_used", "source_mapping": {"start": 748, "length": 10, "filename": "tests/naming_convention.sol", "lines": [59]}}}, {"check": "naming-convention", "type": "variable", "convention": "mixedCase", "name": {"name": "_myPublicVar", "source_mapping": {"start": 695, "length": 17, "filename": "tests/naming_convention.sol", "lines": [56]}}}, {"check": "naming-convention", "type": "variable", "convention": "l_O_I_should_not_be_used", "name": {"name": "l", "source_mapping": {"start": 847, "length": 10, "filename": "tests/naming_convention.sol", "lines": [67]}}}] |
@ -1,16 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "solc-version", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "0.4.21", |
||||
"source_mapping": { |
||||
"filename": "old_solc.sol", |
||||
"length": 23, |
||||
"lines": [], |
||||
"start": 0 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
[{"check": "solc-version", "impact": "Informational", "confidence": "High", "description": "Old version (<0.4.23) of Solidity used in tests/old_solc.sol.json:\n\t- old_solc.sol declares pragma solidity0.4.21\n", "expressions": [{"expression": "0.4.21", "source_mapping": {"start": 0, "length": 23, "filename": "old_solc.sol", "lines": []}}]}] |
@ -1,29 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "pragma", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "^0.4.23", |
||||
"source_mapping": { |
||||
"filename": "tests/pragma.0.4.23.sol", |
||||
"length": 24, |
||||
"lines": [ |
||||
1 |
||||
], |
||||
"start": 0 |
||||
} |
||||
}, |
||||
{ |
||||
"expression": "^0.4.24", |
||||
"source_mapping": { |
||||
"filename": "tests/pragma.0.4.24.sol", |
||||
"length": 24, |
||||
"lines": [ |
||||
1 |
||||
], |
||||
"start": 0 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
[{"check": "pragma", "impact": "Informational", "confidence": "High", "description": "Different versions of Solidity is used in tests/pragma.0.4.24.sol:\n\t- Version used: ['^0.4.23', '^0.4.24']\n\t- tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23\n\t- tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24\n", "expressions": [{"expression": "^0.4.23", "source_mapping": {"start": 0, "length": 24, "filename": "tests/pragma.0.4.23.sol", "lines": [1]}}, {"expression": "^0.4.24", "source_mapping": {"start": 0, "length": 24, "filename": "tests/pragma.0.4.24.sol", "lines": [1]}}]}] |
@ -1,53 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "reentrancy", |
||||
"external_calls": [ |
||||
{ |
||||
"expression": "! (msg.sender.call.value(userBalance[msg.sender])())", |
||||
"source_mapping": { |
||||
"filename": "tests/reentrancy.sol", |
||||
"length": 92, |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19 |
||||
], |
||||
"start": 478 |
||||
} |
||||
} |
||||
], |
||||
"external_calls_sending_eth": [], |
||||
"function": { |
||||
"name": "withdrawBalance", |
||||
"source_mapping": { |
||||
"filename": "tests/reentrancy.sol", |
||||
"length": 314, |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"start": 299 |
||||
} |
||||
}, |
||||
"variables_written": [ |
||||
{ |
||||
"expression": "userBalance[msg.sender] = 0", |
||||
"name": "userBalance", |
||||
"source_mapping": { |
||||
"filename": "tests/reentrancy.sol", |
||||
"length": 27, |
||||
"lines": [ |
||||
20 |
||||
], |
||||
"start": 579 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
[{"check": "reentrancy", "impact": "High", "confidence": "Medium", "description": "Reentrancy in Reentrancy.withdrawBalance (tests/reentrancy.sol#14-21):\n\tExternal calls:\n\t- ! (msg.sender.call.value(userBalance[msg.sender])()) (tests/reentrancy.sol#17-19)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy.sol#20)\n", "function": {"name": "withdrawBalance", "source_mapping": {"start": 299, "length": 314, "filename": "tests/reentrancy.sol", "lines": [14, 15, 16, 17, 18, 19, 20, 21]}, "contract": {"name": "Reentrancy", "source_mapping": {"start": 26, "length": 1678, "filename": "tests/reentrancy.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]}}}, "external_calls": [{"expression": "! (msg.sender.call.value(userBalance[msg.sender])())", "source_mapping": {"start": 478, "length": 92, "filename": "tests/reentrancy.sol", "lines": [17, 18, 19]}}], "external_calls_sending_eth": [], "variables_written": [{"name": "userBalance", "expression": "userBalance[msg.sender] = 0", "source_mapping": {"start": 579, "length": 27, "filename": "tests/reentrancy.sol", "lines": [20]}}]}] |
@ -1,64 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "tx-origin", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "require(bool)(tx.origin == owner)", |
||||
"source_mapping": { |
||||
"filename": "tests/tx_origin.sol", |
||||
"length": 27, |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"start": 140 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "bug0", |
||||
"source_mapping": { |
||||
"filename": "tests/tx_origin.sol", |
||||
"length": 60, |
||||
"lines": [ |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"start": 114 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "tx-origin", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "tx.origin != owner", |
||||
"source_mapping": { |
||||
"filename": "tests/tx_origin.sol", |
||||
"length": 57, |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"start": 206 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "bug2", |
||||
"source_mapping": { |
||||
"filename": "tests/tx_origin.sol", |
||||
"length": 89, |
||||
"lines": [ |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17 |
||||
], |
||||
"start": 180 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "tx-origin", "impact": "Medium", "confidence": "Medium", "description": "TxOrigin.bug0 uses tx.origin for authorization:\n\t- require(bool)(tx.origin == owner) (tests/tx_origin.sol#10)\n", "function": {"name": "bug0", "source_mapping": {"start": 114, "length": 60, "filename": "tests/tx_origin.sol", "lines": [9, 10, 11]}, "contract": {"name": "TxOrigin", "source_mapping": {"start": 26, "length": 393, "filename": "tests/tx_origin.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}}, "expressions": [{"expression": "require(bool)(tx.origin == owner)", "source_mapping": {"start": 140, "length": 27, "filename": "tests/tx_origin.sol", "lines": [10]}}]}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium", "description": "TxOrigin.bug2 uses tx.origin for authorization:\n\t- tx.origin != owner (tests/tx_origin.sol#14-16)\n", "function": {"name": "bug2", "source_mapping": {"start": 180, "length": 89, "filename": "tests/tx_origin.sol", "lines": [13, 14, 15, 16, 17]}, "contract": {"name": "TxOrigin", "source_mapping": {"start": 26, "length": 393, "filename": "tests/tx_origin.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}}, "expressions": [{"expression": "tx.origin != owner", "source_mapping": {"start": 206, "length": 57, "filename": "tests/tx_origin.sol", "lines": [14, 15, 16]}}]}] |
@ -1,120 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "uninitialized-state", |
||||
"functions": [ |
||||
{ |
||||
"name": "transfer", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 82, |
||||
"lines": [ |
||||
7, |
||||
8, |
||||
9 |
||||
], |
||||
"start": 81 |
||||
} |
||||
} |
||||
], |
||||
"variable": { |
||||
"name": "destination", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 19, |
||||
"lines": [ |
||||
5 |
||||
], |
||||
"start": 55 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "uninitialized-state", |
||||
"functions": [ |
||||
{ |
||||
"name": "use", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 143, |
||||
"lines": [ |
||||
23, |
||||
24, |
||||
25, |
||||
26 |
||||
], |
||||
"start": 356 |
||||
} |
||||
} |
||||
], |
||||
"variable": { |
||||
"name": "balances", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 34, |
||||
"lines": [ |
||||
15 |
||||
], |
||||
"start": 189 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "uninitialized-state", |
||||
"functions": [ |
||||
{ |
||||
"name": "use", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 117, |
||||
"lines": [ |
||||
53, |
||||
54, |
||||
55, |
||||
56 |
||||
], |
||||
"start": 875 |
||||
} |
||||
} |
||||
], |
||||
"variable": { |
||||
"name": "st", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 15, |
||||
"lines": [ |
||||
45 |
||||
], |
||||
"start": 695 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"check": "uninitialized-state", |
||||
"functions": [ |
||||
{ |
||||
"name": "init", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 52, |
||||
"lines": [ |
||||
49, |
||||
50, |
||||
51 |
||||
], |
||||
"start": 817 |
||||
} |
||||
} |
||||
], |
||||
"variable": { |
||||
"name": "v", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized.sol", |
||||
"length": 6, |
||||
"lines": [ |
||||
47 |
||||
], |
||||
"start": 748 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "uninitialized-state", "impact": "High", "confidence": "High", "description": "Uninitialized.destination (tests/uninitialized.sol#5) is never initialized. It is used in:\n\t- transfer (tests/uninitialized.sol#7-9)\n", "variable": {"name": "destination", "source_mapping": {"start": 55, "length": 19, "filename": "tests/uninitialized.sol", "lines": [5]}}, "functions": [{"name": "transfer", "source_mapping": {"start": 81, "length": 82, "filename": "tests/uninitialized.sol", "lines": [7, 8, 9]}, "contract": {"name": "Uninitialized", "source_mapping": {"start": 26, "length": 140, "filename": "tests/uninitialized.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11]}}}]}, {"check": "uninitialized-state", "impact": "High", "confidence": "High", "description": "Test.balances (tests/uninitialized.sol#15) is never initialized. It is used in:\n\t- use (tests/uninitialized.sol#23-26)\n", "variable": {"name": "balances", "source_mapping": {"start": 189, "length": 34, "filename": "tests/uninitialized.sol", "lines": [15]}}, "functions": [{"name": "use", "source_mapping": {"start": 356, "length": 143, "filename": "tests/uninitialized.sol", "lines": [23, 24, 25, 26]}, "contract": {"name": "Test", "source_mapping": {"start": 169, "length": 332, "filename": "tests/uninitialized.sol", "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]}}}]}, {"check": "uninitialized-state", "impact": "High", "confidence": "High", "description": "Test2.st (tests/uninitialized.sol#45) is never initialized. It is used in:\n\t- use (tests/uninitialized.sol#53-56)\n", "variable": {"name": "st", "source_mapping": {"start": 695, "length": 15, "filename": "tests/uninitialized.sol", "lines": [45]}}, "functions": [{"name": "use", "source_mapping": {"start": 875, "length": 117, "filename": "tests/uninitialized.sol", "lines": [53, 54, 55, 56]}, "contract": {"name": "Test2", "source_mapping": {"start": 641, "length": 354, "filename": "tests/uninitialized.sol", "lines": [42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58]}}}]}, {"check": "uninitialized-state", "impact": "High", "confidence": "High", "description": "Test2.v (tests/uninitialized.sol#47) is never initialized. It is used in:\n\t- init (tests/uninitialized.sol#49-51)\n", "variable": {"name": "v", "source_mapping": {"start": 748, "length": 6, "filename": "tests/uninitialized.sol", "lines": [47]}}, "functions": [{"name": "init", "source_mapping": {"start": 817, "length": 52, "filename": "tests/uninitialized.sol", "lines": [49, 50, 51]}, "contract": {"name": "Test2", "source_mapping": {"start": 641, "length": 354, "filename": "tests/uninitialized.sol", "lines": [42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58]}}}]}] |
@ -1,31 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "uninitialized-local", |
||||
"function": { |
||||
"name": "func", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized_local_variable.sol", |
||||
"length": 143, |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"start": 29 |
||||
} |
||||
}, |
||||
"variable": { |
||||
"name": "uint_not_init", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized_local_variable.sol", |
||||
"length": 18, |
||||
"lines": [ |
||||
4 |
||||
], |
||||
"start": 77 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium", "description": "uint_not_init in Uninitialized.func (tests/uninitialized_local_variable.sol#4) is a local variable never initialiazed\n", "variable": {"name": "uint_not_init", "source_mapping": {"start": 77, "length": 18, "filename": "tests/uninitialized_local_variable.sol", "lines": [4]}}, "function": {"name": "func", "source_mapping": {"start": 29, "length": 143, "filename": "tests/uninitialized_local_variable.sol", "lines": [3, 4, 5, 6, 7]}, "contract": {"name": "Uninitialized", "source_mapping": {"start": 0, "length": 179, "filename": "tests/uninitialized_local_variable.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9]}}}}] |
@ -1,32 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "uninitialized-storage", |
||||
"function": { |
||||
"name": "func", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized_storage_pointer.sol", |
||||
"length": 138, |
||||
"lines": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12 |
||||
], |
||||
"start": 67 |
||||
} |
||||
}, |
||||
"variable": { |
||||
"name": "st_bug", |
||||
"source_mapping": { |
||||
"filename": "tests/uninitialized_storage_pointer.sol", |
||||
"length": 9, |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"start": 171 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "uninitialized-storage", "impact": "High", "confidence": "High", "description": "st_bug in Uninitialized.func (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialiazed\n", "variable": {"name": "st_bug", "source_mapping": {"start": 171, "length": 9, "filename": "tests/uninitialized_storage_pointer.sol", "lines": [10]}}, "function": {"name": "func", "source_mapping": {"start": 67, "length": 138, "filename": "tests/uninitialized_storage_pointer.sol", "lines": [7, 8, 9, 10, 11, 12]}, "contract": {"name": "Uninitialized", "source_mapping": {"start": 0, "length": 212, "filename": "tests/uninitialized_storage_pointer.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]}}}}] |
@ -1,52 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "unused-return", |
||||
"expressions": [ |
||||
{ |
||||
"expression": "a.add(0)", |
||||
"source_mapping": { |
||||
"filename": "tests/unused_return.sol", |
||||
"length": 8, |
||||
"lines": [ |
||||
22 |
||||
], |
||||
"start": 337 |
||||
} |
||||
}, |
||||
{ |
||||
"expression": "t.f()", |
||||
"source_mapping": { |
||||
"filename": "tests/unused_return.sol", |
||||
"length": 5, |
||||
"lines": [ |
||||
18 |
||||
], |
||||
"start": 263 |
||||
} |
||||
} |
||||
], |
||||
"function": { |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"filename": "tests/unused_return.sol", |
||||
"length": 347, |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"start": 230 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
[{"check": "unused-return", "impact": "Medium", "confidence": "Medium", "description": "User.test (tests/unused_return.sol#17-29) does not use the value returned by external calls:\n\t-t.f() (tests/unused_return.sol#18)\n\t-a.add(0) (tests/unused_return.sol#22)\n", "function": {"name": "test", "source_mapping": {"start": 230, "length": 347, "filename": "tests/unused_return.sol", "lines": [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}, "contract": {"name": "User", "source_mapping": {"start": 180, "length": 399, "filename": "tests/unused_return.sol", "lines": [13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]}}}, "expressions": [{"expression": "t.f()", "source_mapping": {"start": 263, "length": 5, "filename": "tests/unused_return.sol", "lines": [18]}}, {"expression": "a.add(0)", "source_mapping": {"start": 337, "length": 8, "filename": "tests/unused_return.sol", "lines": [22]}}]}] |
@ -1,18 +1 @@ |
||||
[ |
||||
{ |
||||
"check": "unused-state", |
||||
"variables": [ |
||||
{ |
||||
"name": "unused", |
||||
"source_mapping": { |
||||
"filename": "tests/unused_state.sol", |
||||
"length": 14, |
||||
"lines": [ |
||||
4 |
||||
], |
||||
"start": 42 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
[{"check": "unused-state", "impact": "Informational", "confidence": "High", "description": "A.unused (tests/unused_state.sol#4) is never used in B\n", "variables": [{"name": "unused", "source_mapping": {"start": 42, "length": 14, "filename": "tests/unused_state.sol", "lines": [4]}}]}] |
Loading…
Reference in new issue