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.
557 lines
28 KiB
557 lines
28 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad",
|
|
"source_mapping": {
|
|
"start": 61,
|
|
"length": 232,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad(address[])"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))",
|
|
"source_mapping": {
|
|
"start": 188,
|
|
"length": 88,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
7
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 101
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad",
|
|
"source_mapping": {
|
|
"start": 61,
|
|
"length": 232,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad(address[])"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#7)\n",
|
|
"markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L7)\n",
|
|
"first_markdown_element": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L5-L9",
|
|
"id": "71bad0e6228b341671dd1cc38d74fb727f9bbc5764104298596986d8f4967c02",
|
|
"check": "delegatecall-loop",
|
|
"impact": "High",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad2_internal",
|
|
"source_mapping": {
|
|
"start": 496,
|
|
"length": 236,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2_internal(address[])"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))",
|
|
"source_mapping": {
|
|
"start": 627,
|
|
"length": 88,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
21
|
|
],
|
|
"starting_column": 13,
|
|
"ending_column": 101
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2_internal",
|
|
"source_mapping": {
|
|
"start": 496,
|
|
"length": 236,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2_internal(address[])"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#21)\n",
|
|
"markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L21)\n",
|
|
"first_markdown_element": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L19-L23",
|
|
"id": "7edbf79d9613bc9338f4956841c0fbece80b489971f8c05ae818babc7e27931a",
|
|
"check": "delegatecall-loop",
|
|
"impact": "High",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 738,
|
|
"length": 312,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address[])"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))",
|
|
"source_mapping": {
|
|
"start": 931,
|
|
"length": 88,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
28
|
|
],
|
|
"starting_column": 17,
|
|
"ending_column": 105
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 738,
|
|
"length": 312,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "C",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 1053,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol",
|
|
"is_dependency": false,
|
|
"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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(address[])"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#28)\n",
|
|
"markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L28)\n",
|
|
"first_markdown_element": "tests/detectors/delegatecall-loop/0.5.16/delegatecall_loop.sol#L25-L31",
|
|
"id": "e4ea7a031f3f945111f70123e85c9f92b52ac8fd7c04a8c2443393592982e39a",
|
|
"check": "delegatecall-loop",
|
|
"impact": "High",
|
|
"confidence": "Medium"
|
|
}
|
|
]
|
|
] |