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.
268 lines
14 KiB
268 lines
14 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad4",
|
|
"source_mapping": {
|
|
"start": 524,
|
|
"length": 40,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
18
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 45
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Test",
|
|
"source_mapping": {
|
|
"start": 35,
|
|
"length": 532,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad4(string)"
|
|
}
|
|
}
|
|
],
|
|
"description": "bad4(string) should be declared external:\n\t- Test.bad4(string) (tests/detectors/external-function/0.5.16/external_function_3.sol#18)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"markdown": "bad4(string) should be declared external:\n\t- [Test.bad4(string)](tests/detectors/external-function/0.5.16/external_function_3.sol#L18)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"first_markdown_element": "tests/detectors/external-function/0.5.16/external_function_3.sol#L18",
|
|
"id": "1b6de528ed7f8ecf61a543879c8bcbee1bce7e08bdef89c6f8f663937d5a7209",
|
|
"check": "external-function",
|
|
"impact": "Optimization",
|
|
"confidence": "High"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad3",
|
|
"source_mapping": {
|
|
"start": 475,
|
|
"length": 44,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
17
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 49
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Test",
|
|
"source_mapping": {
|
|
"start": 35,
|
|
"length": 532,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad3(Test.testStruct)"
|
|
}
|
|
}
|
|
],
|
|
"description": "bad3(Test.testStruct) should be declared external:\n\t- Test.bad3(Test.testStruct) (tests/detectors/external-function/0.5.16/external_function_3.sol#17)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"markdown": "bad3(Test.testStruct) should be declared external:\n\t- [Test.bad3(Test.testStruct)](tests/detectors/external-function/0.5.16/external_function_3.sol#L17)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"first_markdown_element": "tests/detectors/external-function/0.5.16/external_function_3.sol#L17",
|
|
"id": "a60742b3998c52eee654f61cfb5b39834d63a1b13212511a01811206ac445dd5",
|
|
"check": "external-function",
|
|
"impact": "Optimization",
|
|
"confidence": "High"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 427,
|
|
"length": 43,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
16
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 48
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Test",
|
|
"source_mapping": {
|
|
"start": 35,
|
|
"length": 532,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad2(uint256[])"
|
|
}
|
|
}
|
|
],
|
|
"description": "bad2(uint256[]) should be declared external:\n\t- Test.bad2(uint256[]) (tests/detectors/external-function/0.5.16/external_function_3.sol#16)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"markdown": "bad2(uint256[]) should be declared external:\n\t- [Test.bad2(uint256[])](tests/detectors/external-function/0.5.16/external_function_3.sol#L16)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"first_markdown_element": "tests/detectors/external-function/0.5.16/external_function_3.sol#L16",
|
|
"id": "aa4b0cae64f1a6f9f11d3f9981255fd04f37f558c960195ee46413ca4b142822",
|
|
"check": "external-function",
|
|
"impact": "Optimization",
|
|
"confidence": "High"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad",
|
|
"source_mapping": {
|
|
"start": 384,
|
|
"length": 38,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
15
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 43
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Test",
|
|
"source_mapping": {
|
|
"start": 35,
|
|
"length": 532,
|
|
"filename_relative": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/external-function/0.5.16/external_function_3.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 0
|
|
}
|
|
},
|
|
"signature": "bad(bytes)"
|
|
}
|
|
}
|
|
],
|
|
"description": "bad(bytes) should be declared external:\n\t- Test.bad(bytes) (tests/detectors/external-function/0.5.16/external_function_3.sol#15)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"markdown": "bad(bytes) should be declared external:\n\t- [Test.bad(bytes)](tests/detectors/external-function/0.5.16/external_function_3.sol#L15)\nMoreover, the following function parameters should change its data location:\nx location should be calldata\n",
|
|
"first_markdown_element": "tests/detectors/external-function/0.5.16/external_function_3.sol#L15",
|
|
"id": "df1688f3d1120f9600f61accff294ba821689c45dc261f1a9b94f23e6a402367",
|
|
"check": "external-function",
|
|
"impact": "Optimization",
|
|
"confidence": "High"
|
|
}
|
|
]
|
|
] |