Added new tests and updated JSON artifacts

pull/1022/head
Tadashi 3 years ago
parent 77a23a9448
commit aceab1243c
  1. 11
      tests/detectors/external-function/0.4.25/external_function_3.sol
  2. 130
      tests/detectors/external-function/0.4.25/external_function_3.sol.0.4.25.ExternalFunction.json
  3. 7
      tests/detectors/external-function/0.5.16/external_function_3.sol
  4. 63
      tests/detectors/external-function/0.5.16/external_function_3.sol.0.5.16.ExternalFunction.json
  5. 341
      tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json
  6. 7
      tests/detectors/external-function/0.6.11/external_function_3.sol
  7. 3
      tests/detectors/external-function/0.6.11/external_function_3.sol.0.6.11.ExternalFunction.json
  8. 341
      tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json
  9. 7
      tests/detectors/external-function/0.7.6/external_function_3.sol
  10. 3
      tests/detectors/external-function/0.7.6/external_function_3.sol.0.7.6.ExternalFunction.json
  11. 20
      tests/test_detectors.py

@ -0,0 +1,11 @@
contract Test {
function test(bytes x) public {
}
function test2(bytes memory x) public {
}
}

@ -0,0 +1,130 @@
[
[
{
"elements": [
{
"type": "function",
"name": "test",
"source_mapping": {
"start": 21,
"length": 46,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"is_dependency": false,
"lines": [
3,
4,
5
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 134,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test(bytes)"
}
}
],
"description": "test(bytes) should be declared external:\n\t- Test.test(bytes) (tests/detectors/external-function/0.4.25/external_function_3.sol#3-5)\n",
"markdown": "test(bytes) should be declared external:\n\t- [Test.test(bytes)](tests/detectors/external-function/0.4.25/external_function_3.sol#L3-L5)\n",
"first_markdown_element": "tests/detectors/external-function/0.4.25/external_function_3.sol#L3-L5",
"id": "058fd57c313c645eff4b4e53234ca0f73ca3362bd28d3fdc90e0219a32099592",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "test2",
"source_mapping": {
"start": 73,
"length": 54,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"is_dependency": false,
"lines": [
7,
8,
9
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 134,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.4.25/external_function_3.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test2(bytes)"
}
}
],
"description": "test2(bytes) should be declared external:\n\t- Test.test2(bytes) (tests/detectors/external-function/0.4.25/external_function_3.sol#7-9)\n",
"markdown": "test2(bytes) should be declared external:\n\t- [Test.test2(bytes)](tests/detectors/external-function/0.4.25/external_function_3.sol#L7-L9)\n",
"first_markdown_element": "tests/detectors/external-function/0.4.25/external_function_3.sol#L7-L9",
"id": "a5b4753f43bb5a2a669ecbf4ce6ab1aaff060454657b16b5ed8cc9c34b521c79",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
}
]
]

@ -0,0 +1,7 @@
contract Test {
function test(bytes memory x) public {
}
}

@ -0,0 +1,63 @@
[
[
{
"elements": [
{
"type": "function",
"name": "test",
"source_mapping": {
"start": 21,
"length": 53,
"filename_used": "/GENERIC_PATH",
"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
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 77,
"filename_used": "/GENERIC_PATH",
"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": [
1,
2,
3,
4,
5,
6,
7,
8
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "test(bytes)"
}
}
],
"description": "test(bytes) should be declared external:\n\t- Test.test(bytes) (tests/detectors/external-function/0.5.16/external_function_3.sol#3-5)\n",
"markdown": "test(bytes) should be declared external:\n\t- [Test.test(bytes)](tests/detectors/external-function/0.5.16/external_function_3.sol#L3-L5)\n",
"first_markdown_element": "tests/detectors/external-function/0.5.16/external_function_3.sol#L3-L5",
"id": "058fd57c313c645eff4b4e53234ca0f73ca3362bd28d3fdc90e0219a32099592",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
}
]
]

@ -1,342 +1,3 @@
[
[
{
"elements": [
{
"type": "function",
"name": "funcNotCalled3",
"source_mapping": {
"start": 259,
"length": 41,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled3()"
}
}
],
"description": "funcNotCalled3() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled3() (tests/detectors/external-function/0.6.11/external_function.sol#13-15)\n",
"markdown": "funcNotCalled3() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled3()](tests/detectors/external-function/0.6.11/external_function.sol#L13-L15)\n",
"first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L13-L15",
"id": "026d9a579ea0304e58c8a5174296494f4b672e4ea032f4e17504f3dac327c4e6",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled2",
"source_mapping": {
"start": 306,
"length": 41,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled2()"
}
}
],
"description": "funcNotCalled2() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled2() (tests/detectors/external-function/0.6.11/external_function.sol#17-19)\n",
"markdown": "funcNotCalled2() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled2()](tests/detectors/external-function/0.6.11/external_function.sol#L17-L19)\n",
"first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L17-L19",
"id": "1ef1f19a92a8ab8d27df156d50dd75628ec3057b5f5eb16b7d1faa0e5c3850a0",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled",
"source_mapping": {
"start": 353,
"length": 40,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
21,
22,
23
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled()"
}
}
],
"description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled() (tests/detectors/external-function/0.6.11/external_function.sol#21-23)\n",
"markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled()](tests/detectors/external-function/0.6.11/external_function.sol#L21-L23)\n",
"first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L21-L23",
"id": "369a2f3d071735755ff4f5bc43081fe858bbfb07eed94e5c6dda3c8daa22ba26",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled",
"source_mapping": {
"start": 554,
"length": 325,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
32,
33,
34,
35,
36,
37,
38,
39
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled2",
"source_mapping": {
"start": 473,
"length": 408,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
31,
32,
33,
34,
35,
36,
37,
38,
39,
40
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "funcNotCalled()"
}
}
],
"description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.6.11/external_function.sol#32-39)\n",
"markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.6.11/external_function.sol#L32-L39)\n",
"first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L32-L39",
"id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "parameter_read_ok_for_external",
"source_mapping": {
"start": 1420,
"length": 81,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
74,
75,
76
],
"starting_column": 3,
"ending_column": 4
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "FunctionParameterWrite",
"source_mapping": {
"start": 1381,
"length": 234,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.6.11/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.6.11/external_function.sol",
"is_dependency": false,
"lines": [
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "parameter_read_ok_for_external(uint256)"
}
}
],
"description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.6.11/external_function.sol#74-76)\n",
"markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.6.11/external_function.sol#L74-L76)\n",
"first_markdown_element": "tests/detectors/external-function/0.6.11/external_function.sol#L74-L76",
"id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
}
]
[]
]

