Static Analyzer for Solidity
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.
slither/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16...

848 lines
42 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 87,
"length": 188,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
},
{
"type": "node",
"name": "(success) = msg.sender.call()",
"source_mapping": {
"start": 148,
"length": 37,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 9,
"ending_column": 46
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 87,
"length": 188,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "notCalled = false",
"source_mapping": {
"start": 251,
"length": 17,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
12
],
"starting_column": 9,
"ending_column": 26
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 87,
"length": 188,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "notCalled"
}
}
],
"description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#6-13):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#12)\n",
"markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L6-L13):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L12)\n",
"first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L6-L13",
"id": "0aac5bbaf3a6f1b7de2ac725771ade12f8b1453c0639d09517b8bddb098a13d2",
"check": "reentrancy-no-eth",
"impact": "Medium",
"confidence": "Medium"
},
{
"elements": [
{
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 281,
"length": 161,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
},
{
"type": "node",
"name": "(success) = msg.sender.call()",
"source_mapping": {
"start": 356,
"length": 37,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
17
],
"starting_column": 9,
"ending_column": 46
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 281,
"length": 161,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "bad0()",
"source_mapping": {
"start": 429,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
19
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 281,
"length": 161,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "(success) = msg.sender.call()",
"source_mapping": {
"start": 148,
"length": 37,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 9,
"ending_column": 46
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 87,
"length": 188,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "external_calls_sending_eth"
}
},
{
"type": "node",
"name": "bad0()",
"source_mapping": {
"start": 429,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
19
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 281,
"length": 161,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
}
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "notCalled"
}
},
{
"type": "node",
"name": "notCalled = false",
"source_mapping": {
"start": 251,
"length": 17,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
12
],
"starting_column": 9,
"ending_column": 26
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 87,
"length": 188,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 28,
"length": 610,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol",
"is_dependency": false,
"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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "notCalled"
}
}
],
"description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#15-20):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#17)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#19)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#19)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#12)\n",
"markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L15-L20):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L17)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L19)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L19)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L12)\n",
"first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L15-L20",
"id": "05033b6ee9ae71d9cc7b1ec3f6b09d4c0a43a6c92393f54fa45ce27c89a1e771",
"check": "reentrancy-no-eth",
"impact": "Medium",
"confidence": "Medium"
}
]
]