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.
416 lines
21 KiB
416 lines
21 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "deleteBalance",
|
|
"source_mapping": {
|
|
"start": 595,
|
|
"length": 137,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
29,
|
|
30,
|
|
31,
|
|
32
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Balances",
|
|
"source_mapping": {
|
|
"start": 199,
|
|
"length": 866,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "deleteBalance(uint256)"
|
|
}
|
|
},
|
|
{
|
|
"type": "struct",
|
|
"name": "BalancesStruct",
|
|
"source_mapping": {
|
|
"start": 228,
|
|
"length": 94,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Balances",
|
|
"source_mapping": {
|
|
"start": 199,
|
|
"length": 866,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "delete stackBalance[idx]",
|
|
"source_mapping": {
|
|
"start": 701,
|
|
"length": 24,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
31
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 33
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "deleteBalance",
|
|
"source_mapping": {
|
|
"start": 595,
|
|
"length": 137,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
29,
|
|
30,
|
|
31,
|
|
32
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Balances",
|
|
"source_mapping": {
|
|
"start": 199,
|
|
"length": 866,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
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
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "deleteBalance(uint256)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#17-20) which contains a mapping:\n\t-delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#31)\n",
|
|
"markdown": "[Balances.deleteBalance(uint256)](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L29-L32) deletes [Balances.BalancesStruct](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L17-L20) which contains a mapping:\n\t-[delete stackBalance[idx]](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L31)\n",
|
|
"first_markdown_element": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L29-L32",
|
|
"id": "be5ede96c6fee54dfce4422097c8fedb873edf56795b146bda5a64bf4dda87d3",
|
|
"check": "mapping-deletion",
|
|
"impact": "Medium",
|
|
"confidence": "High"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "deleteSt",
|
|
"source_mapping": {
|
|
"start": 114,
|
|
"length": 80,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
9,
|
|
10,
|
|
11
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Lib",
|
|
"source_mapping": {
|
|
"start": 29,
|
|
"length": 168,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "deleteSt(Lib.MyStruct[1])"
|
|
}
|
|
},
|
|
{
|
|
"type": "struct",
|
|
"name": "MyStruct",
|
|
"source_mapping": {
|
|
"start": 47,
|
|
"length": 61,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
5,
|
|
6,
|
|
7
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Lib",
|
|
"source_mapping": {
|
|
"start": 29,
|
|
"length": 168,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "delete st[0]",
|
|
"source_mapping": {
|
|
"start": 175,
|
|
"length": 12,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
10
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 21
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "deleteSt",
|
|
"source_mapping": {
|
|
"start": 114,
|
|
"length": 80,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
9,
|
|
10,
|
|
11
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Lib",
|
|
"source_mapping": {
|
|
"start": 29,
|
|
"length": 168,
|
|
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "deleteSt(Lib.MyStruct[1])"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#10)\n",
|
|
"markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L10)\n",
|
|
"first_markdown_element": "tests/e2e/detectors/test_data/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11",
|
|
"id": "e60cb56bfbbca04e075ecc29366ae58fcdd9ee4dc865f8b0094f7ea5394b92a0",
|
|
"check": "mapping-deletion",
|
|
"impact": "Medium",
|
|
"confidence": "High"
|
|
}
|
|
]
|
|
] |