@ -0,0 +1,7 @@
contract Test {
function test(bytes memory x) public {
}
}

@ -1,342 +1,3 @@
[
[
{
"elements": [
{
"type": "function",
"name": "funcNotCalled3",
"source_mapping": {
"start": 259,
"length": 41,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled3()"
}
}
],
"description": "funcNotCalled3() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled3() (tests/detectors/external-function/0.7.6/external_function.sol#13-15)\n",
"markdown": "funcNotCalled3() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled3()](tests/detectors/external-function/0.7.6/external_function.sol#L13-L15)\n",
"first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L13-L15",
"id": "026d9a579ea0304e58c8a5174296494f4b672e4ea032f4e17504f3dac327c4e6",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled2",
"source_mapping": {
"start": 306,
"length": 41,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
17,
18,
19
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled2()"
}
}
],
"description": "funcNotCalled2() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled2() (tests/detectors/external-function/0.7.6/external_function.sol#17-19)\n",
"markdown": "funcNotCalled2() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled2()](tests/detectors/external-function/0.7.6/external_function.sol#L17-L19)\n",
"first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L17-L19",
"id": "1ef1f19a92a8ab8d27df156d50dd75628ec3057b5f5eb16b7d1faa0e5c3850a0",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled",
"source_mapping": {
"start": 353,
"length": 40,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
21,
22,
23
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled",
"source_mapping": {
"start": 213,
"length": 258,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
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": "funcNotCalled()"
}
}
],
"description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled.funcNotCalled() (tests/detectors/external-function/0.7.6/external_function.sol#21-23)\n",
"markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled.funcNotCalled()](tests/detectors/external-function/0.7.6/external_function.sol#L21-L23)\n",
"first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L21-L23",
"id": "369a2f3d071735755ff4f5bc43081fe858bbfb07eed94e5c6dda3c8daa22ba26",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "funcNotCalled",
"source_mapping": {
"start": 554,
"length": 325,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
32,
33,
34,
35,
36,
37,
38,
39
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ContractWithFunctionNotCalled2",
"source_mapping": {
"start": 473,
"length": 408,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
31,
32,
33,
34,
35,
36,
37,
38,
39,
40
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "funcNotCalled()"
}
}
],
"description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.7.6/external_function.sol#32-39)\n",
"markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.7.6/external_function.sol#L32-L39)\n",
"first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L32-L39",
"id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "parameter_read_ok_for_external",
"source_mapping": {
"start": 1420,
"length": 81,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
74,
75,
76
],
"starting_column": 3,
"ending_column": 4
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "FunctionParameterWrite",
"source_mapping": {
"start": 1381,
"length": 234,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/external-function/0.7.6/external_function.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/external-function/0.7.6/external_function.sol",
"is_dependency": false,
"lines": [
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "parameter_read_ok_for_external(uint256)"
}
}
],
"description": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- FunctionParameterWrite.parameter_read_ok_for_external(uint256) (tests/detectors/external-function/0.7.6/external_function.sol#74-76)\n",
"markdown": "parameter_read_ok_for_external(uint256) should be declared external:\n\t- [FunctionParameterWrite.parameter_read_ok_for_external(uint256)](tests/detectors/external-function/0.7.6/external_function.sol#L74-L76)\n",
"first_markdown_element": "tests/detectors/external-function/0.7.6/external_function.sol#L74-L76",
"id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59",
"check": "external-function",
"impact": "Optimization",
"confidence": "High"
}
]
[]
]

@ -0,0 +1,7 @@
contract Test {
function test(bytes memory x) public {
}
}

@ -487,6 +487,11 @@ ALL_TESTS = [
"external_function_2.sol",
"0.4.25",
),
Test(
all_detectors.ExternalFunction,
"external_function_3.sol",
"0.4.25",
),
Test(
all_detectors.ExternalFunction,
"external_function.sol",
@ -497,6 +502,11 @@ ALL_TESTS = [
"external_function_2.sol",
"0.5.16",
),
Test(
all_detectors.ExternalFunction,
"external_function_3.sol",
"0.5.16",
),
Test(
all_detectors.ExternalFunction,
"external_function.sol",
@ -507,6 +517,11 @@ ALL_TESTS = [
"external_function_2.sol",
"0.6.11",
),
Test(
all_detectors.ExternalFunction,
"external_function_3.sol",
"0.6.11",
),
Test(
all_detectors.ExternalFunction,
"external_function.sol",
@ -517,6 +532,11 @@ ALL_TESTS = [
"external_function_2.sol",
"0.7.6",
),
Test(
all_detectors.ExternalFunction,
"external_function_3.sol",
"0.7.6",
),
Test(
all_detectors.NamingConvention,
"naming_convention.sol",

Loading…
Cancel
Save