mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
698 lines
34 KiB
698 lines
34 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad3_internal",
|
|
"source_mapping": {
|
|
"start": 1142,
|
|
"length": 99,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
45,
|
|
46,
|
|
47
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad3_internal(address,uint256)"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(uint160(a)).transfer(i)",
|
|
"source_mapping": {
|
|
"start": 1203,
|
|
"length": 31,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
46
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 40
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad3_internal",
|
|
"source_mapping": {
|
|
"start": 1142,
|
|
"length": 99,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
45,
|
|
46,
|
|
47
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad3_internal(address,uint256)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n",
|
|
"markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n",
|
|
"first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47",
|
|
"id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae",
|
|
"check": "calls-loop",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad_base",
|
|
"source_mapping": {
|
|
"start": 180,
|
|
"length": 168,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoopBase",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 350,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad_base()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(uint160(destinations_base[i])).transfer(i)",
|
|
"source_mapping": {
|
|
"start": 281,
|
|
"length": 50,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
11
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 63
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad_base",
|
|
"source_mapping": {
|
|
"start": 180,
|
|
"length": 168,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoopBase",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 350,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad_base()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n",
|
|
"markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n",
|
|
"first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13",
|
|
"id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8",
|
|
"check": "calls-loop",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 721,
|
|
"length": 263,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad2()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(uint160(destinations[i])).transfer(i)",
|
|
"source_mapping": {
|
|
"start": 922,
|
|
"length": 45,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
35
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 58
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 721,
|
|
"length": 263,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35,
|
|
36,
|
|
37
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad2()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#35)\n",
|
|
"markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L35)\n",
|
|
"first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L30-L37",
|
|
"id": "3a39574e82d2f7f3b099bb034e0ff24b44e59a22109608d09a9ff3316409b1d2",
|
|
"check": "calls-loop",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad",
|
|
"source_mapping": {
|
|
"start": 562,
|
|
"length": 153,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(uint160(destinations[i])).transfer(i)",
|
|
"source_mapping": {
|
|
"start": 653,
|
|
"length": 45,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
26
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 58
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad",
|
|
"source_mapping": {
|
|
"start": 562,
|
|
"length": 153,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "CallInLoop",
|
|
"source_mapping": {
|
|
"start": 352,
|
|
"length": 892,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n",
|
|
"markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n",
|
|
"first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28",
|
|
"id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd",
|
|
"check": "calls-loop",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
}
|
|
]
|
|
] |