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-before-write/reentrancy-write.sol.0.4.26...

823 lines
41 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 84,
"length": 153,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
},
{
"type": "node",
"name": "! (msg.sender.call())",
"source_mapping": {
"start": 149,
"length": 20,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 13,
"ending_column": 33
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 84,
"length": 153,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "notCalled = false",
"source_mapping": {
"start": 213,
"length": 17,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
11
],
"starting_column": 9,
"ending_column": 26
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 84,
"length": 153,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"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-before-write/reentrancy-write.sol#6-12):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-before-write/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-before-write/reentrancy-write.sol#11)\n",
"markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L6-L12):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L11)\n",
"id": "e078084eca02a4723da5dcb8a78af564de225e53ecc5cb8d98262c19296f7233",
"check": "reentrancy-no-eth",
"impact": "Medium",
"confidence": "Medium"
},
{
"elements": [
{
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 243,
"length": 158,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
14,
15,
16,
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
},
{
"type": "node",
"name": "success = msg.sender.call()",
"source_mapping": {
"start": 318,
"length": 34,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
16
],
"starting_column": 9,
"ending_column": 43
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 243,
"length": 158,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
14,
15,
16,
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "bad0()",
"source_mapping": {
"start": 388,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
18
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 243,
"length": 158,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
14,
15,
16,
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(address)"
}
}
},
"additional_fields": {
"underlying_type": "external_calls"
}
},
{
"type": "node",
"name": "! (msg.sender.call())",
"source_mapping": {
"start": 149,
"length": 20,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
8
],
"starting_column": 13,
"ending_column": 33
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 84,
"length": 153,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
},
"additional_fields": {
"underlying_type": "external_calls_sending_eth"
}
},
{
"type": "node",
"name": "bad0()",
"source_mapping": {
"start": 388,
"length": 6,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
18
],
"starting_column": 9,
"ending_column": 15
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 243,
"length": 158,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
14,
15,
16,
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"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": 213,
"length": 17,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
11
],
"starting_column": 9,
"ending_column": 26
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 84,
"length": 153,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"is_dependency": false,
"lines": [
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ReentrancyWrite",
"source_mapping": {
"start": 25,
"length": 537,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/reentrancy-before-write/reentrancy-write.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/reentrancy-before-write/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
],
"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-before-write/reentrancy-write.sol#14-19):\n\tExternal calls:\n\t- success = msg.sender.call() (tests/detectors/reentrancy-before-write/reentrancy-write.sol#16)\n\t- bad0() (tests/detectors/reentrancy-before-write/reentrancy-write.sol#18)\n\t\t- ! (msg.sender.call()) (tests/detectors/reentrancy-before-write/reentrancy-write.sol#8)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-before-write/reentrancy-write.sol#18)\n\t\t- notCalled = false (tests/detectors/reentrancy-before-write/reentrancy-write.sol#11)\n",
"markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L14-L19):\n\tExternal calls:\n\t- [success = msg.sender.call()](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L16)\n\t- [bad0()](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L18)\n\t\t- [! (msg.sender.call())](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L8)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L18)\n\t\t- [notCalled = false](tests/detectors/reentrancy-before-write/reentrancy-write.sol#L11)\n",
"id": "2ee9fea9a2fa34c6702dcb539c392ab810468f83a66fb21a2df33a1f3d4747cf",
"check": "reentrancy-no-eth",
"impact": "Medium",
"confidence": "Medium"
}
]
]