diff --git a/slither/detectors/abstract_detector.py b/slither/detectors/abstract_detector.py index c01a43c22..f2ba734db 100644 --- a/slither/detectors/abstract_detector.py +++ b/slither/detectors/abstract_detector.py @@ -208,6 +208,8 @@ class AbstractDetector(metaclass=abc.ABCMeta): return [r for (idx, r) in enumerate(results) if idx not in indexes_converted] except ValueError: self.logger.error(yellow("Malformed input. Example of valid input: 0,1,2,3")) + results = sorted(results, key=lambda x: x["id"]) + return results @property diff --git a/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json b/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json index 03c5bb354..9f63212d8 100644 --- a/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json +++ b/tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol.0.4.25.ABIEncoderV2Array.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 726, - "length": 63, + "start": 1076, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -136,42 +136,42 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad3()" } }, { "type": "node", - "name": "this.bad1_external(s)", + "name": "b = abi.encode(s)", "source_mapping": { - "start": 763, - "length": 21, + "start": 1195, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 30 + 40 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 726, - "length": 63, + "start": 1076, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -291,16 +291,16 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad3()" } } } } ], - "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#30)\n", - "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L30)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31", - "id": "3febdd98f71332c80290c9557c5ef89ea9dbea4f520a084b0307f21b00da5010", + "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#40)\n", + "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L40)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L39-L41", + "id": "0c50cf7f7b16d965ef04035beb09d25f3fa1fa4afeeb079ea42f2db879e8f1e9", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -309,19 +309,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 852, - "length": 160, + "start": 1296, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -441,42 +441,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad4()" } }, { "type": "node", - "name": "b = abi.encode(bad_arr)", + "name": "event1_bad(bad_arr)", "source_mapping": { - "start": 971, - "length": 36, + "start": 1415, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 35 + 45 ], "starting_column": 5, - "ending_column": 41 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 852, - "length": 160, + "start": 1296, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -596,16 +596,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad4()" } } } } ], - "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#35)\n", - "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L35)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36", - "id": "d5860309d331920d1e3f44508fea706df75a4a7c2e93666ca96ca00ef32d7e01", + "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#45)\n", + "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L45)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46", + "id": "144c77aebb4037fe38c2864892ecb888a4fb7d5e92e321e664b2d2226658a166", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -614,19 +614,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 1076, - "length": 154, + "start": 540, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -746,42 +746,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } }, { "type": "node", - "name": "b = abi.encode(s)", + "name": "this.bad0_external(bad_arr)", "source_mapping": { - "start": 1195, - "length": 30, + "start": 569, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 40 + 22 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 1076, - "length": 154, + "start": 540, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -901,16 +901,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } } } } ], - "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#40)\n", - "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L40)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L39-L41", - "id": "0c50cf7f7b16d965ef04035beb09d25f3fa1fa4afeeb079ea42f2db879e8f1e9", + "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#22)\n", + "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L22)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23", + "id": "3752da45df0ba78cc9ac01a10b398e4ad74e6ddd572764cf2f361e523a43a998", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -919,19 +919,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 540, - "length": 61, + "start": 726, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -1051,42 +1051,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(A.S[3])" } }, { "type": "node", - "name": "this.bad0_external(bad_arr)", + "name": "this.bad1_external(s)", "source_mapping": { - "start": 569, - "length": 27, + "start": 763, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 22 + 30 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 540, - "length": 61, + "start": 726, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -1206,16 +1206,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(A.S[3])" } } } } ], - "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#22)\n", - "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L22)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L21-L23", - "id": "3752da45df0ba78cc9ac01a10b398e4ad74e6ddd572764cf2f361e523a43a998", + "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#30)\n", + "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L30)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L29-L31", + "id": "3febdd98f71332c80290c9557c5ef89ea9dbea4f520a084b0307f21b00da5010", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1224,19 +1224,19 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1511, - "length": 142, + "start": 852, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1356,42 +1356,42 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } }, { "type": "node", - "name": "event2_bad(s)", + "name": "b = abi.encode(bad_arr)", "source_mapping": { - "start": 1630, - "length": 18, + "start": 971, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 50 + 35 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1511, - "length": 142, + "start": 852, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1511,16 +1511,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } } } } ], - "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#50)\n", - "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L50)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51", - "id": "e77767c95f4548636027a859ca0c63402cfb50af242f116dd3cfc5b038a4128e", + "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#35)\n", + "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L35)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L34-L36", + "id": "d5860309d331920d1e3f44508fea706df75a4a7c2e93666ca96ca00ef32d7e01", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1529,19 +1529,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1296, - "length": 148, + "start": 1511, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1661,42 +1661,42 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } }, { "type": "node", - "name": "event1_bad(bad_arr)", + "name": "event2_bad(s)", "source_mapping": { - "start": 1415, - "length": 24, + "start": 1630, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 45 + 50 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1296, - "length": 148, + "start": 1511, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1816,16 +1816,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } } } } ], - "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#45)\n", - "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L45)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L44-L46", - "id": "144c77aebb4037fe38c2864892ecb888a4fb7d5e92e321e664b2d2226658a166", + "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#50)\n", + "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L50)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.4.25/storage_ABIEncoderV2_array.sol#L49-L51", + "id": "e77767c95f4548636027a859ca0c63402cfb50af242f116dd3cfc5b038a4128e", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" diff --git a/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json b/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json index fa86e1532..4313bb02a 100644 --- a/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json +++ b/tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol.0.5.9.ABIEncoderV2Array.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1536, - "length": 142, + "start": 744, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -136,42 +136,42 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1(A.S[3])" } }, { "type": "node", - "name": "event2_bad(s)", + "name": "this.bad1_external(s)", "source_mapping": { - "start": 1655, - "length": 18, + "start": 788, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 50 + 30 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1536, - "length": 142, + "start": 744, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 29, + 30, + 31 ], "starting_column": 3, "ending_column": 4 @@ -291,16 +291,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1(A.S[3])" } } } } ], - "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#50)\n", - "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L50)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L49-L51", - "id": "9c6da636be98419174c8e81e73efc09e7b942f9cf477cf0de793fb92c88fc976", + "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#30)\n", + "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L30)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L29-L31", + "id": "04f20a6b780d160f34e95fca8f1dc426e8d05eaf7a452340a809bdeafcb84efb", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -309,19 +309,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 1321, - "length": 148, + "start": 1101, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -441,42 +441,42 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad3()" } }, { "type": "node", - "name": "event1_bad(bad_arr)", + "name": "b = abi.encode(s)", "source_mapping": { - "start": 1440, - "length": 24, + "start": 1220, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 45 + 40 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 1321, - "length": 148, + "start": 1101, + "length": 154, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 44, - 45, - 46 + 39, + 40, + 41 ], "starting_column": 3, "ending_column": 4 @@ -596,16 +596,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad3()" } } } } ], - "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#45)\n", - "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L45)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46", - "id": "6e9dfeb7f6ea7c989276fa8c5e27d71ab0f6b63ee878fb3f761dab9d07942246", + "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#40)\n", + "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L40)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41", + "id": "37e980d8d34fcffe10d2533052de986dd57c1d45700f02234332b275b532c71d", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -614,19 +614,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 744, - "length": 70, + "start": 549, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -746,42 +746,42 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad0()" } }, { "type": "node", - "name": "this.bad1_external(s)", + "name": "this.bad0_external(bad_arr)", "source_mapping": { - "start": 788, - "length": 21, + "start": 578, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 30 + 22 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 744, - "length": 70, + "start": 549, + "length": 61, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31 + 21, + 22, + 23 ], "starting_column": 3, "ending_column": 4 @@ -901,16 +901,16 @@ "ending_column": 2 } }, - "signature": "bad1(A.S[3])" + "signature": "bad0()" } } } } ], - "description": "Function A.bad1(A.S[3]) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#29-31) trigger an abi encoding bug:\n\t- this.bad1_external(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#30)\n", - "markdown": "Function [A.bad1(A.S[3])](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L29-L31) trigger an abi encoding bug:\n\t- [this.bad1_external(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L30)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L29-L31", - "id": "04f20a6b780d160f34e95fca8f1dc426e8d05eaf7a452340a809bdeafcb84efb", + "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#22)\n", + "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L22)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L21-L23", + "id": "4755c0ac779753117c13ea710352c179c82da332c5be5f08ea5da28efa4c63b6", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -919,19 +919,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 549, - "length": 61, + "start": 1321, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -1051,42 +1051,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } }, { "type": "node", - "name": "this.bad0_external(bad_arr)", + "name": "event1_bad(bad_arr)", "source_mapping": { - "start": 578, - "length": 27, + "start": 1440, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 22 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 549, - "length": 61, + "start": 1321, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 44, + 45, + 46 ], "starting_column": 3, "ending_column": 4 @@ -1206,16 +1206,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } } } } ], - "description": "Function A.bad0() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#21-23) trigger an abi encoding bug:\n\t- this.bad0_external(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#22)\n", - "markdown": "Function [A.bad0()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L21-L23) trigger an abi encoding bug:\n\t- [this.bad0_external(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L22)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L21-L23", - "id": "4755c0ac779753117c13ea710352c179c82da332c5be5f08ea5da28efa4c63b6", + "description": "Function A.bad4() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#44-46) trigger an abi encoding bug:\n\t- event1_bad(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#45)\n", + "markdown": "Function [A.bad4()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46) trigger an abi encoding bug:\n\t- [event1_bad(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L45)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L44-L46", + "id": "6e9dfeb7f6ea7c989276fa8c5e27d71ab0f6b63ee878fb3f761dab9d07942246", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1224,19 +1224,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 877, - "length": 160, + "start": 1536, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1356,42 +1356,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } }, { "type": "node", - "name": "b = abi.encode(bad_arr)", + "name": "event2_bad(s)", "source_mapping": { - "start": 996, - "length": 36, + "start": 1655, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 35 + 50 ], "starting_column": 5, - "ending_column": 41 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 877, - "length": 160, + "start": 1536, + "length": 142, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 34, - 35, - 36 + 49, + 50, + 51 ], "starting_column": 3, "ending_column": 4 @@ -1511,16 +1511,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } } } } ], - "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#35)\n", - "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L35)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36", - "id": "e976cd11118a9f5aaacfe5715cef990140fd67c7a35682446aedc878b63b3b24", + "description": "Function A.bad5() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#49-51) trigger an abi encoding bug:\n\t- event2_bad(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#50)\n", + "markdown": "Function [A.bad5()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L49-L51) trigger an abi encoding bug:\n\t- [event2_bad(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L50)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L49-L51", + "id": "9c6da636be98419174c8e81e73efc09e7b942f9cf477cf0de793fb92c88fc976", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" @@ -1529,19 +1529,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1101, - "length": 154, + "start": 877, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1661,42 +1661,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "b = abi.encode(s)", + "name": "b = abi.encode(bad_arr)", "source_mapping": { - "start": 1220, - "length": 30, + "start": 996, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 40 + 35 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1101, - "length": 154, + "start": 877, + "length": 160, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41 + 34, + 35, + 36 ], "starting_column": 3, "ending_column": 4 @@ -1816,16 +1816,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } } } } ], - "description": "Function A.bad3() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#39-41) trigger an abi encoding bug:\n\t- b = abi.encode(s) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#40)\n", - "markdown": "Function [A.bad3()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41) trigger an abi encoding bug:\n\t- [b = abi.encode(s)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L40)\n", - "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L39-L41", - "id": "37e980d8d34fcffe10d2533052de986dd57c1d45700f02234332b275b532c71d", + "description": "Function A.bad2() (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#34-36) trigger an abi encoding bug:\n\t- b = abi.encode(bad_arr) (tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#35)\n", + "markdown": "Function [A.bad2()](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36) trigger an abi encoding bug:\n\t- [b = abi.encode(bad_arr)](tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L35)\n", + "first_markdown_element": "tests/detectors/abiencoderv2-array/0.5.9/storage_ABIEncoderV2_array.sol#L34-L36", + "id": "e976cd11118a9f5aaacfe5715cef990140fd67c7a35682446aedc878b63b3b24", "check": "abiencoderv2-array", "impact": "High", "confidence": "High" diff --git a/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json b/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json index 54595becc..b215f0e96 100644 --- a/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json +++ b/tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol.0.4.25.ArbitrarySend.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 147, - "length": 79, + "start": 301, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -80,42 +80,42 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } }, { "type": "node", - "name": "msg.sender.send(address(this).balance)", + "name": "destination.send(address(this).balance)", "source_mapping": { - "start": 181, - "length": 38, + "start": 337, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 9, - "ending_column": 47 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 147, - "length": 79, + "start": 301, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -179,16 +179,16 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } } } } ], - "description": "Test.direct() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#12)\n", - "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L12)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13", - "id": "477cc1ab9fa3d2263400e47d09146eaed3e478f5eecf7856b59d49a2a5093a1c", + "description": "Test.indirect() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#20)\n", + "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L20)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21", + "id": "4759805615df746a3d8a6c068ce885d2c18c46edf411f83ae004593958caafe7", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" @@ -197,19 +197,19 @@ "elements": [ { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 301, - "length": 82, + "start": 147, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -273,42 +273,42 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } }, { "type": "node", - "name": "destination.send(address(this).balance)", + "name": "msg.sender.send(address(this).balance)", "source_mapping": { - "start": 337, - "length": 39, + "start": 181, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 301, - "length": 82, + "start": 147, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -372,16 +372,16 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } } } } ], - "description": "Test.indirect() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#20)\n", - "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L20)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L19-L21", - "id": "4759805615df746a3d8a6c068ce885d2c18c46edf411f83ae004593958caafe7", + "description": "Test.direct() (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#12)\n", + "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L12)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.4.25/arbitrary_send.sol#L11-L13", + "id": "477cc1ab9fa3d2263400e47d09146eaed3e478f5eecf7856b59d49a2a5093a1c", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json b/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json index a87969ad5..0f0fe4d57 100644 --- a/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json +++ b/tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol.0.7.6.ArbitrarySend.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 162, - "length": 79, + "start": 316, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -80,42 +80,42 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } }, { "type": "node", - "name": "msg.sender.send(address(this).balance)", + "name": "destination.send(address(this).balance)", "source_mapping": { - "start": 196, - "length": 38, + "start": 352, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 9, - "ending_column": 47 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "direct", + "name": "indirect", "source_mapping": { - "start": 162, - "length": 79, + "start": 316, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -179,16 +179,16 @@ "ending_column": 2 } }, - "signature": "direct()" + "signature": "indirect()" } } } } ], - "description": "Test.direct() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#12)\n", - "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L12)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13", - "id": "90d9178119fb586af18c2298136d7f1af4d33a9b702b94d2ca0fcdbe6ee783c6", + "description": "Test.indirect() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#20)\n", + "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L20)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21", + "id": "3bf41470de6f5fec21d1da5741e7d63ee1d3b63cfd2646d697274f4495e3f1a9", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" @@ -197,19 +197,19 @@ "elements": [ { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 316, - "length": 82, + "start": 162, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -273,42 +273,42 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } }, { "type": "node", - "name": "destination.send(address(this).balance)", + "name": "msg.sender.send(address(this).balance)", "source_mapping": { - "start": 352, - "length": 39, + "start": 196, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "indirect", + "name": "direct", "source_mapping": { - "start": 316, - "length": 82, + "start": 162, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -372,16 +372,16 @@ "ending_column": 2 } }, - "signature": "indirect()" + "signature": "direct()" } } } } ], - "description": "Test.indirect() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#20)\n", - "markdown": "[Test.indirect()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21) sends eth to arbitrary user\n\tDangerous calls:\n\t- [destination.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L20)\n", - "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L19-L21", - "id": "3bf41470de6f5fec21d1da5741e7d63ee1d3b63cfd2646d697274f4495e3f1a9", + "description": "Test.direct() (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#12)\n", + "markdown": "[Test.direct()](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13) sends eth to arbitrary user\n\tDangerous calls:\n\t- [msg.sender.send(address(this).balance)](tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L12)\n", + "first_markdown_element": "tests/detectors/arbitrary-send/0.7.6/arbitrary_send.sol#L11-L13", + "id": "90d9178119fb586af18c2298136d7f1af4d33a9b702b94d2ca0fcdbe6ee783c6", "check": "arbitrary-send", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json b/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json index c6ed351f1..26dab9b12 100644 --- a/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.4.25/array_by_reference.sol.0.4.25.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 855, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 686, + "start": 688, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 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 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 822, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 571, + "length": 113, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 855, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 822, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 688, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 571, - "length": 113, + "start": 498, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 686, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 686, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 67, + "start": 571, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 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": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 571, - "length": 113, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 686, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 855, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 688, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 822, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 688, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 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": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 67, + "start": 571, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 855, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 688, - "length": 440, + "start": 0, + "length": 686, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 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": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 822, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 688, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 686, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 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": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 571, - "length": 113, + "start": 498, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.4.25/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json b/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json index 724e17bf2..ff0c4e610 100644 --- a/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.5.16/array_by_reference.sol.0.5.16.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 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 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 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": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 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": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 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": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 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": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.5.16/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json b/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json index c6dcc82f8..20fdaf675 100644 --- a/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.6.11/array_by_reference.sol.0.6.11.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 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 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 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": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 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": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 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": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 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": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.6.11/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json b/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json index 65bea0e79..bbf6688b3 100644 --- a/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json +++ b/tests/detectors/array-by-reference/0.7.6/array_by_reference.sol.0.7.6.ArrayByReference.json @@ -6,19 +6,21 @@ "type": "function", "name": "f", "source_mapping": { - "start": 40, - "length": 167, + "start": 869, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 5, "ending_column": 6 @@ -26,48 +28,41 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 0, - "length": 700, + "start": 702, + "length": 440, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 1, - 2, - 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 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, "signature": "f()" @@ -77,18 +72,80 @@ "type": "variable", "name": "x", "source_mapping": { - "start": 17, - "length": 16, + "start": 836, + "length": 9, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 2 + 39 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + } + } + }, + { + "type": "function", + "name": "setByValueAndReturn", + "source_mapping": { + "start": 578, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -136,6 +193,143 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "setByValueAndReturn(uint256[1])" + } + } + ], + "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", + "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "check": "array-by-reference", + "impact": "High", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "f", + "source_mapping": { + "start": 869, + "length": 269, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45, + 46, + 47, + 48 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "f()" + } + }, + { + "type": "variable", + "name": "x", + "source_mapping": { + "start": 836, + "length": 9, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 39 + ], + "starting_column": 5, + "ending_column": 14 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 702, + "length": 440, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 1, + "ending_column": 0 + } } } }, @@ -209,10 +403,10 @@ } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", - "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", + "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", + "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -358,20 +552,19 @@ }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -423,14 +616,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", - "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", + "id": "79a462bf06ae529ad099f2170100298da30766fcc06884e03436d2b53110d208", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -439,22 +632,21 @@ "elements": [ { "type": "function", - "name": "g", + "name": "f", "source_mapping": { - "start": 213, - "length": 198, + "start": 40, + "length": 167, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 5, "ending_column": 6 @@ -506,116 +698,91 @@ "ending_column": 2 } }, - "signature": "g()" + "signature": "f()" } }, { "type": "variable", - "name": "y", + "name": "x", "source_mapping": { - "start": 243, - "length": 21, + "start": 17, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 11 + 2 ], - "starting_column": 9, - "ending_column": 30 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "g", + "type": "contract", + "name": "C", "source_mapping": { - "start": 213, - "length": 198, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, 13, 14, - 15 + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "g()" + "starting_column": 1, + "ending_column": 2 } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -667,14 +834,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", - "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", + "description": "C.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#4-8) passes array C.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#2)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8) passes array [C.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L2)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L4-L8", + "id": "7f1eda9be40002affd2e8e31d172d3ee3374f37b1106118c79f4add7a133bbd0", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -812,260 +979,55 @@ 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": "g()" - } - } - } - }, - { - "type": "function", - "name": "setByValueAndReturn", - "source_mapping": { - "start": 578, - "length": 120, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 700, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 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": "setByValueAndReturn(uint256[1])" - } - } - ], - "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", - "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", - "check": "array-by-reference", - "impact": "High", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "f", - "source_mapping": { - "start": 869, - "length": 269, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "f()" - } - }, - { - "type": "variable", - "name": "x", - "source_mapping": { - "start": 836, - "length": 9, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 39 - ], - "starting_column": 5, - "ending_column": 14 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "D", - "source_mapping": { - "start": 702, - "length": 440, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 1, - "ending_column": 0 + 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": "g()" } } } }, { "type": "function", - "name": "setByValue", + "name": "setByValueAndReturn", "source_mapping": { - "start": 498, - "length": 74, + "start": 578, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1117,14 +1079,14 @@ "ending_column": 2 } }, - "signature": "setByValue(uint256[1])" + "signature": "setByValueAndReturn(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", - "id": "1520955a53c36e391abbaf648a91a5a12d432f0f4746b0a8187d0988a6a66846", + "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", + "id": "8655e8acd84a6e8152acd2d9730ea0dfdda0723e09b2dcbfdbbeb8da8bd04fa5", "check": "array-by-reference", "impact": "High", "confidence": "High" @@ -1133,23 +1095,22 @@ "elements": [ { "type": "function", - "name": "f", + "name": "g", "source_mapping": { - "start": 869, - "length": 269, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48 + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -1157,121 +1118,160 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 702, - "length": 440, + "start": 0, + "length": 700, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 1, + 2, + 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": 0 + "ending_column": 2 } }, - "signature": "f()" + "signature": "g()" } }, { "type": "variable", - "name": "x", + "name": "y", "source_mapping": { - "start": 836, - "length": 9, + "start": 243, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 39 + 11 ], - "starting_column": 5, - "ending_column": 14 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "D", + "type": "function", + "name": "g", "source_mapping": { - "start": 702, - "length": 440, + "start": 213, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 10, + 11, + 12, + 13, + 14, + 15 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 700, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 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": "g()" } } } }, { "type": "function", - "name": "setByValueAndReturn", + "name": "setByValue", "source_mapping": { - "start": 578, - "length": 120, + "start": 498, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -1323,14 +1323,14 @@ "ending_column": 2 } }, - "signature": "setByValueAndReturn(uint256[1])" + "signature": "setByValue(uint256[1])" } } ], - "description": "D.f() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#42-48) passes array D.x (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#39)by reference to C.setByValueAndReturn(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#25-28)which only takes arrays by value\n", - "markdown": "[D.f()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48) passes array [D.x](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L39)by reference to [C.setByValueAndReturn(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L25-L28)which only takes arrays by value\n", - "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L42-L48", - "id": "019912974eabe7e8b1e67ca05b342e5106de13fa93fa0adf599a4259c425bd54", + "description": "C.g() (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#10-15) passes array C.g().y (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#11)by reference to C.setByValue(uint256[1]) (tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#21-23)which only takes arrays by value\n", + "markdown": "[C.g()](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15) passes array [C.g().y](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L11)by reference to [C.setByValue(uint256[1])](tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L21-L23)which only takes arrays by value\n", + "first_markdown_element": "tests/detectors/array-by-reference/0.7.6/array_by_reference.sol#L10-L15", + "id": "d039169712808e785bf2e53f322c1c6fcd6b93a0a0c17f1a701addd09ed83996", "check": "array-by-reference", "impact": "High", "confidence": "High" diff --git a/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json b/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json index 95e4a9ebc..497e0eae9 100644 --- a/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json +++ b/tests/detectors/assembly/0.6.11/inline_assembly_library.sol.0.6.11.Assembly.json @@ -4,23 +4,39 @@ "elements": [ { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -87,48 +103,82 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 708, - "length": 104, + "start": 995, + "length": 671, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 ], - "starting_column": 13, - "ending_column": 14 + "starting_column": 9, + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -195,16 +245,16 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } } } } ], - "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#16-18)\n", - "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L16-L18)\n", - "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20", - "id": "a8d71513166310212c49c4edecbdf8fbc3040b1cb5b5756f0ad1971ae7d4cdb1", + "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#24-44)\n", + "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L24-L44)\n", + "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45", + "id": "5964c7440a9efb78bf78544bcdc60c789e3d9dff73438108bcb07ac98d60876a", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -213,39 +263,23 @@ "elements": [ { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -312,82 +346,48 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 995, - "length": 671, + "start": 708, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44 + 16, + 17, + 18 ], - "starting_column": 9, - "ending_column": 10 + "starting_column": 13, + "ending_column": 14 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -454,16 +454,16 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } } } } ], - "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#24-44)\n", - "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L24-L44)\n", - "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L23-L45", - "id": "5964c7440a9efb78bf78544bcdc60c789e3d9dff73438108bcb07ac98d60876a", + "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.6.11/inline_assembly_library.sol#16-18)\n", + "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L16-L18)\n", + "first_markdown_element": "tests/detectors/assembly/0.6.11/inline_assembly_library.sol#L14-L20", + "id": "a8d71513166310212c49c4edecbdf8fbc3040b1cb5b5756f0ad1971ae7d4cdb1", "check": "assembly", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json b/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json index a0f88f577..be646d7e6 100644 --- a/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json +++ b/tests/detectors/assembly/0.7.6/inline_assembly_library.sol.0.7.6.Assembly.json @@ -4,23 +4,39 @@ "elements": [ { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -87,48 +103,82 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 708, - "length": 104, + "start": 995, + "length": 671, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18 + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44 ], - "starting_column": 13, - "ending_column": 14 + "starting_column": 9, + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumAsm", + "name": "sumPureAsm", "source_mapping": { - "start": 574, - "length": 254, + "start": 911, + "length": 761, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18, - 19, - 20 + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -195,16 +245,16 @@ "ending_column": 2 } }, - "signature": "sumAsm(uint256[])" + "signature": "sumPureAsm(uint256[])" } } } } ], - "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#16-18)\n", - "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L16-L18)\n", - "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20", - "id": "a83582beb2c0460617fa82fbdfc38a050004e285749b17141b63e8051062248b", + "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#24-44)\n", + "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L24-L44)\n", + "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45", + "id": "5cafb3e9d7d87c17203cf2c296eeec7de6b774b2a8d71908f8cfc9b8d916cb4b", "check": "assembly", "impact": "Informational", "confidence": "High" @@ -213,39 +263,23 @@ "elements": [ { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -312,82 +346,48 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } }, { "type": "node", "name": "", "source_mapping": { - "start": 995, - "length": 671, + "start": 708, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44 + 16, + 17, + 18 ], - "starting_column": 9, - "ending_column": 10 + "starting_column": 13, + "ending_column": 14 }, "type_specific_fields": { "parent": { "type": "function", - "name": "sumPureAsm", + "name": "sumAsm", "source_mapping": { - "start": 911, - "length": 761, + "start": 574, + "length": 254, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 + 14, + 15, + 16, + 17, + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -454,16 +454,16 @@ "ending_column": 2 } }, - "signature": "sumPureAsm(uint256[])" + "signature": "sumAsm(uint256[])" } } } } ], - "description": "VectorSum.sumPureAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#23-45) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#24-44)\n", - "markdown": "[VectorSum.sumPureAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L24-L44)\n", - "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L23-L45", - "id": "5cafb3e9d7d87c17203cf2c296eeec7de6b774b2a8d71908f8cfc9b8d916cb4b", + "description": "VectorSum.sumAsm(uint256[]) (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#14-20) uses assembly\n\t- INLINE ASM (tests/detectors/assembly/0.7.6/inline_assembly_library.sol#16-18)\n", + "markdown": "[VectorSum.sumAsm(uint256[])](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20) uses assembly\n\t- [INLINE ASM](tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L16-L18)\n", + "first_markdown_element": "tests/detectors/assembly/0.7.6/inline_assembly_library.sol#L14-L20", + "id": "a83582beb2c0460617fa82fbdfc38a050004e285749b17141b63e8051062248b", "check": "assembly", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json b/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json index c12612b52..1cef2f152 100644 --- a/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.4.25/assert_state_change.sol.0.4.25.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -78,42 +78,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 106, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8", - "id": "a01104ede08ddc5107a2d63d851930d477642029aeef70d6cb44eb2a640b282a", + "description": "A.bad2() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21", + "id": "47c8c39b084f8d339822d44f892cb049c1a3834f52fd48d2dcef80bac56996a3", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 106, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 7 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L19-L21", - "id": "47c8c39b084f8d339822d44f892cb049c1a3834f52fd48d2dcef80bac56996a3", + "description": "A.bad0() (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.4.25/assert_state_change.sol#L6-L8", + "id": "a01104ede08ddc5107a2d63d851930d477642029aeef70d6cb44eb2a640b282a", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json b/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json index 4a8bd498b..b4d566bd4 100644 --- a/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.5.16/assert_state_change.sol.0.5.16.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 77, - "length": 57, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -78,14 +78,14 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(uint256)" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)((s_a += a) > 10)", "source_mapping": { - "start": 106, + "start": 224, "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", @@ -93,7 +93,7 @@ "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, "ending_column": 28 @@ -101,19 +101,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 77, - "length": 57, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(uint256)" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8", - "id": "ed7344e23d057576887c7e524b215bd0b52464ce035f686bab51b271460e43a0", + "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13", + "id": "ea912d34e8adabfd2ce93ecd5723df8d2e7ebec7e66de5fc56f3304c780488b3", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -193,19 +193,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 186, - "length": 66, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -267,14 +267,14 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)((s_a += a) > 10)", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 224, + "start": 106, "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", @@ -282,7 +282,7 @@ "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 12 + 7 ], "starting_column": 5, "ending_column": 28 @@ -290,19 +290,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 186, - "length": 66, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -364,16 +364,16 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad0()" } } } } ], - "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L11-L13", - "id": "ea912d34e8adabfd2ce93ecd5723df8d2e7ebec7e66de5fc56f3304c780488b3", + "description": "A.bad0() (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.5.16/assert_state_change.sol#L6-L8", + "id": "ed7344e23d057576887c7e524b215bd0b52464ce035f686bab51b271460e43a0", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json b/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json index 32198c56d..3c1e476b2 100644 --- a/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.6.11/assert_state_change.sol.0.6.11.AssertStateChange.json @@ -193,19 +193,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 186, - "length": 66, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -267,42 +267,42 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += a) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 224, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 12 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 186, - "length": 66, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -364,16 +364,16 @@ "ending_column": 2 } }, - "signature": "bad1(uint256)" + "signature": "bad2()" } } } } ], - "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13", - "id": "c27ede68d9d7c6159032f3aef6bf9fa491390317da33307fa783a93c1b675bd7", + "description": "A.bad2() (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21", + "id": "6f4b2360043bf3035cc152b583d3462d8cc98e91de8577091fe3a0af569d5285", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 398, - "length": 55, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(uint256)" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += a) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 224, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 12 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 398, - "length": 55, + "start": 186, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 11, + 12, + 13 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(uint256)" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L19-L21", - "id": "6f4b2360043bf3035cc152b583d3462d8cc98e91de8577091fe3a0af569d5285", + "description": "A.bad1(uint256) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#11-13) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += a) > 10) (tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#12)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad1(uint256)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += a) > 10)](tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L12)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.6.11/assert_state_change.sol#L11-L13", + "id": "c27ede68d9d7c6159032f3aef6bf9fa491390317da33307fa783a93c1b675bd7", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json b/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json index e54d92406..98f36c0cd 100644 --- a/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json +++ b/tests/detectors/assert-state-change/0.7.6/assert_state_change.sol.0.7.6.AssertStateChange.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -78,42 +78,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "assert(bool)((s_a += 1) > 10)", + "name": "assert(bool)(bad2_callee())", "source_mapping": { - "start": 106, - "length": 23, + "start": 427, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 7 + 20 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 77, - "length": 57, + "start": 398, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -175,16 +175,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "A.bad0() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8", - "id": "a710d11e5510f0eb3acb2c1ec524779253f25bf2931bce4cb9c5c048ec586b80", + "description": "A.bad2() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21", + "id": "4b31923b05dec7d68f1bf133b986b4ec06fcc82ff3b8f0414d3ee3d623b69265", "check": "assert-state-change", "impact": "Informational", "confidence": "High" @@ -382,19 +382,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -456,42 +456,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "assert(bool)(bad2_callee())", + "name": "assert(bool)((s_a += 1) > 10)", "source_mapping": { - "start": 427, - "length": 21, + "start": 106, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 20 + 7 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 398, - "length": 55, + "start": 77, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -553,16 +553,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "A.bad2() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#19-21) has an assert() call which possibly changes state.\n\t-assert(bool)(bad2_callee()) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#20)\nConsider using require() or change the invariant to not modify the state.\n", - "markdown": "[A.bad2()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21) has an assert() call which possibly changes state.\n\t-[assert(bool)(bad2_callee())](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L20)\nConsider using require() or change the invariant to not modify the state.\n", - "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L19-L21", - "id": "4b31923b05dec7d68f1bf133b986b4ec06fcc82ff3b8f0414d3ee3d623b69265", + "description": "A.bad0() (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#6-8) has an assert() call which possibly changes state.\n\t-assert(bool)((s_a += 1) > 10) (tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#7)\nConsider using require() or change the invariant to not modify the state.\n", + "markdown": "[A.bad0()](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8) has an assert() call which possibly changes state.\n\t-[assert(bool)((s_a += 1) > 10)](tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L7)\nConsider using require() or change the invariant to not modify the state.\n", + "first_markdown_element": "tests/detectors/assert-state-change/0.7.6/assert_state_change.sol#L6-L8", + "id": "a710d11e5510f0eb3acb2c1ec524779253f25bf2931bce4cb9c5c048ec586b80", "check": "assert-state-change", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json index 65ca6e8cc..493f5a04c 100644 --- a/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol.0.4.25.MultipleCallsInLoop.json @@ -1,148 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 173, - "length": 150, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoopBase", - "source_mapping": { - "start": 0, - "length": 325, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "destinations_base[i].transfer(i)", - "source_mapping": { - "start": 274, - "length": 32, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 11 - ], - "starting_column": 13, - "ending_column": 45 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 173, - "length": 150, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 9, - 10, - 11, - 12, - 13 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoopBase", - "source_mapping": { - "start": 0, - "length": 325, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations_base[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations_base[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13", - "id": "66e6cb3d36ce6385ebe80eb42e75cfcc0be03eee32eb49b287c75258de7433f6", - "check": "calls-loop", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { @@ -330,24 +187,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 671, - "length": 245, + "start": 1074, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -404,47 +256,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal(address,uint256)" } }, { "type": "node", - "name": "destinations[i].transfer(i)", + "name": "a.transfer(i)", "source_mapping": { - "start": 872, - "length": 27, + "start": 1135, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 35 + 46 ], - "starting_column": 13, - "ending_column": 40 + "starting_column": 9, + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 671, - "length": 245, + "start": 1074, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -501,16 +348,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal(address,uint256)" } } } } ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37", - "id": "bcf4888be2bdca9c6e3794ed50d3a0c4cbffe97f6cafdd8c9f6b2a940f92330d", + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: a.transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [a.transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47", + "id": "29874ab93647beebd98e69e6e02bfb9e8d07d22d82990b77e1e33ea9d64caddc", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -519,19 +366,167 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad_base", "source_mapping": { - "start": 1074, - "length": 81, + "start": 173, + "length": 150, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoopBase", + "source_mapping": { + "start": 0, + "length": 325, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "destinations_base[i].transfer(i)", + "source_mapping": { + "start": 274, + "length": 32, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 11 + ], + "starting_column": 13, + "ending_column": 45 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 173, + "length": 150, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 9, + 10, + 11, + 12, + 13 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoopBase", + "source_mapping": { + "start": 0, + "length": 325, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations_base[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations_base[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L9-L13", + "id": "66e6cb3d36ce6385ebe80eb42e75cfcc0be03eee32eb49b287c75258de7433f6", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 671, + "length": 245, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -588,42 +583,47 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad2()" } }, { "type": "node", - "name": "a.transfer(i)", + "name": "destinations[i].transfer(i)", "source_mapping": { - "start": 1135, - "length": 13, + "start": 872, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 46 + 35 ], - "starting_column": 9, - "ending_column": 22 + "starting_column": 13, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1074, - "length": 81, + "start": 671, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -680,16 +680,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad2()" } } } } ], - "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: a.transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#46)\n", - "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [a.transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L46)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L45-L47", - "id": "29874ab93647beebd98e69e6e02bfb9e8d07d22d82990b77e1e33ea9d64caddc", + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.4.25/multiple_calls_in_loop.sol#L30-L37", + "id": "bcf4888be2bdca9c6e3794ed50d3a0c4cbffe97f6cafdd8c9f6b2a940f92330d", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json index db0e5ff93..845e856d6 100644 --- a/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol.0.5.16.MultipleCallsInLoop.json @@ -1,5 +1,194 @@ [ [ + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 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, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "address(uint160(destinations[i])).transfer(i)", + "source_mapping": { + "start": 922, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 35 + ], + "starting_column": 13, + "ending_column": 58 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 721, + "length": 263, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CallInLoop", + "source_mapping": { + "start": 352, + "length": 892, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", + "is_dependency": false, + "lines": [ + 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, + 45, + 46, + 47, + 48, + 49 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37", + "id": "25c86080b32e786ebc200a68d29ce99aac3f426760b120f9bd359930a78e1e31", + "check": "calls-loop", + "impact": "Low", + "confidence": "Medium" + }, { "elements": [ { @@ -326,195 +515,6 @@ "impact": "Low", "confidence": "Medium" }, - { - "elements": [ - { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 721, - "length": 263, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoop", - "source_mapping": { - "start": 352, - "length": 892, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - }, - { - "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", - "source_mapping": { - "start": 922, - "length": 45, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 35 - ], - "starting_column": 13, - "ending_column": 58 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 721, - "length": 263, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CallInLoop", - "source_mapping": { - "start": 352, - "length": 892, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol", - "is_dependency": false, - "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - } - } - } - ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.5.16/multiple_calls_in_loop.sol#L30-L37", - "id": "25c86080b32e786ebc200a68d29ce99aac3f426760b120f9bd359930a78e1e31", - "check": "calls-loop", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { diff --git a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json index adc2eed6c..15ba782b7 100644 --- a/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol.0.6.11.MultipleCallsInLoop.json @@ -4,21 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", + "name": "bad2", "source_mapping": { - "start": 180, - "length": 168, + "start": 721, + "length": 263, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -26,73 +29,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 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, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad2()" } }, { "type": "node", - "name": "address(uint160(destinations_base[i])).transfer(i)", + "name": "address(uint160(destinations[i])).transfer(i)", "source_mapping": { - "start": 281, - "length": 50, + "start": 922, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 11 + 35 ], "starting_column": 13, - "ending_column": 63 + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_base", + "name": "bad2", "source_mapping": { - "start": 180, - "length": 168, + "start": 721, + "length": 263, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37 ], "starting_column": 5, "ending_column": 6 @@ -100,45 +126,65 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 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, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad2()" } } } } ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13", - "id": "676f5509699708442e5b513a2250f8e0e64781b139d2eafd86273c17528a16ce", + "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#35)\n", + "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L35)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37", + "id": "3b1948778e97667e6e749205edf70beeac8b8db364e68da43900136e2e7f4c8b", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -330,24 +376,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 721, - "length": 263, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -355,96 +398,73 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 922, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 35 + 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 721, - "length": 263, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -452,65 +472,45 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad2() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#30-37) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#35)\n", - "markdown": "[CallInLoop.bad2()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L35)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L30-L37", - "id": "3b1948778e97667e6e749205edf70beeac8b8db364e68da43900136e2e7f4c8b", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.6.11/multiple_calls_in_loop.sol#L9-L13", + "id": "676f5509699708442e5b513a2250f8e0e64781b139d2eafd86273c17528a16ce", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json index ec02650f1..e57b9b63d 100644 --- a/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json +++ b/tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol.0.7.6.MultipleCallsInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_base", + "name": "bad3_internal", "source_mapping": { - "start": 180, - "length": 168, + "start": 1142, + "length": 99, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -26,73 +24,91 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 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, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad3_internal(address,uint256)" } }, { "type": "node", - "name": "address(uint160(destinations_base[i])).transfer(i)", + "name": "address(uint160(a)).transfer(i)", "source_mapping": { - "start": 281, - "length": 50, + "start": 1203, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 11 + 46 ], - "starting_column": 13, - "ending_column": 63 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_base", + "name": "bad3_internal", "source_mapping": { - "start": 180, - "length": 168, + "start": 1142, + "length": 99, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13 + 45, + 46, + 47 ], "starting_column": 5, "ending_column": 6 @@ -100,45 +116,65 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoopBase", + "name": "CallInLoop", "source_mapping": { - "start": 0, - "length": 350, + "start": 352, + "length": 892, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 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, + 45, + 46, + 47, + 48, + 49 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad_base()" + "signature": "bad3_internal(address,uint256)" } } } } ], - "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", - "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13", - "id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8", + "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n", + "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47", + "id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -147,21 +183,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 562, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -169,93 +205,73 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } }, { "type": "node", - "name": "address(uint160(destinations[i])).transfer(i)", + "name": "address(uint160(destinations_base[i])).transfer(i)", "source_mapping": { - "start": 653, - "length": 45, + "start": 281, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 26 + 11 ], "starting_column": 13, - "ending_column": 58 + "ending_column": 63 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad_base", "source_mapping": { - "start": 562, - "length": 153, + "start": 180, + "length": 168, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 9, + 10, + 11, + 12, + 13 ], "starting_column": 5, "ending_column": 6 @@ -263,65 +279,45 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "CallInLoop", + "name": "CallInLoopBase", "source_mapping": { - "start": 352, - "length": 892, + "start": 0, + "length": 350, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 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, - 45, - 46, - 47, - 48, - 49 + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad_base()" } } } } ], - "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n", - "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28", - "id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd", + "description": "CallInLoopBase.bad_base() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n", + "markdown": "[CallInLoopBase.bad_base()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations_base[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13", + "id": "2cb70798cc39fa47453799bd93bf9275930f21bcbfb2746e57cf2b77700b8cd8", "check": "calls-loop", "impact": "Low", "confidence": "Medium" @@ -519,19 +515,21 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1142, - "length": 99, + "start": 562, + "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -588,42 +586,44 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad()" } }, { "type": "node", - "name": "address(uint160(a)).transfer(i)", + "name": "address(uint160(destinations[i])).transfer(i)", "source_mapping": { - "start": 1203, - "length": 31, + "start": 653, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 46 + 26 ], - "starting_column": 9, - "ending_column": 40 + "starting_column": 13, + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1142, - "length": 99, + "start": 562, + "length": 153, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol", "is_dependency": false, "lines": [ - 45, - 46, - 47 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -680,16 +680,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal(address,uint256)" + "signature": "bad()" } } } } ], - "description": "CallInLoop.bad3_internal(address,uint256) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#45-47) has external calls inside a loop: address(uint160(a)).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#46)\n", - "markdown": "[CallInLoop.bad3_internal(address,uint256)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47) has external calls inside a loop: [address(uint160(a)).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L46)\n", - "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L45-L47", - "id": "2834a80b6dbcd04a8c58bd803038e5f03936c886067d1ee39d0a31d0bb9e88ae", + "description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#24-28) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#26)\n", + "markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L26)\n", + "first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L24-L28", + "id": "f11a3c532d51a71adce3b5df738ce354d0a70ea3be928459582028cb72b5fdbd", "check": "calls-loop", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json index eda067155..8f6ef570b 100644 --- a/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.4.25/const_state_variables.sol.0.4.25.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.4.25/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.4.25/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.4.25/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json index 2850554d5..176391911 100644 --- a/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.5.16/const_state_variables.sol.0.5.16.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.5.16/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.5.16/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.5.16/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json index f8abb572e..0400ec6bd 100644 --- a/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.6.11/const_state_variables.sol.0.6.11.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.6.11/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.6.11/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.6.11/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json b/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json index 06c372051..a55359c4e 100644 --- a/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json +++ b/tests/detectors/constable-states/0.7.6/const_state_variables.sol.0.7.6.ConstCandidateStateVars.json @@ -136,52 +136,48 @@ "elements": [ { "type": "variable", - "name": "text2", + "name": "should_be_constant_2", "source_mapping": { - "start": 333, - "length": 20, + "start": 841, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 14 + 43 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "MyConc", "source_mapping": { - "start": 29, - "length": 441, + "start": 746, + "length": 342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 1, "ending_column": 2 @@ -190,10 +186,10 @@ } } ], - "description": "A.text2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#14) should be constant\n", - "markdown": "[A.text2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14", - "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", + "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#43) should be constant\n", + "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43", + "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", "check": "constable-states", "impact": "Optimization", "confidence": "High" @@ -326,48 +322,52 @@ "elements": [ { "type": "variable", - "name": "should_be_constant_2", + "name": "text2", "source_mapping": { - "start": 841, - "length": 33, + "start": 333, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 43 + 14 ], "starting_column": 5, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "MyConc", + "name": "A", "source_mapping": { - "start": 746, - "length": 342, + "start": 29, + "length": 441, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constable-states/0.7.6/const_state_variables.sol", "is_dependency": false, "lines": [ - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52 + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -376,10 +376,10 @@ } } ], - "description": "MyConc.should_be_constant_2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#43) should be constant\n", - "markdown": "[MyConc.should_be_constant_2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43) should be constant\n", - "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L43", - "id": "9a48a4122de1a6a4774a9f1e0d4917bd0fa08f17b4af41b86ba07689e51bf711", + "description": "A.text2 (tests/detectors/constable-states/0.7.6/const_state_variables.sol#14) should be constant\n", + "markdown": "[A.text2](tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14) should be constant\n", + "first_markdown_element": "tests/detectors/constable-states/0.7.6/const_state_variables.sol#L14", + "id": "df11e6201c4558a8c5cd90b55b134b9ca8f07203b2264d3aa93bd7745e8cb4ba", "check": "constable-states", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json b/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json index 6c948ac12..dde8683e5 100644 --- a/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json +++ b/tests/detectors/constant-function-state/0.4.25/constant.sol.0.4.25.ConstantFunctionsState.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "test_view_bug", + "name": "test_constant_bug", "source_mapping": { - "start": 45, - "length": 58, + "start": 113, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constant-function-state/0.4.25/constant.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constant-function-state/0.4.25/constant.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -64,7 +64,7 @@ "ending_column": 2 } }, - "signature": "test_view_bug()" + "signature": "test_constant_bug()" } }, { @@ -130,10 +130,10 @@ } } ], - "description": "Constant.test_view_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", - "markdown": "[Constant.test_view_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", - "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7", - "id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1", + "description": "Constant.test_constant_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", + "markdown": "[Constant.test_constant_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", + "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11", + "id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a", "additional_fields": { "contains_assembly": false }, @@ -145,19 +145,19 @@ "elements": [ { "type": "function", - "name": "test_constant_bug", + "name": "test_view_bug", "source_mapping": { - "start": 113, - "length": 66, + "start": 45, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/constant-function-state/0.4.25/constant.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/constant-function-state/0.4.25/constant.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 5, + 6, + 7 ], "starting_column": 5, "ending_column": 6 @@ -205,7 +205,7 @@ "ending_column": 2 } }, - "signature": "test_constant_bug()" + "signature": "test_view_bug()" } }, { @@ -271,10 +271,10 @@ } } ], - "description": "Constant.test_constant_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", - "markdown": "[Constant.test_constant_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", - "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L9-L11", - "id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a", + "description": "Constant.test_view_bug() (tests/detectors/constant-function-state/0.4.25/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/detectors/constant-function-state/0.4.25/constant.sol#3)\n", + "markdown": "[Constant.test_view_bug()](tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/detectors/constant-function-state/0.4.25/constant.sol#L3)\n", + "first_markdown_element": "tests/detectors/constant-function-state/0.4.25/constant.sol#L5-L7", + "id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1", "additional_fields": { "contains_assembly": false }, diff --git a/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json b/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json index 94fc909e0..9b24da276 100644 --- a/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json +++ b/tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol.0.4.25.ArrayLengthAssignment.json @@ -268,20 +268,20 @@ }, { "type": "node", - "name": "a.x.length = param", + "name": "b.subStruct.x.length = param + 1", "source_mapping": { - "start": 818, - "length": 18, + "start": 964, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "is_dependency": false, "lines": [ - 36 + 41 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 41 }, "type_specific_fields": { "parent": { @@ -394,10 +394,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#36)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L36)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- b.subStruct.x.length = param + 1 (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#41)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [b.subStruct.x.length = param + 1](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L41)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46", - "id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4", + "id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" @@ -469,20 +469,20 @@ }, { "type": "node", - "name": "b.subStruct.x.length = param + 1", + "name": "a.x.length = param", "source_mapping": { - "start": 964, - "length": 32, + "start": 818, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol", "is_dependency": false, "lines": [ - 41 + 36 ], "starting_column": 9, - "ending_column": 41 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -595,10 +595,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- b.subStruct.x.length = param + 1 (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#41)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [b.subStruct.x.length = param + 1](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L41)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#36)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L36)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.4.25/array_length_assignment.sol#L1-L46", - "id": "82175a5c24c40a1afe4c59f4271a2c12e577ad25e89e6e319e47b4f8f2a76943", + "id": "f455c672028771f21282b59fb58b5eac51185eae4ac44e65a2e1f4df6db0c6e4", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json b/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json index 23ff3a166..58c382f8a 100644 --- a/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json +++ b/tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol.0.5.16.ArrayLengthAssignment.json @@ -67,9 +67,9 @@ }, { "type": "node", - "name": "arr.length = param", + "name": "a.x.length = param", "source_mapping": { - "start": 527, + "start": 818, "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", @@ -77,10 +77,10 @@ "filename_short": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", "is_dependency": false, "lines": [ - 26 + 36 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -193,10 +193,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- arr.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#26)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [arr.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L26)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#36)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L36)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46", - "id": "5120add82e5b674971638ddcd430301e4fd0ff0abc12b425d78bb09baa519dd0", + "id": "3ee7c4c1f07506f88bcd3b42a86641b32b24a3978768cbcb99301bd8a1fcb975", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" @@ -268,9 +268,9 @@ }, { "type": "node", - "name": "a.x.length = param", + "name": "arr.length = param", "source_mapping": { - "start": 818, + "start": 527, "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", @@ -278,10 +278,10 @@ "filename_short": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol", "is_dependency": false, "lines": [ - 36 + 26 ], - "starting_column": 9, - "ending_column": 27 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -394,10 +394,10 @@ } } ], - "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- a.x.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#36)\n", - "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [a.x.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L36)\n", + "description": "ArrayLengthAssignment (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#1-46) contract sets array length with a user-controlled value:\n\t- arr.length = param (tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#26)\n", + "markdown": "[ArrayLengthAssignment](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46) contract sets array length with a user-controlled value:\n\t- [arr.length = param](tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L26)\n", "first_markdown_element": "tests/detectors/controlled-array-length/0.5.16/array_length_assignment.sol#L1-L46", - "id": "3ee7c4c1f07506f88bcd3b42a86641b32b24a3978768cbcb99301bd8a1fcb975", + "id": "5120add82e5b674971638ddcd430301e4fd0ff0abc12b425d78bb09baa519dd0", "check": "controlled-array-length", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json index 568e9e66f..2416b6981 100644 --- a/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol.0.4.25.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11", - "id": "90d4f387ca3c669975a3ed4d7a5b09665b786a1078e16ced61adf1c3f9f6efb8", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20", + "id": "12d6ba2d0139326b442352b37028ff77dfbdc625870a5ae858e6107cfa89cfbb", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L18-L20", - "id": "12d6ba2d0139326b442352b37028ff77dfbdc625870a5ae858e6107cfa89cfbb", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.4.25/controlled_delegatecall.sol#L8-L11", + "id": "90d4f387ca3c669975a3ed4d7a5b09665b786a1078e16ced61adf1c3f9f6efb8", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json index b7aece8b0..499f7eca4 100644 --- a/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol.0.6.11.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11", - "id": "bed67f615a2f3a872e24eedf23fdedbdfbe5a540dc3f3ea4ca1430581997a8f6", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20", + "id": "82fc8a33f6b16eff457087ec9961f2bce3c61289628dac8284009c8275cea790", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L18-L20", - "id": "82fc8a33f6b16eff457087ec9961f2bce3c61289628dac8284009c8275cea790", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.6.11/controlled_delegatecall.sol#L8-L11", + "id": "bed67f615a2f3a872e24eedf23fdedbdfbe5a540dc3f3ea4ca1430581997a8f6", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json b/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json index 9de54f65d..1ec75f762 100644 --- a/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json +++ b/tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol.0.7.6.ControlledDelegateCall.json @@ -4,20 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -65,43 +64,42 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(data)", + "name": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": { - "start": 201, - "length": 27, + "start": 400, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 10 + 19 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 57 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call", + "name": "bad_delegate_call2", "source_mapping": { - "start": 101, - "length": 134, + "start": 337, + "length": 118, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 18, + 19, + 20 ], "starting_column": 5, "ending_column": 6 @@ -149,16 +147,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call(bytes)" + "signature": "bad_delegate_call2(bytes)" } } } } ], - "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#10)\n", - "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L10)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11", - "id": "59a70e53c14de214629ffde4abab9700cbb3bc66a99e281954e3b9f285a28c2d", + "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#19)\n", + "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L19)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20", + "id": "04a4aed45b4c803d9fa03d70198a8f6d7f4228d2fd5e06bd61c4c68431be2c90", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" @@ -167,19 +165,20 @@ "elements": [ { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -227,42 +226,43 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } }, { "type": "node", - "name": "addr_bad.delegatecall(abi.encode(func_id,data))", + "name": "addr_bad.delegatecall(data)", "source_mapping": { - "start": 400, - "length": 48, + "start": 201, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 19 + 10 ], "starting_column": 9, - "ending_column": 57 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad_delegate_call2", + "name": "bad_delegate_call", "source_mapping": { - "start": 337, - "length": 118, + "start": 101, + "length": 134, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -310,16 +310,16 @@ "ending_column": 2 } }, - "signature": "bad_delegate_call2(bytes)" + "signature": "bad_delegate_call(bytes)" } } } } ], - "description": "C.bad_delegate_call2(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#19)\n", - "markdown": "[C.bad_delegate_call2(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(abi.encode(func_id,data))](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L19)\n", - "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L18-L20", - "id": "04a4aed45b4c803d9fa03d70198a8f6d7f4228d2fd5e06bd61c4c68431be2c90", + "description": "C.bad_delegate_call(bytes) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#10)\n", + "markdown": "[C.bad_delegate_call(bytes)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11) uses delegatecall to a input-controlled function id\n\t- [addr_bad.delegatecall(data)](tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L10)\n", + "first_markdown_element": "tests/detectors/controlled-delegatecall/0.7.6/controlled_delegatecall.sol#L8-L11", + "id": "59a70e53c14de214629ffde4abab9700cbb3bc66a99e281954e3b9f285a28c2d", "check": "controlled-delegatecall", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json index c7852dff3..345256091 100644 --- a/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol.0.4.25.CostlyOperationsInLoop.json @@ -4,158 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "a5134568bf722ac31d7c4d41595c23e1a5ff9b79902e9502f78ccfe9a430b87a", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +96,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -245,7 +111,7 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 31 ], "starting_column": 7, "ending_column": 23 @@ -253,21 +119,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +211,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "92dbac16da1c357bad3a24661de0e92213ac3a701d80655fadb64359ff98d21d", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "0cde1ae7c1410e0eb0d07ff2c21adc20b1c7f7a654780c8d41069ad3a34e73b4", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +229,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +318,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", @@ -467,7 +333,7 @@ "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +341,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +430,153 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "0cde1ae7c1410e0eb0d07ff2c21adc20b1c7f7a654780c8d41069ad3a34e73b4", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "92dbac16da1c357bad3a24661de0e92213ac3a701d80655fadb64359ff98d21d", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.4.25/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a5134568bf722ac31d7c4d41595c23e1a5ff9b79902e9502f78ccfe9a430b87a", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json index 43b104933..6b68acaa0 100644 --- a/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol.0.5.16.CostlyOperationsInLoop.json @@ -141,21 +141,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +228,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -245,29 +243,27 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +338,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "94a7ffd0d3ada78ae8ace1304b276d677415a08dcdff51fc05889122e14633da", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "6ebf2ecedb330a477079a9b72f1ba6ffc5717e08017f700538ec42d3eeab355b", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +356,21 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +445,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -467,7 +460,7 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +468,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +557,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "c0c91898e5b5af12af49b6aefdc4790190101774bffad8e446ba9c857ff86525", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "94a7ffd0d3ada78ae8ace1304b276d677415a08dcdff51fc05889122e14633da", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +575,24 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +667,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", @@ -687,27 +682,32 @@ "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 31 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "6ebf2ecedb330a477079a9b72f1ba6ffc5717e08017f700538ec42d3eeab355b", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.5.16/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "c0c91898e5b5af12af49b6aefdc4790190101774bffad8e446ba9c857ff86525", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json index a24d3b9c5..6ee6d140c 100644 --- a/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol.0.6.11.CostlyOperationsInLoop.json @@ -4,158 +4,24 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "53602b905c8ae68d5325f0c11263f1c9b905406799ec70ca13638f4b1094c37f", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +96,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -245,7 +111,7 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 31 ], "starting_column": 7, "ending_column": 23 @@ -253,21 +119,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2", "source_mapping": { - "start": 754, - "length": 373, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +211,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "a4f559a14007167a13506a3c865345fb2c050b8d2c660804cc5e301db553822a", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "3a1b0ff0bee83dfad403a074eb81c6d845c5da8e99e98433004ba72c1b2c624c", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +229,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 1131, - "length": 343, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +316,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -467,32 +331,27 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3_internal", "source_mapping": { - "start": 1131, - "length": 343, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +426,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "3a1b0ff0bee83dfad403a074eb81c6d845c5da8e99e98433004ba72c1b2c624c", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "4bb89ccd252e2233f67cccaf8b40354da7edcb7c5b36df1edfeab0cafed05b74", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +444,158 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad_base", "source_mapping": { - "start": 1855, - "length": 60, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "53602b905c8ae68d5325f0c11263f1c9b905406799ec70ca13638f4b1094c37f", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +670,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", @@ -687,27 +685,29 @@ "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 22 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad", "source_mapping": { - "start": 1855, - "length": 60, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "4bb89ccd252e2233f67cccaf8b40354da7edcb7c5b36df1edfeab0cafed05b74", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.6.11/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "a4f559a14007167a13506a3c865345fb2c050b8d2c660804cc5e301db553822a", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json index 265519ed2..aacfff434 100644 --- a/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json +++ b/tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol.0.7.6.CostlyOperationsInLoop.json @@ -4,158 +4,19 @@ "elements": [ { "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - }, - { - "type": "node", - "name": "state_variable_base ++", - "source_mapping": { - "start": 271, - "length": 21, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 7, - "ending_column": 28 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad_base", - "source_mapping": { - "start": 102, - "length": 389, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "CostlyOperationsInLoopBase", - "source_mapping": { - "start": 0, - "length": 494, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad_base()" - } - } - } - } - ], - "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#7)\n", - "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9", - "id": "a150cde3056e29877ab4fc8d64ce48a08db143bcb5dc2bcccae8f7848e666940", - "check": "costly-loop", - "impact": "Informational", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -230,14 +91,14 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 912, + "start": 1894, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -245,29 +106,27 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 22 + 42 ], - "starting_column": 7, - "ending_column": 23 + "starting_column": 5, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3_internal", "source_mapping": { - "start": 754, - "length": 373, + "start": 1855, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 41, + 42, + 43 ], "starting_column": 3, "ending_column": 4 @@ -342,16 +201,16 @@ "ending_column": 2 } }, - "signature": "bad()" + "signature": "bad3_internal()" } } } } ], - "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#22)\n", - "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L22)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24", - "id": "c92490750428b640ff46202b5fe9d0eb62ab98a70419cef5ca80530c15b14180", + "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#42)\n", + "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L42)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43", + "id": "77bb0a1e0308312bb9696553d6384270c433fcbebd6311e053c6979d4bdc2128", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -360,24 +219,158 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad_base", "source_mapping": { - "start": 1131, - "length": 343, + "start": 102, + "length": 389, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + }, + { + "type": "node", + "name": "state_variable_base ++", + "source_mapping": { + "start": 271, + "length": 21, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 7, + "ending_column": 28 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad_base", + "source_mapping": { + "start": 102, + "length": 389, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "CostlyOperationsInLoopBase", + "source_mapping": { + "start": 0, + "length": 494, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad_base()" + } + } + } + } + ], + "description": "CostlyOperationsInLoopBase.bad_base() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#5-9) has costly operations inside a loop:\n\t- state_variable_base ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#7)\n", + "markdown": "[CostlyOperationsInLoopBase.bad_base()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9) has costly operations inside a loop:\n\t- [state_variable_base ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L5-L9", + "id": "a150cde3056e29877ab4fc8d64ce48a08db143bcb5dc2bcccae8f7848e666940", + "check": "costly-loop", + "impact": "Informational", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad", + "source_mapping": { + "start": 754, + "length": 373, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -452,14 +445,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1363, + "start": 912, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -467,7 +460,7 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 7, "ending_column": 23 @@ -475,24 +468,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad", "source_mapping": { - "start": 1131, - "length": 343, + "start": 754, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -567,16 +557,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad()" } } } } ], - "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#31)\n", - "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L31)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33", - "id": "f7ebc0c37f31c1a68b8fbfe7530fd66f3c590e5631478cc88d03eeaa8c09f6a6", + "description": "CostlyOperationsInLoop.bad() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#20-24) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#22)\n", + "markdown": "[CostlyOperationsInLoop.bad()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L22)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L20-L24", + "id": "c92490750428b640ff46202b5fe9d0eb62ab98a70419cef5ca80530c15b14180", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" @@ -585,19 +575,24 @@ "elements": [ { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -672,14 +667,14 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } }, { "type": "node", "name": "state_variable ++", "source_mapping": { - "start": 1894, + "start": 1363, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", @@ -687,27 +682,32 @@ "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 42 + 31 ], - "starting_column": 5, - "ending_column": 21 + "starting_column": 7, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_internal", + "name": "bad2", "source_mapping": { - "start": 1855, - "length": 60, + "start": 1131, + "length": 343, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 3, "ending_column": 4 @@ -782,16 +782,16 @@ "ending_column": 2 } }, - "signature": "bad3_internal()" + "signature": "bad2()" } } } } ], - "description": "CostlyOperationsInLoop.bad3_internal() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#41-43) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#42)\n", - "markdown": "[CostlyOperationsInLoop.bad3_internal()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L42)\n", - "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L41-L43", - "id": "77bb0a1e0308312bb9696553d6384270c433fcbebd6311e053c6979d4bdc2128", + "description": "CostlyOperationsInLoop.bad2() (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#26-33) has costly operations inside a loop:\n\t- state_variable ++ (tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#31)\n", + "markdown": "[CostlyOperationsInLoop.bad2()](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33) has costly operations inside a loop:\n\t- [state_variable ++](tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L31)\n", + "first_markdown_element": "tests/detectors/costly-loop/0.7.6/multiple_costly_operations_in_loop.sol#L26-L33", + "id": "f7ebc0c37f31c1a68b8fbfe7530fd66f3c590e5631478cc88d03eeaa8c09f6a6", "check": "costly-loop", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json b/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json index 01574ed8f..13b453532 100644 --- a/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json +++ b/tests/detectors/dead-code/0.8.0/dead-code.sol.0.8.0.DeadCode.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "unused", + "name": "unused_but_shadowed", "source_mapping": { - "start": 19, - "length": 34, + "start": 319, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4 + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -24,34 +24,34 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test", + "name": "Test4", "source_mapping": { - "start": 0, - "length": 55, + "start": 290, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5 + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "unused()" + "signature": "unused_but_shadowed()" } } ], - "description": "Test.unused() (tests/detectors/dead-code/0.8.0/dead-code.sol#2-4) is never used and should be removed\n", - "markdown": "[Test.unused()](tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4", - "id": "a7c13823116566bbbbb68e8a7efa78fe64785fcb8582069373eda7f27c523cb3", + "description": "Test4.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#26-28) is never used and should be removed\n", + "markdown": "[Test4.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28", + "id": "74ea8421cf7fa9e04d243014b61f3eee7a9c7648df98316c3881dd4f1f2ab3f7", "check": "dead-code", "impact": "Informational", "confidence": "Medium" @@ -60,19 +60,19 @@ "elements": [ { "type": "function", - "name": "unused_but_shadowed", + "name": "unused", "source_mapping": { - "start": 79, - "length": 55, + "start": 19, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 2, + 3, + 4 ], "starting_column": 5, "ending_column": 6 @@ -80,35 +80,34 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Test", "source_mapping": { - "start": 58, - "length": 78, + "start": 0, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13 + 1, + 2, + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "unused_but_shadowed()" + "signature": "unused()" } } ], - "description": "Test2.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#10-12) is never used and should be removed\n", - "markdown": "[Test2.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12", - "id": "aaba496684b73955e90b555de174e1cd03f0fee337849c4d58c10ef76ff93582", + "description": "Test.unused() (tests/detectors/dead-code/0.8.0/dead-code.sol#2-4) is never used and should be removed\n", + "markdown": "[Test.unused()](tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L2-L4", + "id": "a7c13823116566bbbbb68e8a7efa78fe64785fcb8582069373eda7f27c523cb3", "check": "dead-code", "impact": "Informational", "confidence": "Medium" @@ -119,17 +118,17 @@ "type": "function", "name": "unused_but_shadowed", "source_mapping": { - "start": 319, - "length": 56, + "start": 79, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28 + 10, + 11, + 12 ], "starting_column": 5, "ending_column": 6 @@ -137,21 +136,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test4", + "name": "Test2", "source_mapping": { - "start": 290, - "length": 87, + "start": 58, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/dead-code/0.8.0/dead-code.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/dead-code/0.8.0/dead-code.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29 + 8, + 9, + 10, + 11, + 12, + 13 ], "starting_column": 1, "ending_column": 2 @@ -161,10 +161,10 @@ } } ], - "description": "Test4.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#26-28) is never used and should be removed\n", - "markdown": "[Test4.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28) is never used and should be removed\n", - "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L26-L28", - "id": "74ea8421cf7fa9e04d243014b61f3eee7a9c7648df98316c3881dd4f1f2ab3f7", + "description": "Test2.unused_but_shadowed() (tests/detectors/dead-code/0.8.0/dead-code.sol#10-12) is never used and should be removed\n", + "markdown": "[Test2.unused_but_shadowed()](tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12) is never used and should be removed\n", + "first_markdown_element": "tests/detectors/dead-code/0.8.0/dead-code.sol#L10-L12", + "id": "aaba496684b73955e90b555de174e1cd03f0fee337849c4d58c10ef76ff93582", "check": "dead-code", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json index 87a7649c6..a50603974 100644 --- a/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol.0.4.25.DelegatecallInLoop.json @@ -4,21 +4,23 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +77,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", @@ -90,29 +92,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +173,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9", - "id": "e057dff3814f9be2d5eca53fe80f41323b8ed90d20bb1e33600bb4e043c40b66", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31", + "id": "77dda07eb6e2fe62ccfc45730422fa556ee775c1f6686148258f1ccc76c86491", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 738, - "length": 312, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 7 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 738, - "length": 312, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L25-L31", - "id": "77dda07eb6e2fe62ccfc45730422fa556ee775c1f6686148258f1ccc76c86491", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.4.25/delegatecall_loop.sol#L5-L9", + "id": "e057dff3814f9be2d5eca53fe80f41323b8ed90d20bb1e33600bb4e043c40b66", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json index a4e0ae28e..191dee79b 100644 --- a/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol.0.6.11.DelegatecallInLoop.json @@ -4,21 +4,21 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 232, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +75,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", @@ -90,7 +90,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 21 ], "starting_column": 13, "ending_column": 101 @@ -98,21 +98,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 232, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +169,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9", - "id": "dfa0a166dfe43235e3fbeab4eadd8b0c7c612cd2fefe3cf281d909129b3b824e", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23", + "id": "50e1b9196dcf1e1d7678184956c7a9d3ba470ab23d7be04163d366b092e2df41", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -187,21 +187,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +258,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", @@ -273,7 +273,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 7 ], "starting_column": 13, "ending_column": 101 @@ -281,21 +281,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +352,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L19-L23", - "id": "50e1b9196dcf1e1d7678184956c7a9d3ba470ab23d7be04163d366b092e2df41", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.6.11/delegatecall_loop.sol#L5-L9", + "id": "dfa0a166dfe43235e3fbeab4eadd8b0c7c612cd2fefe3cf281d909129b3b824e", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json index f0e3397ef..826185128 100644 --- a/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol.0.7.6.DelegatecallInLoop.json @@ -187,21 +187,23 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 496, - "length": 236, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +260,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", @@ -273,29 +275,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 496, - "length": 236, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +356,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23", - "id": "a7f58e5431f4817c8f3e39d7efdb1b1633316d9be3fd73669e509ec33b6bd2d3", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31", + "id": "40cecf9f87caeb930a800e6eb9c668fd6ca5077af3176e48af13c4892bcaf419", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 21 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L25-L31", - "id": "40cecf9f87caeb930a800e6eb9c668fd6ca5077af3176e48af13c4892bcaf419", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.7.6/delegatecall_loop.sol#L19-L23", + "id": "a7f58e5431f4817c8f3e39d7efdb1b1633316d9be3fd73669e509ec33b6bd2d3", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json b/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json index 2d1d81a84..dbddda99c 100644 --- a/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json +++ b/tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol.0.8.0.DelegatecallInLoop.json @@ -4,21 +4,23 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -75,14 +77,14 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 188, + "start": 931, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -90,29 +92,31 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 7 + 28 ], - "starting_column": 13, - "ending_column": 101 + "starting_column": 17, + "ending_column": 105 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad3", "source_mapping": { - "start": 61, - "length": 232, + "start": 738, + "length": 312, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 25, + 26, + 27, + 28, + 29, + 30, + 31 ], "starting_column": 5, "ending_column": 6 @@ -169,16 +173,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9", - "id": "b810117268c82cb0e2ba1fce4549cef820197f59c877fd5f0701661a0f7bbf47", + "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#28)\n", + "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L28)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31", + "id": "0bacdb8b28979c680bd97f07b6a7e17d687dde34b125b23d9d71514d37d5e863", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -187,21 +191,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -258,14 +262,14 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 627, + "start": 188, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -273,7 +277,7 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 21 + 7 ], "starting_column": 13, "ending_column": 101 @@ -281,21 +285,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 496, - "length": 236, + "start": 61, + "length": 232, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21, - 22, - 23 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -352,16 +356,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#21)\n", - "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L21)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23", - "id": "c09bee70334dcac1e61b8295e12f2928ec522c8a0682f6068e6c283361ab1e59", + "description": "C.bad(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#5-9) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L5-L9", + "id": "b810117268c82cb0e2ba1fce4549cef820197f59c877fd5f0701661a0f7bbf47", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" @@ -370,23 +374,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -443,14 +445,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } }, { "type": "node", "name": "address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))", "source_mapping": { - "start": 931, + "start": 627, "length": 88, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", @@ -458,31 +460,29 @@ "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 28 + 21 ], - "starting_column": 17, - "ending_column": 105 + "starting_column": 13, + "ending_column": 101 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2_internal", "source_mapping": { - "start": 738, - "length": 312, + "start": 496, + "length": 236, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31 + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -539,16 +539,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad2_internal(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#25-31) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#28)\n", - "markdown": "[C.bad3(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L28)\n", - "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L25-L31", - "id": "0bacdb8b28979c680bd97f07b6a7e17d687dde34b125b23d9d71514d37d5e863", + "description": "C.bad2_internal(address[]) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#19-23) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) (tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#21)\n", + "markdown": "[C.bad2_internal(address[])](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23) has delegatecall inside a loop in a payable function: [address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i]))](tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L21)\n", + "first_markdown_element": "tests/detectors/delegatecall-loop/0.8.0/delegatecall_loop.sol#L19-L23", + "id": "c09bee70334dcac1e61b8295e12f2928ec522c8a0682f6068e6c283361ab1e59", "check": "delegatecall-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json index d15b49ba2..04072e38a 100644 --- a/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol.0.4.25.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1090, - "length": 53, + "start": 1148, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1148, - "length": 59, + "start": 1090, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.4.25/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json index 8229619e6..f3aaa1eea 100644 --- a/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol.0.5.16.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1090, - "length": 53, + "start": 1148, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1148, - "length": 59, + "start": 1090, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.5.16/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json index 762efcbbb..ab323ee58 100644 --- a/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol.0.6.11.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1204, - "length": 53, + "start": 1262, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1262, - "length": 59, + "start": 1204, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.6.11/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json b/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json index 37cae9bd2..b9930721b 100644 --- a/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json +++ b/tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol.0.7.6.UnindexedERC20EventParameters.json @@ -50,14 +50,14 @@ "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "from" + "parameter_name": "to" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter from\n", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter to\n", "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", - "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", + "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -66,20 +66,20 @@ "elements": [ { "type": "event", - "name": "Transfer", + "name": "Approval", "source_mapping": { - "start": 1204, - "length": 53, + "start": 1262, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "is_dependency": false, "lines": [ - 19 + 20 ], "starting_column": 5, - "ending_column": 58 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -109,17 +109,17 @@ "ending_column": 2 } }, - "signature": "Transfer(address,address,uint256)" + "signature": "Approval(address,address,uint256)" }, "additional_fields": { - "parameter_name": "to" + "parameter_name": "owner" } } ], - "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter to\n", - "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter to\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", - "id": "29c46eb3a4695004959847ae09377729cdf3aa583de95560090b9bd49977c49b", + "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner\n", + "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20)does not index parameter owner\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20", + "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" @@ -128,20 +128,20 @@ "elements": [ { "type": "event", - "name": "Approval", + "name": "Transfer", "source_mapping": { - "start": 1262, - "length": 59, + "start": 1204, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol", "is_dependency": false, "lines": [ - 20 + 19 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 58 }, "type_specific_fields": { "parent": { @@ -171,17 +171,17 @@ "ending_column": 2 } }, - "signature": "Approval(address,address,uint256)" + "signature": "Transfer(address,address,uint256)" }, "additional_fields": { - "parameter_name": "owner" + "parameter_name": "from" } } ], - "description": "ERC20 event IERC20BadApproval(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#20)does not index parameter owner\n", - "markdown": "ERC20 event [IERC20BadApproval(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20)does not index parameter owner\n", - "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L20", - "id": "7d72b56a71ca96db304878f25484c496af1d283a9b777dc788f1473974057025", + "description": "ERC20 event IERC20BadTransfer(address,address,uint256) (tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#19)does not index parameter from\n", + "markdown": "ERC20 event [IERC20BadTransfer(address,address,uint256)](tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19)does not index parameter from\n", + "first_markdown_element": "tests/detectors/erc20-indexed/0.7.6/erc20_indexed.sol#L19", + "id": "a86c7a54115f270548e82d71570dc4d2900b622b0f82c6fce137f3a35314af53", "check": "erc20-indexed", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json index 39425ad2e..de19c0391 100644 --- a/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol.0.4.25.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 46, - "length": 51, + "start": 102, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 56 + "ending_column": 60 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 102, - "length": 55, + "start": 319, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 60 + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 162, - "length": 69, + "start": 273, + "length": 41, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 74 + "ending_column": 46 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 236, - "length": 32, + "start": 162, + "length": 69, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 37 + "ending_column": 74 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 273, - "length": 41, + "start": 236, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 46 + "ending_column": 37 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 319, - "length": 60, + "start": 46, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 65 + "ending_column": 56 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.4.25/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json index c1495435c..aa29d1e15 100644 --- a/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol.0.5.16.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 49, - "length": 51, + "start": 105, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 56 + "ending_column": 60 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 105, - "length": 55, + "start": 322, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 60 + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 165, - "length": 69, + "start": 276, + "length": 41, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 74 + "ending_column": 46 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 239, - "length": 32, + "start": 165, + "length": 69, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 37 + "ending_column": 74 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 276, - "length": 41, + "start": 239, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 46 + "ending_column": 37 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 322, - "length": 60, + "start": 49, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 65 + "ending_column": 56 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.5.16/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json index a8cdb0cf2..fc5ca5ff1 100644 --- a/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol.0.6.11.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 58, - "length": 59, + "start": 122, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 122, - "length": 63, + "start": 371, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 68 + "ending_column": 73 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 190, - "length": 77, + "start": 317, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 82 + "ending_column": 54 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 272, - "length": 40, + "start": 190, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 45 + "ending_column": 82 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 317, - "length": 49, + "start": 272, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 54 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 371, - "length": 68, + "start": 58, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 73 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.6.11/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json b/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json index 3817f3cbc..5bf734be6 100644 --- a/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json +++ b/tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol.0.7.6.IncorrectERC20InterfaceDetection.json @@ -29,20 +29,20 @@ }, { "type": "function", - "name": "transfer", + "name": "approve", "source_mapping": { - "start": 58, - "length": 59, + "start": 122, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 4 + 5 ], "starting_column": 5, - "ending_column": 64 + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -70,14 +70,14 @@ "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#5)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L5)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", + "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -111,20 +111,20 @@ }, { "type": "function", - "name": "approve", + "name": "allowance", "source_mapping": { - "start": 122, - "length": 63, + "start": 371, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 5 + 9 ], "starting_column": 5, - "ending_column": 68 + "ending_column": 73 }, "type_specific_fields": { "parent": { @@ -152,14 +152,14 @@ "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "allowance(address,address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.approve(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#5)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.approve(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L5)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "0fced3029cf59cf348a6b79c58dbb032d837fdd5a5f355600edebda1878e9e2e", + "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -193,20 +193,20 @@ }, { "type": "function", - "name": "transferFrom", + "name": "balanceOf", "source_mapping": { - "start": 190, - "length": 77, + "start": 317, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 5, - "ending_column": 82 + "ending_column": 54 }, "type_specific_fields": { "parent": { @@ -234,14 +234,14 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#6)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L6)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", + "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -275,20 +275,20 @@ }, { "type": "function", - "name": "totalSupply", + "name": "transferFrom", "source_mapping": { - "start": 272, - "length": 40, + "start": 190, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, - "ending_column": 45 + "ending_column": 82 }, "type_specific_fields": { "parent": { @@ -316,14 +316,14 @@ "ending_column": 2 } }, - "signature": "totalSupply()" + "signature": "transferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#6)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transferFrom(address,address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L6)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", + "id": "ba13a1588595032984a3fad39610a2414bb8fcb522d1e632d52fa947ff207d73", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -357,20 +357,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "totalSupply", "source_mapping": { - "start": 317, - "length": 49, + "start": 272, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 8 + 7 ], "starting_column": 5, - "ending_column": 54 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -398,14 +398,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "totalSupply()" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.balanceOf(address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.balanceOf(address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.totalSupply() (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.totalSupply()](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "758ca2456030a36dbd6115f2ccb1a43f53f1dabd66ed079806df0f6b7b4d21ef", + "id": "c951e429e546af28ac08e241d391e874c1c9c70b0732ccfb63f3bbfb3eaac16e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" @@ -439,20 +439,20 @@ }, { "type": "function", - "name": "allowance", + "name": "transfer", "source_mapping": { - "start": 371, - "length": 68, + "start": 58, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol", "is_dependency": false, "lines": [ - 9 + 4 ], "starting_column": 5, - "ending_column": 73 + "ending_column": 64 }, "type_specific_fields": { "parent": { @@ -480,14 +480,14 @@ "ending_column": 2 } }, - "signature": "allowance(address,address)" + "signature": "transfer(address,uint256)" } } ], - "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.allowance(address,address) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.allowance(address,address)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface:Token.transfer(address,uint256) (tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10) has incorrect ERC20 function interface:[Token.transfer(address,uint256)](tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc20-interface/0.7.6/incorrect_erc20_interface.sol#L3-L10", - "id": "1286abfe21b09e21e1cec8b991f73664e104fa39f7f4190690ece3af45bc0c7a", + "id": "d3df2e48ae6e8a1b05b275de574b480853a0839c272ce889e8a1664ae432698e", "check": "erc20-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json index 59ceb015b..76e458068 100644 --- a/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol.0.4.25.IncorrectERC721InterfaceDetection.json @@ -32,50 +32,58 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 50, - "length": 56, + "start": 723, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 26, - "length": 82, + "start": 109, + "length": 739, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 140, - "length": 44, + "start": 549, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 189, - "length": 44, + "start": 351, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 101 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 238, - "length": 108, + "start": 140, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 113 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 351, - "length": 96, + "start": 189, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 101 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 549, - "length": 78, + "start": 50, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 83 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 109, - "length": 739, + "start": 26, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 723, - "length": 48, + "start": 238, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 53 + "ending_column": 113 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.4.25/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json index 6d2d85db1..a13a1c586 100644 --- a/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol.0.5.16.IncorrectERC721InterfaceDetection.json @@ -32,50 +32,58 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, - "length": 56, + "start": 735, + "length": 48, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 748, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 143, - "length": 44, + "start": 561, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 192, - "length": 44, + "start": 363, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 49 + "ending_column": 101 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 241, - "length": 117, + "start": 143, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 122 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 363, - "length": 96, + "start": 192, + "length": 44, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 101 + "ending_column": 49 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 561, - "length": 78, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 83 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 748, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 735, - "length": 48, + "start": 241, + "length": 117, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 53 + "ending_column": 122 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.5.16/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json index 114390883..4ff50f733 100644 --- a/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol.0.6.11.IncorrectERC721InterfaceDetection.json @@ -32,9 +32,9 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, + "start": 800, "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", @@ -42,7 +42,7 @@ "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, "ending_column": 61 @@ -50,32 +50,40 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 829, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 152, - "length": 52, + "start": 610, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 91 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 209, - "length": 52, + "start": 396, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 109 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 266, - "length": 125, + "start": 152, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 130 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 396, - "length": 104, + "start": 209, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 109 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 610, - "length": 86, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 91 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 829, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 800, - "length": 56, + "start": 266, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 130 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.6.11/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json b/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json index c39d35d66..3932e5fa2 100644 --- a/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json +++ b/tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol.0.7.6.IncorrectERC721InterfaceDetection.json @@ -32,9 +32,9 @@ }, { "type": "function", - "name": "supportsInterface", + "name": "getApproved", "source_mapping": { - "start": 53, + "start": 800, "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", @@ -42,7 +42,7 @@ "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 4 + 14 ], "starting_column": 5, "ending_column": 61 @@ -50,32 +50,40 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "IERC165", + "name": "Token", "source_mapping": { - "start": 29, - "length": 82, + "start": 112, + "length": 829, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "supportsInterface(bytes4)" + "signature": "getApproved(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#4)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L4)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#14)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L14)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", + "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -112,20 +120,20 @@ }, { "type": "function", - "name": "balanceOf", + "name": "approve", "source_mapping": { - "start": 152, - "length": 52, + "start": 610, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 91 }, "type_specific_fields": { "parent": { @@ -156,14 +164,14 @@ "ending_column": 2 } }, - "signature": "balanceOf(address)" + "signature": "approve(address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#7)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L7)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#12)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L12)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", + "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -200,20 +208,20 @@ }, { "type": "function", - "name": "ownerOf", + "name": "safeTransferFrom", "source_mapping": { - "start": 209, - "length": 52, + "start": 396, + "length": 104, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 8 + 10 ], "starting_column": 5, - "ending_column": 57 + "ending_column": 109 }, "type_specific_fields": { "parent": { @@ -244,14 +252,14 @@ "ending_column": 2 } }, - "signature": "ownerOf(uint256)" + "signature": "safeTransferFrom(address,address,uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#8)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L8)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#10)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L10)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", + "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -288,20 +296,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "balanceOf", "source_mapping": { - "start": 266, - "length": 125, + "start": 152, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 130 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -332,14 +340,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256,bytes)" + "signature": "balanceOf(address)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#9)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L9)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.balanceOf(address) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#7)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.balanceOf(address)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L7)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", + "id": "6fb9d0320e0b63e2c70f9844d5bea2be958e73beb6eaa4ccb2323ead0c7ef991", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -376,20 +384,20 @@ }, { "type": "function", - "name": "safeTransferFrom", + "name": "ownerOf", "source_mapping": { - "start": 396, - "length": 104, + "start": 209, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 10 + 8 ], "starting_column": 5, - "ending_column": 109 + "ending_column": 57 }, "type_specific_fields": { "parent": { @@ -420,14 +428,14 @@ "ending_column": 2 } }, - "signature": "safeTransferFrom(address,address,uint256)" + "signature": "ownerOf(uint256)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#10)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L10)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.ownerOf(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#8)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.ownerOf(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L8)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "50ab7b0f39f327ac6deccf3c16b4e6fee1dc249072ac41a4bd485ccf0c12315b", + "id": "7d9235dd4ef8bc29a3b7700597cc1e4efb846377c928e5e50c5f49cb37f288d2", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -552,58 +560,50 @@ }, { "type": "function", - "name": "approve", + "name": "supportsInterface", "source_mapping": { - "start": 610, - "length": 86, + "start": 53, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 12 + 4 ], "starting_column": 5, - "ending_column": 91 + "ending_column": 61 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "IERC165", "source_mapping": { - "start": 112, - "length": 829, + "start": 29, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "approve(address,uint256)" + "signature": "supportsInterface(bytes4)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.approve(address,uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#12)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.approve(address,uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L12)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#4)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[IERC165.supportsInterface(bytes4)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L4)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "439c95972d0e084aff057161164b13ab63f85bee31d80b568b7155e58eac4b5d", + "id": "a8593587ca70c51a9ab827843babec3b3eb7f9a08d76eea1e5528e668f7b291d", "check": "erc721-interface", "impact": "Medium", "confidence": "High" @@ -728,20 +728,20 @@ }, { "type": "function", - "name": "getApproved", + "name": "safeTransferFrom", "source_mapping": { - "start": 800, - "length": 56, + "start": 266, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol", "is_dependency": false, "lines": [ - 14 + 9 ], "starting_column": 5, - "ending_column": 61 + "ending_column": 130 }, "type_specific_fields": { "parent": { @@ -772,14 +772,14 @@ "ending_column": 2 } }, - "signature": "getApproved(uint256)" + "signature": "safeTransferFrom(address,address,uint256,bytes)" } } ], - "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.getApproved(uint256) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#14)\n", - "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.getApproved(uint256)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L14)\n", + "description": "Token (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) (tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#9)\n", + "markdown": "[Token](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16) has incorrect ERC721 function interface:[Token.safeTransferFrom(address,address,uint256,bytes)](tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L9)\n", "first_markdown_element": "tests/detectors/erc721-interface/0.7.6/incorrect_erc721_interface.sol#L6-L16", - "id": "2dce4891c7abea0fa8a8a20a8b8482e7e1d46d54bfd750701c604d5dadd8b937", + "id": "ccec612c4b5db00ab59b766b5dde3f8d3a8c6408ef595ab08bff21628587e2a1", "check": "erc721-interface", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json b/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json index 69ac9726d..59060a901 100644 --- a/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.4.25/missing_events_access_control.sol.0.4.25.MissingEventsAccessControl.json @@ -219,19 +219,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -306,14 +307,14 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 421, + "start": 552, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", @@ -321,7 +322,7 @@ "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 25 ], "starting_column": 5, "ending_column": 21 @@ -329,19 +330,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21", - "id": "b2bf34ab3d02054c5f803cd517689d1e3d055b46ca612b2457d845d8d4b94731", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26", + "id": "9411f6b4b3e6f3833a72789f341adf88796bcb58b4a12a47a6f7117746d09c53", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L23-L26", - "id": "9411f6b4b3e6f3833a72789f341adf88796bcb58b4a12a47a6f7117746d09c53", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.4.25/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.4.25/missing_events_access_control.sol#L19-L21", + "id": "b2bf34ab3d02054c5f803cd517689d1e3d055b46ca612b2457d845d8d4b94731", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json b/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json index fa6822d62..5fd204de5 100644 --- a/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.5.16/missing_events_access_control.sol.0.5.16.MissingEventsAccessControl.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 284, - "length": 76, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -91,42 +92,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2(address)" } }, { "type": "node", - "name": "owner = msg.sender", + "name": "owner = newOwner", "source_mapping": { - "start": 325, - "length": 18, + "start": 552, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 16 + 25 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 284, - "length": 76, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -201,16 +203,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad0() (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#16) \n", - "markdown": "[Bug.bad0()](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L16) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17", - "id": "99e09713b41d4b164cc0f4a88f48e6d0bd94128636c57b1bee357ac1fda130d7", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26", + "id": "1562e590ef85efee605bdbf837a010ad06cdb04cec40ac4a7ca7c8cc25cf4161", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -219,19 +221,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -306,42 +308,42 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "owner = newOwner", + "name": "owner = msg.sender", "source_mapping": { - "start": 421, - "length": 16, + "start": 325, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21", - "id": "a8b5423d1085668a105afd674978791ad0b57f1c9ab15b7db682c3dfac7a49b2", + "description": "Bug.bad0() (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#16) \n", + "markdown": "[Bug.bad0()](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L16) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L15-L17", + "id": "99e09713b41d4b164cc0f4a88f48e6d0bd94128636c57b1bee357ac1fda130d7", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L23-L26", - "id": "1562e590ef85efee605bdbf837a010ad06cdb04cec40ac4a7ca7c8cc25cf4161", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.5.16/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.5.16/missing_events_access_control.sol#L19-L21", + "id": "a8b5423d1085668a105afd674978791ad0b57f1c9ab15b7db682c3dfac7a49b2", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json b/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json index 56ea7e2fd..6065b5f9c 100644 --- a/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.6.11/missing_events_access_control.sol.0.6.11.MissingEventsAccessControl.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 284, - "length": 76, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -91,42 +91,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", - "name": "owner = msg.sender", + "name": "owner = newOwner", "source_mapping": { - "start": 325, - "length": 18, + "start": 421, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 16 + 20 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 284, - "length": 76, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -201,16 +201,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad0() (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#16) \n", - "markdown": "[Bug.bad0()](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L16) \n", - "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17", - "id": "81ef3707d2eed91cd30ba6e7368fa40206ec32eec757bb0af632c4b7885bd92c", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21", + "id": "7dd824ee9b2f6100abf2b1e95d84c1b1393a4ab27a06676b2a5d7da164788a00", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -219,19 +219,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -306,42 +306,42 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } }, { "type": "node", - "name": "owner = newOwner", + "name": "owner = msg.sender", "source_mapping": { - "start": 421, - "length": 16, + "start": 325, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 364, - "length": 90, + "start": 284, + "length": 76, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +416,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L19-L21", - "id": "7dd824ee9b2f6100abf2b1e95d84c1b1393a4ab27a06676b2a5d7da164788a00", + "description": "Bug.bad0() (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#15-17) should emit an event for: \n\t- owner = msg.sender (tests/detectors/events-access/0.6.11/missing_events_access_control.sol#16) \n", + "markdown": "[Bug.bad0()](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17) should emit an event for: \n\t- [owner = msg.sender](tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L16) \n", + "first_markdown_element": "tests/detectors/events-access/0.6.11/missing_events_access_control.sol#L15-L17", + "id": "81ef3707d2eed91cd30ba6e7368fa40206ec32eec757bb0af632c4b7885bd92c", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json b/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json index 0b1ba01ff..719b1fb59 100644 --- a/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json +++ b/tests/detectors/events-access/0.7.6/missing_events_access_control.sol.0.7.6.MissingEventsAccessControl.json @@ -219,19 +219,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -306,14 +307,14 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 421, + "start": 552, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", @@ -321,7 +322,7 @@ "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 20 + 25 ], "starting_column": 5, "ending_column": 21 @@ -329,19 +330,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 364, - "length": 90, + "start": 458, + "length": 127, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -416,16 +418,16 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } } } ], - "description": "Bug.bad1(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#20) \n", - "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L20) \n", - "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21", - "id": "d319284c1ad2023a792ace9e7b2371966f789c5acf5ab90b1cc5935060f855f0", + "description": "Bug.bad2(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#25) \n", + "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L25) \n", + "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26", + "id": "3b63f24bd57a54fab8af7d3292bd8444c3dc834bf43dfd96be0e06ca0027299c", "check": "events-access", "impact": "Low", "confidence": "Medium" @@ -434,20 +436,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -522,14 +523,14 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } }, { "type": "node", "name": "owner = newOwner", "source_mapping": { - "start": 552, + "start": 421, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", @@ -537,7 +538,7 @@ "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 25 + 20 ], "starting_column": 5, "ending_column": 21 @@ -545,20 +546,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 458, - "length": 127, + "start": 364, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -633,16 +633,16 @@ "ending_column": 2 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } } } ], - "description": "Bug.bad2(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#23-26) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#25) \n", - "markdown": "[Bug.bad2(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L25) \n", - "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L23-L26", - "id": "3b63f24bd57a54fab8af7d3292bd8444c3dc834bf43dfd96be0e06ca0027299c", + "description": "Bug.bad1(address) (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#19-21) should emit an event for: \n\t- owner = newOwner (tests/detectors/events-access/0.7.6/missing_events_access_control.sol#20) \n", + "markdown": "[Bug.bad1(address)](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21) should emit an event for: \n\t- [owner = newOwner](tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L20) \n", + "first_markdown_element": "tests/detectors/events-access/0.7.6/missing_events_access_control.sol#L19-L21", + "id": "d319284c1ad2023a792ace9e7b2371966f789c5acf5ab90b1cc5935060f855f0", "check": "events-access", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json b/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json index 45837cbba..80bade847 100644 --- a/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json +++ b/tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol.0.7.6.MissingEventsArithmetic.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 392, - "length": 71, + "start": 535, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 22, - 23, - 24 + 30, + 31, + 32 ], "starting_column": 3, "ending_column": 4 @@ -111,42 +111,42 @@ "ending_column": 2 } }, - "signature": "bad0(uint8)" + "signature": "bad1(int16)" } }, { "type": "node", - "name": "uprice8 = _price", + "name": "iprice16 = _price", "source_mapping": { - "start": 442, - "length": 16, + "start": 585, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 23 + 31 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 392, - "length": 71, + "start": 535, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 22, - 23, - 24 + 30, + 31, + 32 ], "starting_column": 3, "ending_column": 4 @@ -241,16 +241,16 @@ "ending_column": 2 } }, - "signature": "bad0(uint8)" + "signature": "bad1(int16)" } } } } ], - "description": "Bug.bad0(uint8) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#22-24) should emit an event for: \n\t- uprice8 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#23) \n", - "markdown": "[Bug.bad0(uint8)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24) should emit an event for: \n\t- [uprice8 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L23) \n", - "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24", - "id": "833efa3b1dab85aef7a00a7bf77bfe290cb2933e11eed34150a1e54a9644a093", + "description": "Bug.bad1(int16) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#30-32) should emit an event for: \n\t- iprice16 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#31) \n", + "markdown": "[Bug.bad1(int16)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32) should emit an event for: \n\t- [iprice16 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L31) \n", + "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32", + "id": "22cd7f2678dfbd4185d6254ad55b620bd3b20a406d88d9f53412ca97d9c3bf03", "check": "events-maths", "impact": "Low", "confidence": "Medium" @@ -259,19 +259,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 535, - "length": 72, + "start": 392, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32 + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -366,42 +366,42 @@ "ending_column": 2 } }, - "signature": "bad1(int16)" + "signature": "bad0(uint8)" } }, { "type": "node", - "name": "iprice16 = _price", + "name": "uprice8 = _price", "source_mapping": { - "start": 585, - "length": 17, + "start": 442, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 31 + 23 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 535, - "length": 72, + "start": 392, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32 + 22, + 23, + 24 ], "starting_column": 3, "ending_column": 4 @@ -496,16 +496,16 @@ "ending_column": 2 } }, - "signature": "bad1(int16)" + "signature": "bad0(uint8)" } } } } ], - "description": "Bug.bad1(int16) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#30-32) should emit an event for: \n\t- iprice16 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#31) \n", - "markdown": "[Bug.bad1(int16)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32) should emit an event for: \n\t- [iprice16 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L31) \n", - "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L30-L32", - "id": "22cd7f2678dfbd4185d6254ad55b620bd3b20a406d88d9f53412ca97d9c3bf03", + "description": "Bug.bad0(uint8) (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#22-24) should emit an event for: \n\t- uprice8 = _price (tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#23) \n", + "markdown": "[Bug.bad0(uint8)](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24) should emit an event for: \n\t- [uprice8 = _price](tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L23) \n", + "first_markdown_element": "tests/detectors/events-maths/0.7.6/missing_events_arithmetic.sol#L22-L24", + "id": "833efa3b1dab85aef7a00a7bf77bfe290cb2933e11eed34150a1e54a9644a093", "check": "events-maths", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json b/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json index 0aea04515..75e76126d 100644 --- a/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json +++ b/tests/detectors/external-function/0.4.25/external_function.sol.0.4.25.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.4.25/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.4.25/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "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.4.25/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.4.25/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.4.25/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.4.25/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "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.4.25/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.4.25/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.4.25/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.4.25/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.4.25/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json b/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json index 340c8107a..4d947de06 100644 --- a/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json +++ b/tests/detectors/external-function/0.5.16/external_function.sol.0.5.16.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "start": 1420, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "start": 1381, + "length": 234, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.5.16/external_function.sol#32-39)\n", - "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.5.16/external_function.sol#L32-L39)\n", - "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L32-L39", - "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", + "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.5.16/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.5.16/external_function.sol#L74-L76)\n", + "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L74-L76", + "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", "check": "external-function", "impact": "Optimization", "confidence": "High" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "start": 554, + "length": 325, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "start": 473, + "length": 408, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/external-function/0.5.16/external_function.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/external-function/0.5.16/external_function.sol", "is_dependency": false, "lines": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "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.5.16/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.5.16/external_function.sol#L74-L76)\n", - "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L74-L76", - "id": "3a0a42d128eff9fb04d8f7605bf2d6f7574c2cbbdffa2dcabbae66d7568ecc59", + "description": "funcNotCalled() should be declared external:\n\t- ContractWithFunctionNotCalled2.funcNotCalled() (tests/detectors/external-function/0.5.16/external_function.sol#32-39)\n", + "markdown": "funcNotCalled() should be declared external:\n\t- [ContractWithFunctionNotCalled2.funcNotCalled()](tests/detectors/external-function/0.5.16/external_function.sol#L32-L39)\n", + "first_markdown_element": "tests/detectors/external-function/0.5.16/external_function.sol#L32-L39", + "id": "80a0a3a3954cc6e314079a1d8d96d6739d521ddbcf738e63078d7f210e443562", "check": "external-function", "impact": "Optimization", "confidence": "High" diff --git a/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json b/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json index eee61a19f..7f600c37d 100644 --- a/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json +++ b/tests/detectors/external-function/0.6.11/external_function.sol.0.6.11.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "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": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "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": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "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", + "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" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "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": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "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": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "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", + "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" diff --git a/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json b/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json index 6e90c47ab..dc3662a91 100644 --- a/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json +++ b/tests/detectors/external-function/0.7.6/external_function.sol.0.7.6.ExternalFunction.json @@ -214,64 +214,60 @@ "elements": [ { "type": "function", - "name": "funcNotCalled", + "name": "parameter_read_ok_for_external", "source_mapping": { - "start": 554, - "length": 325, + "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": [ - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 74, + 75, + 76 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 3, + "ending_column": 4 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ContractWithFunctionNotCalled2", + "name": "FunctionParameterWrite", "source_mapping": { - "start": 473, - "length": 408, + "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": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40 + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "funcNotCalled()" + "signature": "parameter_read_ok_for_external(uint256)" } } ], - "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", + "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" @@ -280,60 +276,64 @@ "elements": [ { "type": "function", - "name": "parameter_read_ok_for_external", + "name": "funcNotCalled", "source_mapping": { - "start": 1420, - "length": 81, + "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": [ - 74, - 75, - 76 + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], - "starting_column": 3, - "ending_column": 4 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FunctionParameterWrite", + "name": "ContractWithFunctionNotCalled2", "source_mapping": { - "start": 1381, - "length": 234, + "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": [ - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "parameter_read_ok_for_external(uint256)" + "signature": "funcNotCalled()" } } ], - "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", + "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" diff --git a/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json b/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json index bf6612ee9..cf71e9f09 100644 --- a/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol.0.4.25.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.4.25/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json b/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json index 8ac1bfd7f..4b86fa6b3 100644 --- a/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol.0.5.16.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.5.16/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json b/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json index 001ac77c1..fafb2911d 100644 --- a/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol.0.6.11.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.6.11/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json b/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json index ec0366a43..a9666a183 100644 --- a/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json +++ b/tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol.0.7.6.FunctionInitializedState.json @@ -97,20 +97,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "z4", "source_mapping": { - "start": 268, - "length": 21, + "start": 842, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 7 + 17 ], "starting_column": 5, - "ending_column": 26 + "ending_column": 28 }, "type_specific_fields": { "parent": { @@ -178,10 +178,10 @@ } } ], - "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7", - "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", + "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17", + "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -190,20 +190,20 @@ "elements": [ { "type": "variable", - "name": "y1", + "name": "x", "source_mapping": { - "start": 357, - "length": 26, + "start": 268, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 9 + 7 ], "starting_column": 5, - "ending_column": 31 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -271,10 +271,10 @@ } } ], - "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9", - "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", + "description": "StateVarInitFromFunction.x (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "markdown": "[StateVarInitFromFunction.x](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7) is set pre-construction with a non-constant function or state variable:\n\t- set()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L7", + "id": "adfa394934c8669a556cfa10c364fe526dd1e295a63959e1e88fe84a919ef354", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -283,20 +283,20 @@ "elements": [ { "type": "variable", - "name": "y2", + "name": "y1", "source_mapping": { - "start": 453, - "length": 35, + "start": 357, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 10 + 9 ], "starting_column": 5, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { @@ -364,10 +364,10 @@ } } ], - "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10", - "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", + "description": "StateVarInitFromFunction.y1 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "markdown": "[StateVarInitFromFunction.y1](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9) is set pre-construction with a non-constant function or state variable:\n\t- 5 + get()\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L9", + "id": "b26f83c06e9aca87637dea02a0f4080fd4226c1ed90c6c2c63da85cb142d67ab", "check": "function-init-state", "impact": "Informational", "confidence": "High" @@ -376,20 +376,20 @@ "elements": [ { "type": "variable", - "name": "z4", + "name": "y2", "source_mapping": { - "start": 842, - "length": 23, + "start": 453, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol", "is_dependency": false, "lines": [ - 17 + 10 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -457,10 +457,10 @@ } } ], - "description": "StateVarInitFromFunction.z4 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "markdown": "[StateVarInitFromFunction.z4](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17) is set pre-construction with a non-constant function or state variable:\n\t- z3 + 5\n", - "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L17", - "id": "8b7eb9ab16397c2f23479d2c3043a675ab5e2b1da07e2697631812d6d7b68525", + "description": "StateVarInitFromFunction.y2 (tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "markdown": "[StateVarInitFromFunction.y2](tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10) is set pre-construction with a non-constant function or state variable:\n\t- (10 + (5 + get()))\n", + "first_markdown_element": "tests/detectors/function-init-state/0.7.6/function_init_state_variables.sol#L10", + "id": "b6e231b9b735794e00b73dddb86b2ba8f7a738d916c99f302fb32b1095c67472", "check": "function-init-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json index c708e7cac..03c6befcb 100644 --- a/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol.0.4.25.IncorrectStrictEquality.json @@ -6,17 +6,18 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 404, - "length": 101, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +25,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 455, - "length": 43, + "start": 683, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 33 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 404, - "length": 101, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +152,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad0()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23", - "id": "d887566c310fa756ee60c8a838f09bf3165adda30dff76b4d8f7bd85f6561610", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35", + "id": "126f956451cb4dcbdac6edb66148b23eabc789962d4fa3a8bd22a682c6c5bfd4", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +253,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad6", "source_mapping": { - "start": 511, - "length": 97, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +276,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 562, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 511, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27", - "id": "a962a2c49344b2acce83236c339daa07cce98d240dd8869bb7d8c5e96d412ff0", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 648, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 612, - "length": 1754, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +359,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 683, - "length": 51, + "start": 1635, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 68 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad6", "source_mapping": { - "start": 648, - "length": 133, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +488,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L32-L35", - "id": "126f956451cb4dcbdac6edb66148b23eabc789962d4fa3a8bd22a682c6c5bfd4", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71", + "id": "2cc246058513fdfe2178c6e9b552bcae42d3c29bc104c3b95734323aeda57396", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +506,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +612,45 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 822, - "length": 51, + "start": 1450, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 61 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +741,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40", - "id": "de67d7a1010855e47722500e73f1156c1c2c222414e661624300ea395102af1a", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64", + "id": "781645f52e6eb4c7a0e38a58537907a6421ded2703ae8b18be68251a02901e7a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,9 +759,9 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 926, + "start": 1056, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -810,10 +769,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -904,14 +863,14 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 961, + "start": 1091, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -919,7 +878,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 48 ], "starting_column": 9, "ending_column": 51 @@ -927,9 +886,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 926, + "start": 1056, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -937,10 +896,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1031,16 +990,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45", - "id": "b6c0963403d985cfcd3eda6d43bc2716eaebcd0d936d9a57d35df4adfbb01e46", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50", + "id": "8f08cca8ee4d2d51c2bf5717f78aa1dd13c6499e430a43b89e5309f20920b11d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,20 +1008,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, - "length": 124, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1070,126 +1028,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1091, - "length": 42, + "start": 3106, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 132 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, - "length": 124, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1197,99 +1123,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad3()" + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L47-L50", - "id": "8f08cca8ee4d2d51c2bf5717f78aa1dd13c6499e430a43b89e5309f20920b11d", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133", + "id": "a65d9228ffbebf6de7f455df00a0de91ee0e23c7f13a306bdc90e16e69a043b3", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1298,22 +1193,19 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1186, - "length": 170, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -1321,128 +1213,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 1274, - "length": 19, + "start": 562, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 54 + 26 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1186, - "length": 170, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -1450,99 +1290,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#54)\n", - "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L54)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57", - "id": "b7b40be64de7150ba57e0f2b6379c672ee431675bbab8b607a82acdd29338d42", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L25-L27", + "id": "a962a2c49344b2acce83236c339daa07cce98d240dd8869bb7d8c5e96d412ff0", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1342,205 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad0", "source_mapping": { - "start": 1362, - "length": 170, + "start": 2935, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2969, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2935, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125", + "id": "abcb113fde0b01cb4a653968a235bf5f3ee70a6f97ae3fa68c3a161c8ca5f6b8", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 926, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1631,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1450, - "length": 19, + "start": 961, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 43 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 926, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +1758,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L59-L64", - "id": "781645f52e6eb4c7a0e38a58537907a6421ded2703ae8b18be68251a02901e7a", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L42-L45", + "id": "b6c0963403d985cfcd3eda6d43bc2716eaebcd0d936d9a57d35df4adfbb01e46", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1776,22 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad4", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1186, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -1910,14 +1882,14 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad4()" } }, { "type": "node", "name": "balance == 10000000000000000000", "source_mapping": { - "start": 1635, + "start": 1274, "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", @@ -1925,7 +1897,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 54 ], "starting_column": 13, "ending_column": 32 @@ -1933,22 +1905,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad4", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1186, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -2039,16 +2011,16 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad4()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L66-L71", - "id": "2cc246058513fdfe2178c6e9b552bcae42d3c29bc104c3b95734323aeda57396", + "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#54)\n", + "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L54)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L52-L57", + "id": "b7b40be64de7150ba57e0f2b6379c672ee431675bbab8b607a82acdd29338d42", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2057,19 +2029,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -2129,42 +2101,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(now == 0)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 2969, - "length": 18, + "start": 3034, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 128 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -2224,16 +2196,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L123-L125", - "id": "abcb113fde0b01cb4a653968a235bf5f3ee70a6f97ae3fa68c3a161c8ca5f6b8", + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129", + "id": "d17755463242fbfeef570c2504ff13729a74d8633ade693da26127635b145892", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2214,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2262,94 +2234,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3034, - "length": 25, + "start": 455, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2357,68 +2311,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L127-L129", - "id": "d17755463242fbfeef570c2504ff13729a74d8633ade693da26127635b145892", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L21-L23", + "id": "d887566c310fa756ee60c8a838f09bf3165adda30dff76b4d8f7bd85f6561610", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2363,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 3072, - "length": 67, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2384,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 3106, - "length": 26, + "start": 822, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 38 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 3072, - "length": 67, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2511,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L131-L133", - "id": "a65d9228ffbebf6de7f455df00a0de91ee0e23c7f13a306bdc90e16e69a043b3", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.4.25/incorrect_equality.sol#L37-L40", + "id": "de67d7a1010855e47722500e73f1156c1c2c222414e661624300ea395102af1a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json index 30fe83e32..2fa0608b6 100644 --- a/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol.0.5.16.IncorrectStrictEquality.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 404, - "length": 101, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +24,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 165, - "length": 445, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 455, - "length": 43, + "start": 3034, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 128 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 404, - "length": 101, + "start": 3000, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 127, + 128, + 129 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +119,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 165, - "length": 445, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23", - "id": "f1b10c19ed186a854e281f6b2f29e08d5da8892045a928b0565355802998088a", + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129", + "id": "27fb1eed66075f0883f327ce69bfa39000a4cc6841a39342114cb892a1a0b23b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +189,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad6", "source_mapping": { - "start": 511, - "length": 97, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +212,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 562, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", + "name": "TestContractBalance", "source_mapping": { - "start": 511, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 165, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27", - "id": "43d01e301a135af4627eded0afd320a3cc986834dcd0c77ccec4d85e7ac05b57", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 648, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 612, - "length": 1754, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +295,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 683, - "length": 51, + "start": 1635, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 68 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad6", "source_mapping": { - "start": 648, - "length": 133, + "start": 1538, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +424,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35", - "id": "d00ea5300293e9fe66a52421f56fbb2e48ba4ba942f1d8845e3c2e5bfbbbe66f", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71", + "id": "280c7848636dd05a32dbdff744714307aa1350aebc6031dd862af9aeb6bdebe3", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +442,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +548,45 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 822, - "length": 51, + "start": 1450, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 61 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad5", "source_mapping": { - "start": 787, - "length": 133, + "start": 1362, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +677,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40", - "id": "aee531d35272d761a573246a7f901716f6d1aa6906a0eab19bee4f6f570eb166", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64", + "id": "2fddf13889b45374114f11585944ef935efb365935aff518b505f01d4f6c1c97", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +695,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 926, - "length": 124, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -821,126 +715,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 961, - "length": 42, + "start": 562, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 26 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 926, - "length": 124, + "start": 511, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -948,99 +792,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 612, - "length": 1754, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45", - "id": "7d0195ec395960b56eb4249c96481aec69f59da34ea15128734721ff1844d469", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L25-L27", + "id": "43d01e301a135af4627eded0afd320a3cc986834dcd0c77ccec4d85e7ac05b57", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,9 +844,9 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, + "start": 926, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1059,10 +854,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1153,14 +948,14 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1091, + "start": 961, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1168,7 +963,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 43 ], "starting_column": 9, "ending_column": 51 @@ -1176,9 +971,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1056, + "start": 926, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", @@ -1186,10 +981,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1075,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50", - "id": "a987ef061c48551aeeb83ad7556a7d00d13d4dc5fade167c6dc6d586738bda14", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L42-L45", + "id": "7d0195ec395960b56eb4249c96481aec69f59da34ea15128734721ff1844d469", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1346,19 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1574,128 +1366,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1450, - "length": 19, + "start": 3106, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 132 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad2", "source_mapping": { - "start": 1362, - "length": 170, + "start": 3072, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1703,99 +1461,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L59-L64", - "id": "2fddf13889b45374114f11585944ef935efb365935aff518b505f01d4f6c1c97", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133", + "id": "9adfb849a88f90efbe4e42ae4daea709e51db6af3ae0a8bb2427d8053a832d04", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1531,19 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad0", "source_mapping": { - "start": 1538, - "length": 179, + "start": 2935, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -1827,30 +1551,216 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 612, - "length": 1754, + "start": 2368, + "length": 774, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2969, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2935, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2368, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125", + "id": "9f08ac90026e6fb8bcd20c0ab8f967fe7680689841262bb91747d967ac2564c4", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 1056, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 47, + 48, + 49, + 50 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 612, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, 44, 45, 46, @@ -1910,45 +1820,43 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad3()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 1635, - "length": 19, + "start": 1091, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 48 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad3", "source_mapping": { - "start": 1538, - "length": 179, + "start": 1056, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -2039,16 +1947,16 @@ "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L66-L71", - "id": "280c7848636dd05a32dbdff744714307aa1350aebc6031dd862af9aeb6bdebe3", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L47-L50", + "id": "a987ef061c48551aeeb83ad7556a7d00d13d4dc5fade167c6dc6d586738bda14", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2057,19 +1965,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2077,94 +1986,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(now == 0)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 2969, - "length": 18, + "start": 822, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 38 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 2935, - "length": 59, + "start": 787, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -2172,68 +2113,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L123-L125", - "id": "9f08ac90026e6fb8bcd20c0ab8f967fe7680689841262bb91747d967ac2564c4", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L37-L40", + "id": "aee531d35272d761a573246a7f901716f6d1aa6906a0eab19bee4f6f570eb166", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2214,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2262,94 +2235,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 612, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 3034, - "length": 25, + "start": 683, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 33 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 3000, - "length": 66, + "start": 648, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2357,68 +2362,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2368, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + "start": 612, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L127-L129", - "id": "27fb1eed66075f0883f327ce69bfa39000a4cc6841a39342114cb892a1a0b23b", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L32-L35", + "id": "d00ea5300293e9fe66a52421f56fbb2e48ba4ba942f1d8845e3c2e5bfbbbe66f", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2463,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3072, - "length": 67, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2483,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3106, - "length": 26, + "start": 455, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 22 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3072, - "length": 67, + "start": 404, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2560,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2368, - "length": 774, + "start": 165, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L131-L133", - "id": "9adfb849a88f90efbe4e42ae4daea709e51db6af3ae0a8bb2427d8053a832d04", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.5.16/incorrect_equality.sol#L21-L23", + "id": "f1b10c19ed186a854e281f6b2f29e08d5da8892045a928b0565355802998088a", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json index 367074b6e..6ce8aa280 100644 --- a/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol.0.6.11.IncorrectStrictEquality.json @@ -1,303 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 421, - "length": 101, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 21, - 22, - 23 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0(ERC20Function)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", - "source_mapping": { - "start": 472, - "length": 43, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 22 - ], - "starting_column": 9, - "ending_column": 52 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 421, - "length": 101, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 21, - 22, - 23 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0(ERC20Function)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23", - "id": "df1ee72930fcaa7dc7a92d390be6007c57953a3392aef588a852373da388d850", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 579, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27", - "id": "4d1635766db4dc0687873af3c03047d746b770bcce326793c79210ac16a5c824", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -539,10 +241,195 @@ } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35", - "id": "20756b1d1c5eb722a3edb44b8c7b2a62ca935e4e1a2491bce50856f7f4cf3f4c", + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L32-L35", + "id": "20756b1d1c5eb722a3edb44b8c7b2a62ca935e4e1a2491bce50856f7f4cf3f4c", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2952, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "require(bool)(now == 0)", + "source_mapping": { + "start": 2986, + "length": 18, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 124 + ], + "starting_column": 9, + "ending_column": 27 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 2952, + "length": 59, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 123, + 124, + 125 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125", + "id": "24de80ae388956295db544441f5ab9326af42bd4fcb34e232a23af952d7fe333", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -551,20 +438,20 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 804, - "length": 133, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -655,43 +542,43 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 839, - "length": 51, + "start": 1108, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 48 ], "starting_column": 9, - "ending_column": 60 + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 804, - "length": 133, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -782,16 +669,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40", - "id": "9363dbd2bb3f41b42351b088f7a973902e04ccae0081e5c99354de90890fe6ab", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50", + "id": "3cf7fef3822d0628cc1f441162960a6753d6cdcad5b8c56c84584dba741e806b", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +687,22 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 943, - "length": 124, + "start": 1379, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -904,43 +793,45 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 978, - "length": 42, + "start": 1467, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 61 ], - "starting_column": 9, - "ending_column": 51 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad5", "source_mapping": { - "start": 943, - "length": 124, + "start": 1379, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -1031,16 +922,165 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad5()" + } + } + } + } + ], + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64", + "id": "3e416561dc117d230bbee97788f5a0ff851da92f1def8fb5d7b94461ee6bfbc0", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 528, + "length": 97, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ERC20TestBalance", + "source_mapping": { + "start": 182, + "length": 445, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1(ERC20Variable)" + } + }, + { + "type": "node", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", + "source_mapping": { + "start": 579, + "length": 39, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 26 + ], + "starting_column": 9, + "ending_column": 48 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 528, + "length": 97, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ERC20TestBalance", + "source_mapping": { + "start": 182, + "length": 445, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45", - "id": "50ab6a747d027b81a24ae04b84e6362bd184a5f23080e2af1b6a859ee144f637", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L25-L27", + "id": "4d1635766db4dc0687873af3c03047d746b770bcce326793c79210ac16a5c824", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,9 +1089,9 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1073, + "start": 943, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1059,10 +1099,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1153,14 +1193,14 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "require(bool)(address(this).balance == 10000000000000000000)", "source_mapping": { - "start": 1108, + "start": 978, "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1168,7 +1208,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 43 ], "starting_column": 9, "ending_column": 51 @@ -1176,9 +1216,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 1073, + "start": 943, "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", @@ -1186,10 +1226,10 @@ "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1320,201 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L47-L50", - "id": "3cf7fef3822d0628cc1f441162960a6753d6cdcad5b8c56c84584dba741e806b", + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L42-L45", + "id": "50ab6a747d027b81a24ae04b84e6362bd184a5f23080e2af1b6a859ee144f637", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 3017, + "length": 66, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 127, + 128, + 129 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1()" + } + }, + { + "type": "node", + "name": "require(bool)(block.number == 0)", + "source_mapping": { + "start": 3051, + "length": 25, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 128 + ], + "starting_column": 9, + "ending_column": 34 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 3017, + "length": 66, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 127, + 128, + 129 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestSolidityKeyword", + "source_mapping": { + "start": 2385, + "length": 774, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad1()" + } + } + } + } + ], + "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#128)\n", + "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L128)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129", + "id": "60917b5197ecd42e5554643c32624ec6fc2a46bc8da2b3627eddcd68cf2ce9f5", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1776,20 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1379, - "length": 170, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1880,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 1467, - "length": 19, + "start": 839, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 38 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad1", "source_mapping": { - "start": 1379, - "length": 170, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +2007,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad1()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L59-L64", - "id": "3e416561dc117d230bbee97788f5a0ff851da92f1def8fb5d7b94461ee6bfbc0", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L37-L40", + "id": "9363dbd2bb3f41b42351b088f7a973902e04ccae0081e5c99354de90890fe6ab", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2002,238 +2223,53 @@ 63, 64, 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad6()" - } - } - } - } - ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71", - "id": "9a6a2aee598cf4c282006337a3b8599c708487d1942e9ddfe3193581cbe1708e", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 2952, - "length": 59, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 123, - 124, - 125 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestSolidityKeyword", - "source_mapping": { - "start": 2385, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad0()" - } - }, - { - "type": "node", - "name": "require(bool)(now == 0)", - "source_mapping": { - "start": 2986, - "length": 18, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 124 - ], - "starting_column": 9, - "ending_column": 27 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 2952, - "length": 59, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 123, - 124, - 125 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestSolidityKeyword", - "source_mapping": { - "start": 2385, - "length": 774, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad6()" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(now == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L123-L125", - "id": "24de80ae388956295db544441f5ab9326af42bd4fcb34e232a23af952d7fe333", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L66-L71", + "id": "9a6a2aee598cf4c282006337a3b8599c708487d1942e9ddfe3193581cbe1708e", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2242,19 +2278,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 3017, - "length": 66, + "start": 3089, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -2314,42 +2350,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 3051, - "length": 25, + "start": 3123, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 128 + 132 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 3017, - "length": 66, + "start": 3089, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 127, - 128, - 129 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -2409,16 +2445,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "TestSolidityKeyword.bad1() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#128)\n", - "markdown": "[TestSolidityKeyword.bad1()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L128)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L127-L129", - "id": "60917b5197ecd42e5554643c32624ec6fc2a46bc8da2b3627eddcd68cf2ce9f5", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133", + "id": "9efb75e5f6647209e01d4053c1bf76e69bf07d6578864711e2302336f250d72e", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2463,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3089, - "length": 67, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2483,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 774, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 3123, - "length": 26, + "start": 472, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 22 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3089, - "length": 67, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2560,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 774, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L131-L133", - "id": "9efb75e5f6647209e01d4053c1bf76e69bf07d6578864711e2302336f250d72e", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.6.11/incorrect_equality.sol#L21-L23", + "id": "df1ee72930fcaa7dc7a92d390be6007c57953a3392aef588a852373da388d850", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json b/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json index 777627263..e499975d0 100644 --- a/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json +++ b/tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol.0.7.6.IncorrectStrictEquality.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 101, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -24,76 +25,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(erc.balanceOf(address(this)) == 10)", + "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", "source_mapping": { - "start": 472, - "length": 43, + "start": 839, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 22 + 38 ], "starting_column": 9, - "ending_column": 52 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 421, - "length": 101, + "start": 804, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23 + 37, + 38, + 39, + 40 ], "starting_column": 5, "ending_column": 6 @@ -101,50 +152,99 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0(ERC20Function)" + "signature": "bad1()" } } } } ], - "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#22)\n", - "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L22)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23", - "id": "867a3b92771da558ee2693d8c81dc2c154b0effac8153ca43ccb183b05245310", + "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#38)\n", + "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L38)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40", + "id": "00429822fd7d6870bca827c11ac6f1f552b243431b3db4a937da8c0c616aabb9", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -153,19 +253,22 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad4", "source_mapping": { - "start": 528, - "length": 97, + "start": 1203, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -173,160 +276,10 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "ERC20TestBalance", + "name": "TestContractBalance", "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - }, - { - "type": "node", - "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", - "source_mapping": { - "start": 579, - "length": 39, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 26 - ], - "starting_column": 9, - "ending_column": 48 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 528, - "length": 97, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ERC20TestBalance", - "source_mapping": { - "start": 182, - "length": 445, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(ERC20Variable)" - } - } - } - } - ], - "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#26)\n", - "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L26)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27", - "id": "22a2bf7ecbe8d0217cce4d0304fc02a45968167dd408ad85ad4bfb0ed5012dd0", - "check": "incorrect-equality", - "impact": "Medium", - "confidence": "High" - }, - { - "elements": [ - { - "type": "function", - "name": "bad0", - "source_mapping": { - "start": 665, - "length": 133, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", - "is_dependency": false, - "lines": [ - 32, - 33, - 34, - 35 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TestContractBalance", - "source_mapping": { - "start": 629, - "length": 1754, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", @@ -406,43 +359,45 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } }, { "type": "node", - "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 700, - "length": 51, + "start": 1291, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 33 + 54 ], - "starting_column": 9, - "ending_column": 60 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 665, - "length": 133, + "start": 1203, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 32, - 33, - 34, - 35 + 52, + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -533,16 +488,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad4()" } } } } ], - "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#33)\n", - "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L33)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35", - "id": "c64584a1db93863bfb52a62fae244e6c2f6bc0c1dd1a5662f50965428d978a15", + "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#54)\n", + "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L54)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57", + "id": "03481d21bd25c9db2606e6ac246fbf5a047d5fb094422fe19a5fabf7032e1818", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -553,18 +508,17 @@ "type": "function", "name": "bad1", "source_mapping": { - "start": 804, - "length": 133, + "start": 528, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -572,126 +526,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 629, - "length": 1754, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad1(ERC20Variable)" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(address(this)).balance)", + "name": "require(bool)(erc.balanceOf(msg.sender) == 10)", "source_mapping": { - "start": 839, - "length": 51, + "start": 579, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 38 + 26 ], "starting_column": 9, - "ending_column": 60 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad1", "source_mapping": { - "start": 804, - "length": 133, + "start": 528, + "length": 97, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 37, - 38, - 39, - 40 + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -699,99 +603,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "ERC20TestBalance", "source_mapping": { - "start": 629, - "length": 1754, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad1(ERC20Variable)" } } } } ], - "description": "TestContractBalance.bad1() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#38)\n", - "markdown": "[TestContractBalance.bad1()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(address(this)).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L38)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L37-L40", - "id": "00429822fd7d6870bca827c11ac6f1f552b243431b3db4a937da8c0c616aabb9", + "description": "ERC20TestBalance.bad1(ERC20Variable) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#26)\n", + "markdown": "[ERC20TestBalance.bad1(ERC20Variable)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(msg.sender) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L26)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L25-L27", + "id": "22a2bf7ecbe8d0217cce4d0304fc02a45968167dd408ad85ad4bfb0ed5012dd0", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -800,20 +655,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 943, - "length": 124, + "start": 2964, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -821,126 +675,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(address(this).balance == 10000000000000000000)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 978, - "length": 42, + "start": 2998, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 43 + 124 ], "starting_column": 9, - "ending_column": 51 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 943, - "length": 124, + "start": 2964, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45 + 123, + 124, + 125 ], "starting_column": 5, "ending_column": 6 @@ -948,99 +770,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#43)\n", - "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L43)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45", - "id": "d848b883cd27d256e7ea367c14afae2cc206b22bc62e0023eeff561e4bc9bee6", + "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#124)\n", + "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L124)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125", + "id": "41fcdc7b875eec5595e7d7518953b246ab69a7baac064512fde30b157c0595f2", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1049,20 +840,22 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad6", "source_mapping": { - "start": 1073, - "length": 124, + "start": 1555, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -1153,43 +946,45 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad6()" } }, { "type": "node", - "name": "require(bool)(10000000000000000000 == address(this).balance)", + "name": "balance == 10000000000000000000", "source_mapping": { - "start": 1108, - "length": 42, + "start": 1652, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 48 + 68 ], - "starting_column": 9, - "ending_column": 51 + "starting_column": 13, + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad6", "source_mapping": { - "start": 1073, - "length": 124, + "start": 1555, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50 + 66, + 67, + 68, + 69, + 70, + 71 ], "starting_column": 5, "ending_column": 6 @@ -1280,16 +1075,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad6()" } } } } ], - "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#48)\n", - "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L48)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50", - "id": "746e8e07ef37b33e1f1e49ae013311ea0873d62d00caacaf08988735eb939ddc", + "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#68)\n", + "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L68)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71", + "id": "48fdf24089d0b55885acd69fec55d6860251775e0e1b0317182476ff9015bd8d", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1298,9 +1093,9 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1203, + "start": 1379, "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1308,15 +1103,15 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 - ], - "starting_column": 5, - "ending_column": 6 + 59, + 60, + 61, + 62, + 63, + 64 + ], + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -1404,14 +1199,14 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "10000000000000000000 == balance", "source_mapping": { - "start": 1291, + "start": 1467, "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1419,7 +1214,7 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 54 + 61 ], "starting_column": 13, "ending_column": 32 @@ -1427,9 +1222,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1203, + "start": 1379, "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", @@ -1437,12 +1232,12 @@ "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 52, - 53, - 54, - 55, - 56, - 57 + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -1533,16 +1328,16 @@ "ending_column": 2 } }, - "signature": "bad4()" + "signature": "bad5()" } } } } ], - "description": "TestContractBalance.bad4() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#54)\n", - "markdown": "[TestContractBalance.bad4()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L54)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L52-L57", - "id": "03481d21bd25c9db2606e6ac246fbf5a047d5fb094422fe19a5fabf7032e1818", + "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#61)\n", + "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L61)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64", + "id": "4c491b63ac50b7636f4718de626a471d8172b614b1355e937d7a071aec148691", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1551,22 +1346,20 @@ "elements": [ { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1379, - "length": 170, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1657,45 +1450,43 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad3()" } }, { "type": "node", - "name": "10000000000000000000 == balance", + "name": "require(bool)(10000000000000000000 == address(this).balance)", "source_mapping": { - "start": 1467, - "length": 19, + "start": 1108, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 61 + 48 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 51 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1379, - "length": 170, + "start": 1073, + "length": 124, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61, - 62, - 63, - 64 + 47, + 48, + 49, + 50 ], "starting_column": 5, "ending_column": 6 @@ -1786,16 +1577,16 @@ "ending_column": 2 } }, - "signature": "bad5()" + "signature": "bad3()" } } } } ], - "description": "TestContractBalance.bad5() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#61)\n", - "markdown": "[TestContractBalance.bad5()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64) uses a dangerous strict equality:\n\t- [10000000000000000000 == balance](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L61)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L59-L64", - "id": "4c491b63ac50b7636f4718de626a471d8172b614b1355e937d7a071aec148691", + "description": "TestContractBalance.bad3() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#48)\n", + "markdown": "[TestContractBalance.bad3()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50) uses a dangerous strict equality:\n\t- [require(bool)(10000000000000000000 == address(this).balance)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L48)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L47-L50", + "id": "746e8e07ef37b33e1f1e49ae013311ea0873d62d00caacaf08988735eb939ddc", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -1804,22 +1595,19 @@ "elements": [ { "type": "function", - "name": "bad6", + "name": "bad2", "source_mapping": { - "start": 1555, - "length": 179, + "start": 3113, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1827,128 +1615,94 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad2()" } }, { "type": "node", - "name": "balance == 10000000000000000000", + "name": "require(bool)(block.number == 0)", "source_mapping": { - "start": 1652, - "length": 19, + "start": 3147, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 68 + 132 ], - "starting_column": 13, - "ending_column": 32 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad6", + "name": "bad2", "source_mapping": { - "start": 1555, - "length": 179, + "start": 3113, + "length": 67, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 66, - 67, - 68, - 69, - 70, - 71 + 131, + 132, + 133 ], "starting_column": 5, "ending_column": 6 @@ -1956,99 +1710,68 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestContractBalance", + "name": "TestSolidityKeyword", "source_mapping": { - "start": 629, - "length": 1754, + "start": 2385, + "length": 798, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad6()" + "signature": "bad2()" } } } } ], - "description": "TestContractBalance.bad6() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000 (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#68)\n", - "markdown": "[TestContractBalance.bad6()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71) uses a dangerous strict equality:\n\t- [balance == 10000000000000000000](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L68)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L66-L71", - "id": "48fdf24089d0b55885acd69fec55d6860251775e0e1b0317182476ff9015bd8d", + "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#132)\n", + "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L132)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133", + "id": "78aad151c32e2fa0c7cb17095afae17fad81d613a486d78dabb016b26396ed12", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2059,17 +1782,17 @@ "type": "function", "name": "bad0", "source_mapping": { - "start": 2964, - "length": 71, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2077,94 +1800,76 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad0(ERC20Function)" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(erc.balanceOf(address(this)) == 10)", "source_mapping": { - "start": 2998, - "length": 30, + "start": 472, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 124 + 22 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", "name": "bad0", "source_mapping": { - "start": 2964, - "length": 71, + "start": 421, + "length": 101, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 123, - 124, - 125 + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -2172,68 +1877,50 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "ERC20TestBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 182, + "length": 445, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad0(ERC20Function)" } } } } ], - "description": "TestSolidityKeyword.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#124)\n", - "markdown": "[TestSolidityKeyword.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125) uses a dangerous strict equality:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L124)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L123-L125", - "id": "41fcdc7b875eec5595e7d7518953b246ab69a7baac064512fde30b157c0595f2", + "description": "ERC20TestBalance.bad0(ERC20Function) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#22)\n", + "markdown": "[ERC20TestBalance.bad0(ERC20Function)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23) uses a dangerous strict equality:\n\t- [require(bool)(erc.balanceOf(address(this)) == 10)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L22)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L21-L23", + "id": "867a3b92771da558ee2693d8c81dc2c154b0effac8153ca43ccb183b05245310", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" @@ -2427,19 +2114,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3113, - "length": 67, + "start": 665, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2447,94 +2135,126 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(block.number == 0)", + "name": "require(bool)(address(address(this)).balance == 10000000000000000000)", "source_mapping": { - "start": 3147, - "length": 26, + "start": 700, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 132 + 33 ], "starting_column": 9, - "ending_column": 35 + "ending_column": 60 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 3113, - "length": 67, + "start": 665, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 131, - 132, - 133 + 32, + 33, + 34, + 35 ], "starting_column": 5, "ending_column": 6 @@ -2542,68 +2262,348 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TestSolidityKeyword", + "name": "TestContractBalance", "source_mapping": { - "start": 2385, - "length": 798, + "start": 629, + "length": 1754, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad2()" - } - } - } - } - ], - "description": "TestSolidityKeyword.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#132)\n", - "markdown": "[TestSolidityKeyword.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133) uses a dangerous strict equality:\n\t- [require(bool)(block.number == 0)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L132)\n", - "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L131-L133", - "id": "78aad151c32e2fa0c7cb17095afae17fad81d613a486d78dabb016b26396ed12", + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + } + } + } + ], + "description": "TestContractBalance.bad0() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#33)\n", + "markdown": "[TestContractBalance.bad0()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35) uses a dangerous strict equality:\n\t- [require(bool)(address(address(this)).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L33)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L32-L35", + "id": "c64584a1db93863bfb52a62fae244e6c2f6bc0c1dd1a5662f50965428d978a15", + "check": "incorrect-equality", + "impact": "Medium", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 943, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 629, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + }, + { + "type": "node", + "name": "require(bool)(address(this).balance == 10000000000000000000)", + "source_mapping": { + "start": 978, + "length": 42, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 43 + ], + "starting_column": 9, + "ending_column": 51 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 943, + "length": 124, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TestContractBalance", + "source_mapping": { + "start": 629, + "length": 1754, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 85, + 86, + 87, + 88, + 89, + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad2()" + } + } + } + } + ], + "description": "TestContractBalance.bad2() (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000) (tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#43)\n", + "markdown": "[TestContractBalance.bad2()](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45) uses a dangerous strict equality:\n\t- [require(bool)(address(this).balance == 10000000000000000000)](tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L43)\n", + "first_markdown_element": "tests/detectors/incorrect-equality/0.7.6/incorrect_equality.sol#L42-L45", + "id": "d848b883cd27d256e7ea367c14afae2cc206b22bc62e0023eeff561e4bc9bee6", "check": "incorrect-equality", "impact": "Medium", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json index bfb2d8224..13906812e 100644 --- a/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol.0.4.25.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.4.25/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json index 257869740..5f9d1a535 100644 --- a/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol.0.5.16.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.5.16/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json index c6023add7..d2f7ec560 100644 --- a/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol.0.6.11.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.6.11/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json b/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json index 8d70ff617..2b032eacc 100644 --- a/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json +++ b/tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol.0.7.6.ModifierDefaultDetection.json @@ -4,21 +4,28 @@ "elements": [ { "type": "function", - "name": "noResult", + "name": "loopsNoResult", "source_mapping": { - "start": 20, - "length": 103, + "start": 496, + "length": 251, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "is_dependency": false, "lines": [ - 2, - 3, - 4, - 5, - 6 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 5, "ending_column": 6 @@ -93,14 +100,14 @@ "ending_column": 2 } }, - "signature": "noResult()" + "signature": "loopsNoResult()" } } ], - "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#2-6) does not always execute _; or revert", - "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6", - "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", + "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#30-41) does not always execute _; or revert", + "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41", + "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" @@ -214,28 +221,21 @@ "elements": [ { "type": "function", - "name": "loopsNoResult", + "name": "noResult", "source_mapping": { - "start": 496, - "length": 251, + "start": 20, + "length": 103, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 2, + 3, + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -310,14 +310,14 @@ "ending_column": 2 } }, - "signature": "loopsNoResult()" + "signature": "noResult()" } } ], - "description": "Modifier Test.loopsNoResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#30-41) does not always execute _; or revert", - "markdown": "Modifier [Test.loopsNoResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41) does not always execute _; or revert", - "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L30-L41", - "id": "0ba95ef5faf2a00c06d4f83c5159220d1cd06bc346a1287a6634334b7a0c433f", + "description": "Modifier Test.noResult() (tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#2-6) does not always execute _; or revert", + "markdown": "Modifier [Test.noResult()](tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6) does not always execute _; or revert", + "first_markdown_element": "tests/detectors/incorrect-modifier/0.7.6/modifier_default.sol#L2-L6", + "id": "e83e0a544940d3ddd9ea8fe0ae0277bec4660926110809cfd28153817969c3a3", "check": "incorrect-modifier", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json b/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json index 6f00f629e..de342098e 100644 --- a/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json +++ b/tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol.0.4.25.IncorrectUnaryExpressionDetection.json @@ -1,68 +1,5 @@ [ [ - { - "elements": [ - { - "type": "variable", - "name": "c", - "source_mapping": { - "start": 42, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "is_dependency": false, - "lines": [ - 4 - ], - "starting_column": 3, - "ending_column": 16 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "C", - "source_mapping": { - "start": 0, - "length": 204, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", - "is_dependency": false, - "lines": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "C.c (tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#4) uses an dangerous unary operator: (b = + 1)\n", - "markdown": "[C.c](tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4) uses an dangerous unary operator: (b = + 1)\n", - "first_markdown_element": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4", - "id": "98d05a4acbe13ff0e6fa795af35dc2002541cc7607f3f4d7ffb356f9d33681bd", - "check": "incorrect-unary", - "impact": "Low", - "confidence": "Medium" - }, { "elements": [ { @@ -533,6 +470,69 @@ "check": "incorrect-unary", "impact": "Low", "confidence": "Medium" + }, + { + "elements": [ + { + "type": "variable", + "name": "c", + "source_mapping": { + "start": 42, + "length": 13, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "is_dependency": false, + "lines": [ + 4 + ], + "starting_column": 3, + "ending_column": 16 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "C", + "source_mapping": { + "start": 0, + "length": 204, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol", + "is_dependency": false, + "lines": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15 + ], + "starting_column": 1, + "ending_column": 2 + } + } + } + } + ], + "description": "C.c (tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#4) uses an dangerous unary operator: (b = + 1)\n", + "markdown": "[C.c](tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4) uses an dangerous unary operator: (b = + 1)\n", + "first_markdown_element": "tests/detectors/incorrect-unary/0.4.25/invalid_unary_expression.sol#L4", + "id": "98d05a4acbe13ff0e6fa795af35dc2002541cc7607f3f4d7ffb356f9d33681bd", + "check": "incorrect-unary", + "impact": "Low", + "confidence": "Medium" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json index b8abfa2e5..77bd9ffc1 100644 --- a/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol.0.4.25.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 70, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 165, - "length": 12, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 70, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.4.25/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/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11", - "id": "8c8313f12eb11c77c9acf1f683fe6d44a79ca1445e0d92cffd79c04a3462d3e9", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -422,6 +239,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 70, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 165, + "length": 12, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 70, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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": 158, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.4.25/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/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.4.25/MappingDeletion.sol#L9-L11", + "id": "8c8313f12eb11c77c9acf1f683fe6d44a79ca1445e0d92cffd79c04a3462d3e9", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json index deaf2750d..5ea22de8f 100644 --- a/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/mapping-deletion/0.5.16/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/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11", - "id": "4c08076815986fec8b813cb66a7f7fe7002a5e87179bbd46e59279da2f46e992", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -425,6 +242,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/mapping-deletion/0.5.16/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/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11", + "id": "4c08076815986fec8b813cb66a7f7fe7002a5e87179bbd46e59279da2f46e992", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json b/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json index d7a4397fc..16d2dcd94 100644 --- a/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json +++ b/tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol.0.7.6.MappingDeletionDetection.json @@ -1,188 +1,5 @@ [ [ - { - "elements": [ - { - "type": "function", - "name": "deleteSt", - "source_mapping": { - "start": 114, - "length": 80, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/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/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#10)\n", - "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L10)\n", - "first_markdown_element": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11", - "id": "a6c44f7353505e72d74433eef65af07e90cc95c3797d5b395766255f0ecb91e1", - "check": "mapping-deletion", - "impact": "Medium", - "confidence": "High" - }, { "elements": [ { @@ -425,6 +242,189 @@ "check": "mapping-deletion", "impact": "Medium", "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "deleteSt", + "source_mapping": { + "start": 114, + "length": 80, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/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/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#10)\n", + "markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L10)\n", + "first_markdown_element": "tests/detectors/mapping-deletion/0.7.6/MappingDeletion.sol#L9-L11", + "id": "a6c44f7353505e72d74433eef65af07e90cc95c3797d5b395766255f0ecb91e1", + "check": "mapping-deletion", + "impact": "Medium", + "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json index 720e4350c..a6a4f75fd 100644 --- a/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol.0.4.25.MissingZeroAddressValidation.json @@ -4,37 +4,37 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 393, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 19 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 26, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad2_transfer", "source_mapping": { - "start": 125, - "length": 108, + "start": 370, + "length": 114, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +128,44 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 427, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 20 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad2_transfer", "source_mapping": { - "start": 125, - "length": 108, + "start": 370, + "length": 114, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -259,16 +259,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10", - "id": "4215a731670a0150f45d8cd682dc81ed85ffd5268cbad6ac9fe8bd044e54f74d", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19", + "id": "16629b342aad1ee3e0d3f933781eea91f1cb34b1770f84cb38a5d911e15b3476", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -279,7 +279,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 256, + "start": 511, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", @@ -287,28 +287,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 23 ], - "starting_column": 22, - "ending_column": 34 + "starting_column": 26, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 129, + "start": 488, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -402,45 +402,45 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 290, - "length": 20, + "start": 545, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 24 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 129, + "start": 488, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +534,55 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } - }, + } + ], + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23", + "id": "27318d51c369e1e169a889a6c2678a023a22e1e3a691ab41a429684e338d2d1e", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 340, - "length": 20, + "start": 706, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 28 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 22, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad4_call", "source_mapping": { - "start": 237, - "length": 129, + "start": 687, + "length": 112, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -666,55 +676,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad4_call(address)" } } } - } - ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14", - "id": "dd2af335a7782a70944073bf1cf5dea69845ddcf6a45ea86a9fcf59793b151c8", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 393, - "length": 12, + "start": 740, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 29 ], - "starting_column": 26, - "ending_column": 38 + "starting_column": 5, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad4_call", "source_mapping": { - "start": 370, - "length": 114, + "start": 687, + "length": 112, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +807,55 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad4_call(address)" } } } - }, + } + ], + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28", + "id": "34b73dbecfa159bc5631cb95ff2343c92792d80f448fc425b7d1bba399108073", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.transfer(msg.value)", + "type": "variable", + "name": "new_owner", "source_mapping": { - "start": 427, - "length": 24, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 10 ], - "starting_column": 5, - "ending_column": 29 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 370, - "length": 114, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -939,56 +949,44 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } - } - ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L19", - "id": "16629b342aad1ee3e0d3f933781eea91f1cb34b1770f84cb38a5d911e15b3476", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "owner = new_owner", "source_mapping": { - "start": 511, - "length": 12, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 11 ], - "starting_column": 26, - "ending_column": 38 + "starting_column": 5, + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 488, - "length": 195, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1080,56 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad0_set_owner(address)" } } } - }, + } + ], + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L10", + "id": "4215a731670a0150f45d8cd682dc81ed85ffd5268cbad6ac9fe8bd044e54f74d", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.transfer(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 545, - "length": 24, + "start": 256, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 14 ], - "starting_column": 5, - "ending_column": 29 + "starting_column": 22, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad1_send", "source_mapping": { - "start": 488, - "length": 195, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1214,55 +1223,45 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L23", - "id": "27318d51c369e1e169a889a6c2678a023a22e1e3a691ab41a429684e338d2d1e", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 706, - "length": 12, + "start": 290, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 15 ], - "starting_column": 22, - "ending_column": 34 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad1_send", "source_mapping": { - "start": 687, - "length": 112, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1355,45 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 740, - "length": 30, + "start": 340, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 16 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad1_send", "source_mapping": { - "start": 687, - "length": 112, + "start": 237, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad1_send(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L28", - "id": "34b73dbecfa159bc5631cb95ff2343c92792d80f448fc425b7d1bba399108073", + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.4.25/missing_zero_address_validation.sol#L14", + "id": "dd2af335a7782a70944073bf1cf5dea69845ddcf6a45ea86a9fcf59793b151c8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json index ff1e00c60..ebb98a36b 100644 --- a/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol.0.5.16.MissingZeroAddressValidation.json @@ -4,37 +4,38 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 256, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +129,45 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 298, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 15 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -259,27 +261,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10", - "id": "ac59285350b35c2b885a6e9efe641474ae51b830fad5856f622fe264096e44cd", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 256, + "start": 348, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -287,10 +278,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 16 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -406,12 +397,23 @@ } } } - }, + } + ], + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14", + "id": "3d9ba6630d8f1357ab26196f519d74d6410a8e52994ae341d26a17d466200308", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 298, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -419,28 +421,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 19 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad2_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +535,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 348, - "length": 20, + "start": 443, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 20 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad2_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -666,16 +666,16 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L14", - "id": "3d9ba6630d8f1357ab26196f519d74d6410a8e52994ae341d26a17d466200308", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19", + "id": "654c703c39420ad30e6624b6a98892faffc5e90820e7aabfd3cd66fe8870b7b8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -686,7 +686,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 401, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -694,7 +694,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 23 ], "starting_column": 26, "ending_column": 46 @@ -702,19 +702,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad3_transfer", "source_mapping": { - "start": 378, - "length": 122, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -808,7 +809,7 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad3_transfer(address)" } } } @@ -817,7 +818,7 @@ "type": "node", "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 443, + "start": 569, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -825,7 +826,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 24 ], "starting_column": 5, "ending_column": 29 @@ -833,19 +834,20 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad3_transfer", "source_mapping": { - "start": 378, - "length": 122, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +941,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L19", - "id": "654c703c39420ad30e6624b6a98892faffc5e90820e7aabfd3cd66fe8870b7b8", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23", + "id": "98f43dd716a11685725ad4c615b07dd773bcf0f1c7710357fa1a5606084dd999", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +961,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 730, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", @@ -967,28 +969,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 28 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1083,44 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 569, - "length": 24, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 29 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1214,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L23", - "id": "98f43dd716a11685725ad4c615b07dd773bcf0f1c7710357fa1a5606084dd999", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28", + "id": "aa90b9a8002d093f5996492eae0d441bde928e8187fc6d2790f973f6383d6095", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1232,37 +1232,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 730, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 10 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad0_set_owner", "source_mapping": { - "start": 711, - "length": 120, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1356,44 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "owner = new_owner", "source_mapping": { - "start": 772, - "length": 30, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 11 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad0_set_owner", "source_mapping": { - "start": 711, - "length": 120, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad0_set_owner(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L28", - "id": "aa90b9a8002d093f5996492eae0d441bde928e8187fc6d2790f973f6383d6095", + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.5.16/missing_zero_address_validation.sol#L10", + "id": "ac59285350b35c2b885a6e9efe641474ae51b830fad5856f622fe264096e44cd", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json index 65f8c779f..3cba59cdc 100644 --- a/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol.0.6.11.MissingZeroAddressValidation.json @@ -4,37 +4,37 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 730, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 28 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad4_call", "source_mapping": { - "start": 125, - "length": 108, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +128,44 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.call.value(msg.value)()", "source_mapping": { - "start": 188, - "length": 17, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 29 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad4_call", "source_mapping": { - "start": 125, - "length": 108, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -259,16 +259,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10", - "id": "1d2f6294ee0cfc4aae290fe04610e1df21d508008e75000ef017463482d78f95", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28", + "id": "174a4f81c4e872deda0a31c10f8136b52d60adc89ba9be1548b308a09e225763", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -277,38 +277,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 256, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad0_set_owner", "source_mapping": { - "start": 237, - "length": 137, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -402,45 +401,44 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "owner = new_owner", "source_mapping": { - "start": 298, - "length": 20, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 11 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad0_set_owner", "source_mapping": { - "start": 237, - "length": 137, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -534,16 +532,27 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad0_set_owner(address)" } } } - }, + } + ], + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L10", + "id": "1d2f6294ee0cfc4aae290fe04610e1df21d508008e75000ef017463482d78f95", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 348, + "start": 256, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -551,10 +560,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 14 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { @@ -670,23 +679,12 @@ } } } - } - ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14", - "id": "21de216080f0f27154e9b3cd2fef7ead38dacc945160b619923c33344d636826", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 401, + "start": 298, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -694,27 +692,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 15 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad1_send", "source_mapping": { - "start": 378, - "length": 122, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +807,45 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 443, - "length": 24, + "start": 348, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 16 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad1_send", "source_mapping": { - "start": 378, - "length": 122, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +939,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad1_send(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19", - "id": "3d8300f19d40cb2f76fcb587f94e3dfc751319b119bd83af4cd7f962b680feb8", + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L14", + "id": "21de216080f0f27154e9b3cd2fef7ead38dacc945160b619923c33344d636826", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +959,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -967,7 +967,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 19 ], "starting_column": 26, "ending_column": 46 @@ -975,20 +975,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad2_transfer", "source_mapping": { - "start": 504, - "length": 203, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1082,7 +1081,7 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad2_transfer(address)" } } } @@ -1091,7 +1090,7 @@ "type": "node", "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 569, + "start": 443, "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -1099,7 +1098,7 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 20 ], "starting_column": 5, "ending_column": 29 @@ -1107,20 +1106,19 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad2_transfer", "source_mapping": { - "start": 504, - "length": 203, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1212,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23", - "id": "efee9ceff8491c62ed42aab7c70b0a8d9c7731af8ecb304e6deafcc64a20c6f4", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L19", + "id": "3d8300f19d40cb2f76fcb587f94e3dfc751319b119bd83af4cd7f962b680feb8", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1234,7 +1232,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 730, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", @@ -1242,27 +1240,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 23 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad3_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1355,45 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.call.value(msg.value)()", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 772, - "length": 30, + "start": 569, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 24 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad3_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call.value(msg.value)() (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call.value(msg.value)()](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L28", - "id": "174a4f81c4e872deda0a31c10f8136b52d60adc89ba9be1548b308a09e225763", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.6.11/missing_zero_address_validation.sol#L23", + "id": "efee9ceff8491c62ed42aab7c70b0a8d9c7731af8ecb304e6deafcc64a20c6f4", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json b/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json index b9e14ce41..b719bf58c 100644 --- a/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json +++ b/tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol.0.7.6.MissingZeroAddressValidation.json @@ -4,37 +4,38 @@ "elements": [ { "type": "variable", - "name": "new_owner", + "name": "addr", "source_mapping": { - "start": 149, - "length": 17, + "start": 256, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 27, - "ending_column": 44 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -128,44 +129,45 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } }, { "type": "node", - "name": "owner = new_owner", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 188, - "length": 17, + "start": 298, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 11 + 15 ], "starting_column": 5, - "ending_column": 22 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0_set_owner", + "name": "bad1_send", "source_mapping": { - "start": 125, - "length": 108, + "start": 237, + "length": 137, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -259,27 +261,16 @@ "ending_column": 2 } }, - "signature": "bad0_set_owner(address)" + "signature": "bad1_send(address)" } } } - } - ], - "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#11)\n", - "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L11)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10", - "id": "2c8db81e6ce5a16bd76db4dd9d27d931037b6b06bacd06afa427e35f4dd22aa6", - "check": "missing-zero-check", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "variable", - "name": "addr", + "type": "node", + "name": "addr.send(msg.value)", "source_mapping": { - "start": 256, + "start": 348, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -287,10 +278,10 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14 + 16 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 5, + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -406,12 +397,23 @@ } } } - }, + } + ], + "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#16)\n", + "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L16)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14", + "id": "1a145c4f40c60c9db09f5743139503a60b40be83dda9c57f8c47a400f1bc5b8a", + "check": "missing-zero-check", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "addr.send(msg.value)", + "type": "variable", + "name": "addr", "source_mapping": { - "start": 298, + "start": 527, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -419,28 +421,28 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 15 + 23 ], - "starting_column": 5, - "ending_column": 25 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -534,45 +536,45 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } }, { "type": "node", - "name": "addr.send(msg.value)", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 348, - "length": 20, + "start": 569, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 16 + 24 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1_send", + "name": "bad3_transfer", "source_mapping": { - "start": 237, - "length": 137, + "start": 504, + "length": 203, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17 + 23, + 24, + 25, + 26 ], "starting_column": 3, "ending_column": 4 @@ -666,16 +668,16 @@ "ending_column": 2 } }, - "signature": "bad1_send(address)" + "signature": "bad3_transfer(address)" } } } } ], - "description": "C.bad1_send(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#14) lacks a zero-check on :\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#15)\n\t\t- addr.send(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#16)\n", - "markdown": "[C.bad1_send(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14) lacks a zero-check on :\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L15)\n\t\t- [addr.send(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L16)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L14", - "id": "1a145c4f40c60c9db09f5743139503a60b40be83dda9c57f8c47a400f1bc5b8a", + "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#24)\n", + "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L24)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23", + "id": "1cc3cad32b73e31e6d6f214b9a99b19c5bd5633ddf3ab58267a5870051c22a02", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -684,37 +686,37 @@ "elements": [ { "type": "variable", - "name": "addr", + "name": "new_owner", "source_mapping": { - "start": 401, - "length": 20, + "start": 149, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19 + 10 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 27, + "ending_column": 44 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 378, - "length": 122, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -808,44 +810,44 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "owner = new_owner", "source_mapping": { - "start": 443, - "length": 24, + "start": 188, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 20 + 11 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 22 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_transfer", + "name": "bad0_set_owner", "source_mapping": { - "start": 378, - "length": 122, + "start": 125, + "length": 108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 19, - 20, - 21 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -939,16 +941,16 @@ "ending_column": 2 } }, - "signature": "bad2_transfer(address)" + "signature": "bad0_set_owner(address)" } } } } ], - "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#20)\n", - "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L20)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19", - "id": "f7028c02d7b7a78ef72a33c7b976bcb047206b9c82a9acc39cdf11a5e188208f", + "description": "C.bad0_set_owner(address).new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#10) lacks a zero-check on :\n\t\t- owner = new_owner (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#11)\n", + "markdown": "[C.bad0_set_owner(address).new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10) lacks a zero-check on :\n\t\t- [owner = new_owner](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L11)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L10", + "id": "2c8db81e6ce5a16bd76db4dd9d27d931037b6b06bacd06afa427e35f4dd22aa6", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -959,7 +961,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 527, + "start": 730, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -967,28 +969,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23 + 28 ], - "starting_column": 26, - "ending_column": 46 + "starting_column": 22, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1082,45 +1083,44 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } }, { "type": "node", - "name": "addr.transfer(msg.value)", + "name": "addr.call{value: msg.value}()", "source_mapping": { - "start": 569, - "length": 24, + "start": 772, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 24 + 29 ], "starting_column": 5, - "ending_column": 29 + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3_transfer", + "name": "bad4_call", "source_mapping": { - "start": 504, - "length": 203, + "start": 711, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26 + 28, + 29, + 30 ], "starting_column": 3, "ending_column": 4 @@ -1214,16 +1214,16 @@ "ending_column": 2 } }, - "signature": "bad3_transfer(address)" + "signature": "bad4_call(address)" } } } } ], - "description": "C.bad3_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#23) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#24)\n", - "markdown": "[C.bad3_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L24)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L23", - "id": "1cc3cad32b73e31e6d6f214b9a99b19c5bd5633ddf3ab58267a5870051c22a02", + "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call{value: msg.value}() (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#29)\n", + "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call{value: msg.value}()](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L29)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28", + "id": "64e549d94c8869ed8c827ad3ee766cb23d4e8a64bc9b19e06d593fa8942363b4", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" @@ -1234,7 +1234,7 @@ "type": "variable", "name": "addr", "source_mapping": { - "start": 730, + "start": 401, "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", @@ -1242,27 +1242,27 @@ "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28 + 19 ], - "starting_column": 22, - "ending_column": 42 + "starting_column": 26, + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad2_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1356,44 +1356,44 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad2_transfer(address)" } } } }, { "type": "node", - "name": "addr.call{value: msg.value}()", + "name": "addr.transfer(msg.value)", "source_mapping": { - "start": 772, - "length": 30, + "start": 443, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 29 + 20 ], "starting_column": 5, - "ending_column": 35 + "ending_column": 29 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4_call", + "name": "bad2_transfer", "source_mapping": { - "start": 711, - "length": 120, + "start": 378, + "length": 122, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol", "is_dependency": false, "lines": [ - 28, - 29, - 30 + 19, + 20, + 21 ], "starting_column": 3, "ending_column": 4 @@ -1487,16 +1487,16 @@ "ending_column": 2 } }, - "signature": "bad4_call(address)" + "signature": "bad2_transfer(address)" } } } } ], - "description": "C.bad4_call(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#28) lacks a zero-check on :\n\t\t- addr.call{value: msg.value}() (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#29)\n", - "markdown": "[C.bad4_call(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28) lacks a zero-check on :\n\t\t- [addr.call{value: msg.value}()](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L29)\n", - "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L28", - "id": "64e549d94c8869ed8c827ad3ee766cb23d4e8a64bc9b19e06d593fa8942363b4", + "description": "C.bad2_transfer(address).addr (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#19) lacks a zero-check on :\n\t\t- addr.transfer(msg.value) (tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#20)\n", + "markdown": "[C.bad2_transfer(address).addr](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19) lacks a zero-check on :\n\t\t- [addr.transfer(msg.value)](tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L20)\n", + "first_markdown_element": "tests/detectors/missing-zero-check/0.7.6/missing_zero_address_validation.sol#L19", + "id": "f7028c02d7b7a78ef72a33c7b976bcb047206b9c82a9acc39cdf11a5e188208f", "check": "missing-zero-check", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json b/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json index 9b3f96591..ec876a5c6 100644 --- a/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json +++ b/tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol.0.6.11.MsgValueInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -71,44 +69,42 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } }, { "type": "node", - "name": "balances[receivers[i]] += msg.value", + "name": "balances[a] += msg.value", "source_mapping": { - "start": 188, - "length": 35, + "start": 478, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 7 + 18 ], - "starting_column": 13, - "ending_column": 48 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -161,16 +157,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } } } } ], - "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9", - "id": "b8e2b147c51a880dc38a635915a0511954ade8ffeab3efd16e389a370e0c0b1b", + "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#18)\n", + "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L18)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19", + "id": "84b39e0706b72e42b4cf069a649c5825e35ed842871350cc064c8123396b6f96", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -179,19 +175,21 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 425, - "length": 84, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -244,42 +242,44 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad(address[])" } }, { "type": "node", - "name": "balances[a] += msg.value", + "name": "balances[receivers[i]] += msg.value", "source_mapping": { - "start": 478, - "length": 24, + "start": 188, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 18 + 7 ], - "starting_column": 9, - "ending_column": 33 + "starting_column": 13, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad", "source_mapping": { - "start": 425, - "length": 84, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -332,16 +332,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad(address[])" } } } } ], - "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#18)\n", - "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L18)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L17-L19", - "id": "84b39e0706b72e42b4cf069a649c5825e35ed842871350cc064c8123396b6f96", + "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.6.11/msg_value_loop.sol#L5-L9", + "id": "b8e2b147c51a880dc38a635915a0511954ade8ffeab3efd16e389a370e0c0b1b", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json b/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json index 15ce57037..c436e39be 100644 --- a/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json +++ b/tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol.0.7.6.MsgValueInLoop.json @@ -4,21 +4,19 @@ "elements": [ { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -71,44 +69,42 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } }, { "type": "node", - "name": "balances[receivers[i]] += msg.value", + "name": "balances[a] += msg.value", "source_mapping": { - "start": 188, - "length": 35, + "start": 478, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 7 + 18 ], - "starting_column": 13, - "ending_column": 48 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad", + "name": "bad2_internal", "source_mapping": { - "start": 61, - "length": 179, + "start": 425, + "length": 84, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 17, + 18, + 19 ], "starting_column": 5, "ending_column": 6 @@ -161,16 +157,16 @@ "ending_column": 0 } }, - "signature": "bad(address[])" + "signature": "bad2_internal(address)" } } } } ], - "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#7)\n", - "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L7)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9", - "id": "fd0c2f6abecbecd689c995b2cd3c30c9f1bd3763e34f4d5cb91788604f8ec3da", + "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#18)\n", + "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L18)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19", + "id": "0fd3ac1c8051090ec1fe86fa9e1e5f8e7381d8eef3f252fede8dc3bb07e87104", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -179,19 +175,23 @@ "elements": [ { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 425, - "length": 84, + "start": 515, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -244,42 +244,46 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad3(address[])" } }, { "type": "node", - "name": "balances[a] += msg.value", + "name": "balances[receivers[j]] += msg.value", "source_mapping": { - "start": 478, - "length": 24, + "start": 694, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 18 + 24 ], - "starting_column": 9, - "ending_column": 33 + "starting_column": 17, + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2_internal", + "name": "bad3", "source_mapping": { - "start": 425, - "length": 84, + "start": 515, + "length": 245, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 17, - 18, - 19 + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -332,16 +336,16 @@ "ending_column": 0 } }, - "signature": "bad2_internal(address)" + "signature": "bad3(address[])" } } } } ], - "description": "C.bad2_internal(address) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#17-19) use msg.value in a loop: balances[a] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#18)\n", - "markdown": "[C.bad2_internal(address)](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19) use msg.value in a loop: [balances[a] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L18)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L17-L19", - "id": "0fd3ac1c8051090ec1fe86fa9e1e5f8e7381d8eef3f252fede8dc3bb07e87104", + "description": "C.bad3(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#21-27) use msg.value in a loop: balances[receivers[j]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#24)\n", + "markdown": "[C.bad3(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27) use msg.value in a loop: [balances[receivers[j]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L24)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27", + "id": "9a021823637092277317750625e1f63b1b6f4b394a5dd1fdde50088af8d9e805", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" @@ -350,23 +354,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 515, - "length": 245, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -419,14 +421,14 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } }, { "type": "node", - "name": "balances[receivers[j]] += msg.value", + "name": "balances[receivers[i]] += msg.value", "source_mapping": { - "start": 694, + "start": 188, "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", @@ -434,31 +436,29 @@ "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 24 + 7 ], - "starting_column": 17, - "ending_column": 52 + "starting_column": 13, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad", "source_mapping": { - "start": 515, - "length": 245, + "start": 61, + "length": 179, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol", "is_dependency": false, "lines": [ - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -511,16 +511,16 @@ "ending_column": 0 } }, - "signature": "bad3(address[])" + "signature": "bad(address[])" } } } } ], - "description": "C.bad3(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#21-27) use msg.value in a loop: balances[receivers[j]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#24)\n", - "markdown": "[C.bad3(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27) use msg.value in a loop: [balances[receivers[j]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L24)\n", - "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L21-L27", - "id": "9a021823637092277317750625e1f63b1b6f4b394a5dd1fdde50088af8d9e805", + "description": "C.bad(address[]) (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#5-9) use msg.value in a loop: balances[receivers[i]] += msg.value (tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#7)\n", + "markdown": "[C.bad(address[])](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9) use msg.value in a loop: [balances[receivers[i]] += msg.value](tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L7)\n", + "first_markdown_element": "tests/detectors/msg-value-loop/0.7.6/msg_value_loop.sol#L5-L9", + "id": "fd0c2f6abecbecd689c995b2cd3c30c9f1bd3763e34f4d5cb91788604f8ec3da", "check": "msg-value-loop", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json b/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json index b627e1e59..62ed3b3c2 100644 --- a/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json +++ b/tests/detectors/naming-convention/0.4.25/naming_convention.sol.0.4.25.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.4.25/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.4.25/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.4.25/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.4.25/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.4.25/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.4.25/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.4.25/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.4.25/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.4.25/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.4.25/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.4.25/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.4.25/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.4.25/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.4.25/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.4.25/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json b/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json index 358b35cc0..d446e363d 100644 --- a/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json +++ b/tests/detectors/naming-convention/0.5.16/naming_convention.sol.0.5.16.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.5.16/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.5.16/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.5.16/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.5.16/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.5.16/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.5.16/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.5.16/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.5.16/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.5.16/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.5.16/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.5.16/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.5.16/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.5.16/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.5.16/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.5.16/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json b/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json index 15e9e8ad0..7c9d51cce 100644 --- a/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json +++ b/tests/detectors/naming-convention/0.6.11/naming_convention.sol.0.6.11.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.6.11/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.6.11/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.6.11/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.6.11/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.6.11/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.6.11/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.6.11/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.6.11/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.6.11/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.6.11/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.6.11/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.6.11/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.6.11/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.6.11/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.6.11/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json b/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json index 8a9e4568d..fd6d92790 100644 --- a/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json +++ b/tests/detectors/naming-convention/0.7.6/naming_convention.sol.0.7.6.NamingConvention.json @@ -1,83 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - }, - "additional_fields": { - "target": "contract", - "convention": "CapWords" - } - } - ], - "description": "Contract naming (tests/detectors/naming-convention/0.7.6/naming_convention.sol#3-48) is not in CapWords\n", - "markdown": "Contract [naming](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48", - "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, { "elements": [ { @@ -181,21 +103,21 @@ { "elements": [ { - "type": "event", - "name": "event_", + "type": "variable", + "name": "Var_One", "source_mapping": { - "start": 335, - "length": 19, + "start": 185, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 23 + 11 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 21 }, "type_specific_fields": { "parent": { @@ -260,19 +182,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "event_(uint256)" + } }, "additional_fields": { - "target": "event", - "convention": "CapWords" + "target": "variable", + "convention": "mixedCase" } } ], - "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords\n", - "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23", - "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase\n", + "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11", + "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -280,24 +201,21 @@ { "elements": [ { - "type": "function", - "name": "GetOne", + "type": "variable", + "name": "MY_other_CONSTANT", "source_mapping": { - "start": 440, - "length": 75, + "start": 143, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33 + 9 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 40 }, "type_specific_fields": { "parent": { @@ -362,19 +280,18 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "GetOne()" + } }, "additional_fields": { - "target": "function", - "convention": "mixedCase" + "target": "variable_constant", + "convention": "UPPER_CASE_WITH_UNDERSCORES" } } ], - "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase\n", - "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33", - "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", + "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.7.6/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9", + "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -382,151 +299,107 @@ { "elements": [ { - "type": "variable", - "name": "Number2", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 551, - "length": 12, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 35 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], - "starting_column": 35, - "ending_column": 47 + "starting_column": 1, + "ending_column": 2 + }, + "additional_fields": { + "target": "contract", + "convention": "CapWords" + } + } + ], + "description": "Contract naming (tests/detectors/naming-convention/0.7.6/naming_convention.sol#3-48) is not in CapWords\n", + "markdown": "Contract [naming](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L3-L48", + "id": "7247d550fb327e3aeb21c82714137e5b45a7e9eeaa6a1bc878102c8081033f85", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "enum", + "name": "numbers", + "source_mapping": { + "start": 79, + "length": 23, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 6 + ], + "starting_column": 5, + "ending_column": 28 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "setInt", + "type": "contract", + "name": "naming", "source_mapping": { - "start": 521, - "length": 63, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 35, - 36, - 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "setInt(uint256,uint256)" - } - } - }, - "additional_fields": { - "target": "parameter", - "convention": "mixedCase" - } - } - ], - "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase\n", - "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35", - "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "MY_other_CONSTANT", - "source_mapping": { - "start": 143, - "length": 35, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 9 - ], - "starting_column": 5, - "ending_column": 40 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "naming", - "source_mapping": { - "start": 28, - "length": 642, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", @@ -586,15 +459,15 @@ } }, "additional_fields": { - "target": "variable_constant", - "convention": "UPPER_CASE_WITH_UNDERSCORES" + "target": "enum", + "convention": "CapWords" } } ], - "description": "Constant naming.MY_other_CONSTANT (tests/detectors/naming-convention/0.7.6/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "markdown": "Constant [naming.MY_other_CONSTANT](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9) is not in UPPER_CASE_WITH_UNDERSCORES\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L9", - "id": "596c2e8064f8f2df55cd5c878eb59c0a74ac7f20719c420d8af307f2431a1a90", + "description": "Enum naming.numbers (tests/detectors/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords\n", + "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6", + "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -603,20 +476,176 @@ "elements": [ { "type": "variable", - "name": "Var_One", + "name": "_used", "source_mapping": { - "start": 185, - "length": 16, + "start": 794, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 11 + 59 + ], + "starting_column": 33, + "ending_column": 43 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "test", + "source_mapping": { + "start": 766, + "length": 84, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 59, + 60 + ], + "starting_column": 5, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "test(uint256,uint256)" + } + } + }, + "additional_fields": { + "target": "parameter", + "convention": "mixedCase" + } + } + ], + "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase\n", + "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59", + "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "_myPublicVar", + "source_mapping": { + "start": 741, + "length": 17, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 56 ], "starting_column": 5, - "ending_column": 21 + "ending_column": 22 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } + } + }, + "additional_fields": { + "target": "variable", + "convention": "mixedCase" + } + } + ], + "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase\n", + "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56", + "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "event", + "name": "event_", + "source_mapping": { + "start": 335, + "length": 19, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 23 + ], + "starting_column": 5, + "ending_column": 24 }, "type_specific_fields": { "parent": { @@ -681,18 +710,86 @@ "starting_column": 1, "ending_column": 2 } + }, + "signature": "event_(uint256)" + }, + "additional_fields": { + "target": "event", + "convention": "CapWords" + } + } + ], + "description": "Event namingevent_(uint256) (tests/detectors/naming-convention/0.7.6/naming_convention.sol#23) is not in CapWords\n", + "markdown": "Event [namingevent_(uint256)](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23) is not in CapWords\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L23", + "id": "978ecf4a2c8b96d947e60f6601cf60d0e25e07ebe80ebbc37a7e7f279afd1405", + "check": "naming-convention", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "l", + "source_mapping": { + "start": 900, + "length": 10, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 67 + ], + "starting_column": 5, + "ending_column": 15 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "T", + "source_mapping": { + "start": 692, + "length": 221, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68 + ], + "starting_column": 1, + "ending_column": 2 + } } }, "additional_fields": { "target": "variable", - "convention": "mixedCase" + "convention": "l_O_I_should_not_be_used" } } ], - "description": "Variable naming.Var_One (tests/detectors/naming-convention/0.7.6/naming_convention.sol#11) is not in mixedCase\n", - "markdown": "Variable [naming.Var_One](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L11", - "id": "34b7c817201b3f3086fc3541f140898d9e9aabe999b1c0a6ef8639ec04351f26", + "description": "Variable T.l (tests/detectors/naming-convention/0.7.6/naming_convention.sol#67) used l, O, I, which should not be used\n", + "markdown": "Variable [T.l](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67) used l, O, I, which should not be used\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67", + "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -700,21 +797,23 @@ { "elements": [ { - "type": "enum", - "name": "numbers", + "type": "function", + "name": "CantDo", "source_mapping": { - "start": 79, - "length": 23, + "start": 591, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 6 + 41, + 42, + 43 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -779,18 +878,19 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "CantDo()" }, "additional_fields": { - "target": "enum", - "convention": "CapWords" + "target": "modifier", + "convention": "mixedCase" } } ], - "description": "Enum naming.numbers (tests/detectors/naming-convention/0.7.6/naming_convention.sol#6) is not in CapWords\n", - "markdown": "Enum [naming.numbers](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6) is not in CapWords\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L6", - "id": "7c87b076ea2865060182cf11d155caadb1dcea415ccce0ca8563a74a01611fc2", + "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#41-43) is not in mixedCase\n", + "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43", + "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -799,19 +899,20 @@ "elements": [ { "type": "function", - "name": "CantDo", + "name": "GetOne", "source_mapping": { - "start": 591, - "length": 36, + "start": 440, + "length": 75, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43 + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -880,18 +981,18 @@ "ending_column": 2 } }, - "signature": "CantDo()" + "signature": "GetOne()" }, "additional_fields": { - "target": "modifier", + "target": "function", "convention": "mixedCase" } } ], - "description": "Modifier naming.CantDo() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#41-43) is not in mixedCase\n", - "markdown": "Modifier [naming.CantDo()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L41-L43", - "id": "b8a754a01bd47127f00032cdedd0ade3e27e6543631d8f5bc9e44365ab732895", + "description": "Function naming.GetOne() (tests/detectors/naming-convention/0.7.6/naming_convention.sol#30-33) is not in mixedCase\n", + "markdown": "Function [naming.GetOne()](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L30-L33", + "id": "bf6f97d6a82b84284efdade52d01bd6112007426e2e88d1568190d63c5c4a049", "check": "naming-convention", "impact": "Informational", "confidence": "High" @@ -900,74 +1001,107 @@ "elements": [ { "type": "variable", - "name": "_used", + "name": "Number2", "source_mapping": { - "start": 794, - "length": 10, + "start": 551, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 59 + 35 ], - "starting_column": 33, - "ending_column": 43 + "starting_column": 35, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "setInt", "source_mapping": { - "start": 766, - "length": 84, + "start": 521, + "length": 63, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 59, - 60 + 35, + 36, + 37, + 38 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "T", + "name": "naming", "source_mapping": { - "start": 692, - "length": 221, + "start": 28, + "length": 642, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 + 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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "test(uint256,uint256)" + "signature": "setInt(uint256,uint256)" } } }, @@ -977,144 +1111,10 @@ } } ], - "description": "Parameter T.test(uint256,uint256)._used (tests/detectors/naming-convention/0.7.6/naming_convention.sol#59) is not in mixedCase\n", - "markdown": "Parameter [T.test(uint256,uint256)._used](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L59", - "id": "818962ad9f50f13eb87b5c7deade22666431945fb60055f572b38246cfbf311e", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "_myPublicVar", - "source_mapping": { - "start": 741, - "length": 17, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 56 - ], - "starting_column": 5, - "ending_column": 22 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "mixedCase" - } - } - ], - "description": "Variable T._myPublicVar (tests/detectors/naming-convention/0.7.6/naming_convention.sol#56) is not in mixedCase\n", - "markdown": "Variable [T._myPublicVar](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56) is not in mixedCase\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L56", - "id": "8acd53815786acad5b92b51366daf79182a67ab438daa41a6e1ec8a9601fa9a3", - "check": "naming-convention", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "l", - "source_mapping": { - "start": 900, - "length": 10, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 67 - ], - "starting_column": 5, - "ending_column": 15 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "T", - "source_mapping": { - "start": 692, - "length": 221, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/naming-convention/0.7.6/naming_convention.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68 - ], - "starting_column": 1, - "ending_column": 2 - } - } - }, - "additional_fields": { - "target": "variable", - "convention": "l_O_I_should_not_be_used" - } - } - ], - "description": "Variable T.l (tests/detectors/naming-convention/0.7.6/naming_convention.sol#67) used l, O, I, which should not be used\n", - "markdown": "Variable [T.l](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67) used l, O, I, which should not be used\n", - "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L67", - "id": "b595f9e6d03b8b501b7c4a9bf8ff0ad9bf11448a25f53d63ab5031c95f8ae89c", + "description": "Parameter naming.setInt(uint256,uint256).Number2 (tests/detectors/naming-convention/0.7.6/naming_convention.sol#35) is not in mixedCase\n", + "markdown": "Parameter [naming.setInt(uint256,uint256).Number2](tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35) is not in mixedCase\n", + "first_markdown_element": "tests/detectors/naming-convention/0.7.6/naming_convention.sol#L35", + "id": "f03bff0b488524254e19ff7d688d34211cd2f29934e22417c9f1fa43fc4a08ad", "check": "naming-convention", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json b/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json index 5856f4527..8c69a53b3 100644 --- a/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.4.25/redundant_statements.sol.0.4.25.RedundantStatements.json @@ -126,9 +126,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "uint256", "source_mapping": { - "start": 155, + "start": 257, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", @@ -136,7 +136,7 @@ "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 12 ], "starting_column": 9, "ending_column": 13 @@ -144,21 +144,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -197,7 +198,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7", - "id": "da776628bba71bca43caf77bb06a7055fe3c0f4f18a30274c5cb508bcb3a27b4", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12", + "id": "7423f2beb0d066fc4e193c27dd50b172186e9539b778ab72bf950dbe872df720", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "test", "source_mapping": { - "start": 169, - "length": 27, + "start": 287, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 14 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8", - "id": "cb9ace5d0188d80bdc530d3760b41a1dcf1a4c10151b720e468550bb22be0e74", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14", + "id": "c3c9961e4467e57974929ecfaeb34a0923fc257422a7705c9d1b14257cfe0c3a", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -370,40 +372,39 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 257, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L12", - "id": "7423f2beb0d066fc4e193c27dd50b172186e9539b778ab72bf950dbe872df720", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L8", + "id": "cb9ace5d0188d80bdc530d3760b41a1dcf1a4c10151b720e468550bb22be0e74", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13", - "id": "e0137cf6a61eb49d07e1a67a7cdfd0cb82cac0402cded9f1cfb85ae1e6e8d3fe", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L7", + "id": "da776628bba71bca43caf77bb06a7055fe3c0f4f18a30274c5cb508bcb3a27b4", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,20 +616,20 @@ "elements": [ { "type": "node", - "name": "test", + "name": "assert(bool)", "source_mapping": { - "start": 287, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L14", - "id": "c3c9961e4467e57974929ecfaeb34a0923fc257422a7705c9d1b14257cfe0c3a", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.4.25/redundant_statements.sol#L13", + "id": "e0137cf6a61eb49d07e1a67a7cdfd0cb82cac0402cded9f1cfb85ae1e6e8d3fe", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json b/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json index 2f09ce19b..8e17b5fb2 100644 --- a/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.5.16/redundant_statements.sol.0.5.16.RedundantStatements.json @@ -4,39 +4,40 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "assert(bool)", "source_mapping": { - "start": 141, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -75,7 +76,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -114,10 +115,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6", - "id": "58d73cb2126e8c76752e57c69feeed96ee7db0cc50cf33c0f92679525acc26e9", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13", + "id": "342d8ac4c8c6e96ca7ca18f4bb9abed731c08b4c19a4461151ea48fc503be342", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -126,9 +127,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "uint256", "source_mapping": { - "start": 155, + "start": 141, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", @@ -136,7 +137,7 @@ "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 9, "ending_column": 13 @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7", - "id": "f57f949deb97e88dedd17864427a4941d1395be24db436d3a45945a45c53b919", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L6", + "id": "58d73cb2126e8c76752e57c69feeed96ee7db0cc50cf33c0f92679525acc26e9", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "test", "source_mapping": { - "start": 169, - "length": 27, + "start": 287, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 14 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8", - "id": "faaa2cdb764d49e4d06709c566d903cc4b222634a27b31bbbb0217a13b84aa62", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14", + "id": "b36c497f678f32a5479ead924c310a0c86b398e465f69b0e7365f06befaef172", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +495,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +566,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +605,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L13", - "id": "342d8ac4c8c6e96ca7ca18f4bb9abed731c08b4c19a4461151ea48fc503be342", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L7", + "id": "f57f949deb97e88dedd17864427a4941d1395be24db436d3a45945a45c53b919", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,40 +617,39 @@ "elements": [ { "type": "node", - "name": "test", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 287, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -688,7 +688,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L14", - "id": "b36c497f678f32a5479ead924c310a0c86b398e465f69b0e7365f06befaef172", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.5.16/redundant_statements.sol#L8", + "id": "faaa2cdb764d49e4d06709c566d903cc4b222634a27b31bbbb0217a13b84aa62", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json b/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json index f57476a4a..24f517567 100644 --- a/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.6.11/redundant_statements.sol.0.6.11.RedundantStatements.json @@ -4,20 +4,20 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 141, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { @@ -114,10 +114,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6", - "id": "c58083eaf5653fc9616833c617157456ad9088c4638009d9cdfebdc1445671bd", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8", + "id": "1ffcec7a83522ce311c8410e5523283b97944a0c27356e3141b26a7f32a022d3", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -126,9 +126,9 @@ "elements": [ { "type": "node", - "name": "bool", + "name": "test", "source_mapping": { - "start": 155, + "start": 287, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", @@ -136,7 +136,7 @@ "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 7 + 14 ], "starting_column": 9, "ending_column": 13 @@ -144,21 +144,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -197,7 +198,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -236,10 +237,10 @@ } } ], - "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7", - "id": "f0fef441fabe415b9cbc63bfc5a2a5c69f6248ce22d1bd94f73979f928cb7dba", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14", + "id": "5223d6cc441a1f923616873898ea34e0ff11a758c38d6b5244b9e9ea6be9bec8", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "uint256", "source_mapping": { - "start": 169, - "length": 27, + "start": 257, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 12 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L8", - "id": "1ffcec7a83522ce311c8410e5523283b97944a0c27356e3141b26a7f32a022d3", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12", + "id": "53f741bfdd4465fbdb8799391ca2fa50ac657b72ac9b822c87e2e4ae79d831d8", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -372,7 +374,7 @@ "type": "node", "name": "uint256", "source_mapping": { - "start": 257, + "start": 141, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", @@ -380,7 +382,7 @@ "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 6 ], "starting_column": 9, "ending_column": 13 @@ -388,22 +390,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L12", - "id": "53f741bfdd4465fbdb8799391ca2fa50ac657b72ac9b822c87e2e4ae79d831d8", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L6", + "id": "c58083eaf5653fc9616833c617157456ad9088c4638009d9cdfebdc1445671bd", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "bool", "source_mapping": { - "start": 271, - "length": 6, + "start": 155, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 7 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13", - "id": "f902982db50d530e22b29f35ab1a740f1af29683b0ebb9edd53240721b4f95b9", + "description": "Redundant expression \"bool (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#7)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[bool](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L7", + "id": "f0fef441fabe415b9cbc63bfc5a2a5c69f6248ce22d1bd94f73979f928cb7dba", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,20 +616,20 @@ "elements": [ { "type": "node", - "name": "test", + "name": "assert(bool)", "source_mapping": { - "start": 287, - "length": 4, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 13 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L14", - "id": "5223d6cc441a1f923616873898ea34e0ff11a758c38d6b5244b9e9ea6be9bec8", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.6.11/redundant_statements.sol#L13", + "id": "f902982db50d530e22b29f35ab1a740f1af29683b0ebb9edd53240721b4f95b9", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json b/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json index 3cf570b00..2b16d2d72 100644 --- a/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json +++ b/tests/detectors/redundant-statements/0.7.6/redundant_statements.sol.0.7.6.RedundantStatements.json @@ -4,9 +4,9 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "test", "source_mapping": { - "start": 141, + "start": 287, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", @@ -14,7 +14,7 @@ "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 6 + 14 ], "starting_column": 9, "ending_column": 13 @@ -22,21 +22,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -75,7 +76,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -114,10 +115,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6", - "id": "d16c698a23693dc64165fc886c68f6900a7a2699998f0f3713d875cf49a2af87", + "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14", + "id": "45bb5d6a69015db0e07e6d13107db089e1095da3cf0918f624db12181fac28a1", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -248,39 +249,40 @@ "elements": [ { "type": "node", - "name": "RedundantStatementsContract", + "name": "assert(bool)", "source_mapping": { - "start": 169, - "length": 27, + "start": 271, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 8 + 13 ], "starting_column": 9, - "ending_column": 36 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "constructor", + "name": "test", "source_mapping": { - "start": 110, - "length": 93, + "start": 209, + "length": 109, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 5, - 6, - 7, - 8, - 9 + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 5, "ending_column": 6 @@ -319,7 +321,7 @@ "ending_column": 0 } }, - "signature": "constructor()" + "signature": "test()" } } } @@ -358,10 +360,10 @@ } } ], - "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8", - "id": "caf262c2d237789c12de0cf27ef88625491b29a1bc3209ced3a12d2890fc799e", + "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13", + "id": "774a4440b59af9fa94c7552ba0ce21a7835511012dc6257afc3fd4d80a023b28", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -370,40 +372,39 @@ "elements": [ { "type": "node", - "name": "uint256", + "name": "RedundantStatementsContract", "source_mapping": { - "start": 257, - "length": 4, + "start": 169, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 12 + 8 ], "starting_column": 9, - "ending_column": 13 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -442,7 +443,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -481,10 +482,10 @@ } } ], - "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12", - "id": "ffe6709dbcfc3342d28833aad5375135da8cc7369bf0649ab1796ff4eae14ca1", + "description": "Redundant expression \"RedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#8)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L8", + "id": "caf262c2d237789c12de0cf27ef88625491b29a1bc3209ced3a12d2890fc799e", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -493,40 +494,39 @@ "elements": [ { "type": "node", - "name": "assert(bool)", + "name": "uint256", "source_mapping": { - "start": 271, - "length": 6, + "start": 141, + "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 13 + 6 ], "starting_column": 9, - "ending_column": 15 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "function", - "name": "test", + "name": "constructor", "source_mapping": { - "start": 209, - "length": 109, + "start": 110, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16 + 5, + 6, + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -565,7 +565,7 @@ "ending_column": 0 } }, - "signature": "test()" + "signature": "constructor()" } } } @@ -604,10 +604,10 @@ } } ], - "description": "Redundant expression \"assert(bool) (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#13)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[assert(bool)](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L13", - "id": "774a4440b59af9fa94c7552ba0ce21a7835511012dc6257afc3fd4d80a023b28", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#6)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L6", + "id": "d16c698a23693dc64165fc886c68f6900a7a2699998f0f3713d875cf49a2af87", "check": "redundant-statements", "impact": "Informational", "confidence": "High" @@ -616,9 +616,9 @@ "elements": [ { "type": "node", - "name": "test", + "name": "uint256", "source_mapping": { - "start": 287, + "start": 257, "length": 4, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", @@ -626,7 +626,7 @@ "filename_short": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol", "is_dependency": false, "lines": [ - 14 + 12 ], "starting_column": 9, "ending_column": 13 @@ -727,10 +727,10 @@ } } ], - "description": "Redundant expression \"test (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#14)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", - "markdown": "Redundant expression \"[test](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", - "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L14", - "id": "45bb5d6a69015db0e07e6d13107db089e1095da3cf0918f624db12181fac28a1", + "description": "Redundant expression \"uint256 (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#12)\" inRedundantStatementsContract (tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#3-18)\n", + "markdown": "Redundant expression \"[uint256](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12)\" in[RedundantStatementsContract](tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L3-L18)\n", + "first_markdown_element": "tests/detectors/redundant-statements/0.7.6/redundant_statements.sol#L12", + "id": "ffe6709dbcfc3342d28833aad5375135da8cc7369bf0649ab1796ff4eae14ca1", "check": "redundant-statements", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json index 160fe0246..1d62e309c 100644 --- a/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol.0.4.25.ReentrancyBenign.json @@ -4,22 +4,21 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 322, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -111,45 +110,44 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } }, { "type": "node", - "name": "! (msg.sender.call())", + "name": "ethSender(address(0))", "source_mapping": { - "start": 359, - "length": 20, + "start": 1184, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 54 ], - "starting_column": 13, - "ending_column": 33 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 322, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -241,7 +239,7 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } } }, @@ -251,40 +249,37 @@ }, { "type": "node", - "name": "! (msg.sender.call())", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 359, - "length": 20, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 64 ], - "starting_column": 13, - "ending_column": 33 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "ethSender", "source_mapping": { - "start": 322, - "length": 120, + "start": 1364, + "length": 91, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 63, + 64, + 65 ], "starting_column": 5, "ending_column": 6 @@ -376,7 +371,7 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "ethSender(address)" } } }, @@ -386,9 +381,9 @@ }, { "type": "node", - "name": "counter += 1", + "name": "varChanger()", "source_mapping": { - "start": 423, + "start": 1215, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -396,7 +391,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 20 + 55 ], "starting_column": 9, "ending_column": 21 @@ -404,22 +399,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad5", "source_mapping": { - "start": 322, - "length": 120, + "start": 1137, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 53, + 54, + 55, + 56, + 57 ], "starting_column": 5, "ending_column": 6 @@ -511,172 +505,48 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad5(address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#16-21):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#20)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21", - "id": "2a39756367d068df6d24cfb010f495564ad89f8696ab2eaf9635d640412963cb", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 448, - "length": 132, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 23, - 24, - 25, - 26, - 27 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1510, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad1(address)" + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "success = target.call()", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 495, - "length": 30, + "start": 1501, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 68 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "varChanger", "source_mapping": { - "start": 448, - "length": 132, + "start": 1461, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27 + 67, + 68, + 69 ], "starting_column": 5, "ending_column": 6 @@ -768,49 +638,174 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "varChanger()" } } }, "additional_fields": { - "underlying_type": "external_calls" - } - }, + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#53-57):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#54)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L54)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57", + "id": "254751a69c99356562e79eb0a53483ca1bcb0e9c4c847219206c665624db8a4c", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "success = target.call()", + "type": "function", + "name": "bad0", "source_mapping": { - "start": 495, - "length": 30, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24 + 16, + 17, + 18, + 19, + 20, + 21 ], - "starting_column": 9, - "ending_column": 39 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad1", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 448, - "length": 132, + "start": 25, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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 + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "! (msg.sender.call())", + "source_mapping": { + "start": 359, + "length": 20, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 17 + ], + "starting_column": 13, + "ending_column": 33 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 322, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -902,49 +897,50 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "counter += 1", + "name": "! (msg.sender.call())", "source_mapping": { - "start": 561, - "length": 12, + "start": 359, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 26 + 17 ], - "starting_column": 9, - "ending_column": 21 + "starting_column": 13, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 448, - "length": 132, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27 + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 5, "ending_column": 6 @@ -1036,182 +1032,50 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23-27):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#26)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L26)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27", - "id": "5fb57eb2a5139fdffbb315bf81a08464938d5f19d8b87e1c292d5be33d8ddd40", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad2", + "type": "node", + "name": "counter += 1", "source_mapping": { - "start": 586, - "length": 238, + "start": 423, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38 + 20 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 21 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad0", "source_mapping": { - "start": 25, - "length": 1510, + "start": 322, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" - } - }, - { - "type": "node", - "name": "success = target.call()", - "source_mapping": { - "start": 633, - "length": 30, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 30 - ], - "starting_column": 9, - "ending_column": 39 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 586, - "length": 238, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38 + 21 ], "starting_column": 5, "ending_column": 6 @@ -1303,44 +1167,87 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#16-21):\n\tExternal calls:\n\t- ! (msg.sender.call()) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#20)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21):\n\tExternal calls:\n\t- [! (msg.sender.call())](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L20)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L16-L21", + "id": "2a39756367d068df6d24cfb010f495564ad89f8696ab2eaf9635d640412963cb", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "address(target).call.value(1000)()", + "type": "function", + "name": "bad4", "source_mapping": { - "start": 700, - "length": 34, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32 + 46, + 47, + 48, + 49, + 50, + 51 ], - "starting_column": 13, - "ending_column": 47 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad2", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 586, - "length": 238, + "start": 25, + "length": 1510, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, @@ -1350,146 +1257,84 @@ 35, 36, 37, - 38 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1510, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls" + }, + "signature": "bad4(address)" } }, { "type": "node", - "name": "success = target.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 633, - "length": 30, + "start": 1008, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30 + 47 ], "starting_column": 9, - "ending_column": 39 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 586, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1581,54 +1426,47 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "address(target).call()", "source_mapping": { - "start": 700, - "length": 34, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 32 + 60 ], - "starting_column": 13, - "ending_column": 47 + "starting_column": 9, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 586, - "length": 238, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -1720,7 +1558,7 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, @@ -1730,44 +1568,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "ethSender(address(0))", "source_mapping": { - "start": 748, - "length": 12, + "start": 1040, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 48 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 586, - "length": 238, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -1859,142 +1693,151 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#29-38):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#30)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#33)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L30)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L33)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38", - "id": "3180ddee7a1760e704dea65602dda2c269e95d0623dd8dba90c0fa59fc983078", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad3", + "type": "node", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 830, - "length": 125, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40, - 41, - 42, - 43, - 44 + 64 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 40 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "ethSender", "source_mapping": { - "start": 25, - "length": 1510, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, + "start": 1364, + "length": 91, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ 63, 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71 + 65 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "ethSender(address)" } - }, - "signature": "bad3(address)" + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", "name": "externalCaller(target)", "source_mapping": { - "start": 877, + "start": 1008, "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -2002,7 +1845,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41 + 47 ], "starting_column": 9, "ending_column": 31 @@ -2010,21 +1853,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 830, - "length": 125, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40, - 41, - 42, - 43, - 44 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -2116,12 +1960,12 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { @@ -2258,39 +2102,40 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "ethSender(address(0))", "source_mapping": { - "start": 877, - "length": 22, + "start": 1040, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41 + 48 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 830, - "length": 125, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40, - 41, - 42, - 43, - 44 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -2382,7 +2227,7 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2392,37 +2237,37 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1329, - "length": 22, + "start": 1417, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 64 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1271, - "length": 87, + "start": 1364, + "length": 91, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 63, + 64, + 65 ], "starting_column": 5, "ending_column": 6 @@ -2514,7 +2359,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -2526,7 +2371,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 909, + "start": 1071, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -2534,7 +2379,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 49 ], "starting_column": 9, "ending_column": 21 @@ -2542,21 +2387,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad4", "source_mapping": { - "start": 830, - "length": 125, + "start": 961, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 40, - 41, - 42, - 43, - 44 + 46, + 47, + 48, + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -2648,7 +2494,7 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad4(address)" } } }, @@ -2791,10 +2637,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#40-44):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#41)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#42)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L41)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L42)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44", - "id": "a810049262dd308ddb72c1e0ff5f221cc85389c1e0a91b3e9c1eb06264e8de75", + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#46-51):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#47)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#49)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L47)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L49)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51", + "id": "2c5b7e723892ca273cde4bf80ff3909e425d55cc6de2a2c0778c4cfed2e32e11", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2803,22 +2649,26 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 961, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -2910,45 +2760,49 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "success = target.call()", "source_mapping": { - "start": 1008, - "length": 22, + "start": 633, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47 + 30 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 961, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3040,7 +2894,7 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } } }, @@ -3050,37 +2904,44 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 1329, - "length": 22, + "start": 700, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 32 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad2", "source_mapping": { - "start": 1271, - "length": 87, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3172,50 +3033,54 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "success = target.call()", "source_mapping": { - "start": 1040, - "length": 21, + "start": 633, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 48 + 30 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 961, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3307,47 +3172,54 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 1417, - "length": 31, + "start": 700, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64 + 32 ], - "starting_column": 9, - "ending_column": 40 + "starting_column": 13, + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad2", "source_mapping": { - "start": 1364, - "length": 91, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 63, - 64, - 65 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3439,7 +3311,7 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad2(address)" } } }, @@ -3449,40 +3321,44 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "counter += 1", "source_mapping": { - "start": 1008, - "length": 22, + "start": 748, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47 + 33 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad2", "source_mapping": { - "start": 961, - "length": 170, + "start": 586, + "length": 238, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 5, "ending_column": 6 @@ -3574,47 +3450,172 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad2(address)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#29-38):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#30)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#32)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#33)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L30)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L32)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L33)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L29-L38", + "id": "3180ddee7a1760e704dea65602dda2c269e95d0623dd8dba90c0fa59fc983078", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 448, + "length": 132, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25, + 26, + 27 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad1(address)" } }, { "type": "node", - "name": "address(target).call()", + "name": "success = target.call()", "source_mapping": { - "start": 1329, - "length": 22, + "start": 495, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60 + 24 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1271, - "length": 87, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 59, - 60, - 61 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3706,50 +3707,49 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "success = target.call()", "source_mapping": { - "start": 1040, - "length": 21, + "start": 495, + "length": 30, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 48 + 24 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 39 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 961, - "length": 170, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3841,7 +3841,7 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, @@ -3851,37 +3851,39 @@ }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "counter += 1", "source_mapping": { - "start": 1417, - "length": 31, + "start": 561, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64 + 26 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad1", "source_mapping": { - "start": 1364, - "length": 91, + "start": 448, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 63, - 64, - 65 + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -3973,50 +3975,172 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#23-27):\n\tExternal calls:\n\t- success = target.call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#24)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27):\n\tExternal calls:\n\t- [success = target.call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L24)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L23-L27", + "id": "5fb57eb2a5139fdffbb315bf81a08464938d5f19d8b87e1c292d5be33d8ddd40", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 830, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 40, + 41, + 42, + 43, + 44 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 25, + "length": 1510, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 1071, - "length": 12, + "start": 877, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 49 + 41 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 961, - "length": 170, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 46, - 47, - 48, - 49, - 50, - 51 + 40, + 41, + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -4108,48 +4232,47 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1501, - "length": 25, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 68 + 60 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1461, - "length": 72, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 67, - 68, - 69 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -4241,172 +4364,49 @@ "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#46-51):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#47)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#48)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#49)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L47)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L48)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L49)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L46-L51", - "id": "2c5b7e723892ca273cde4bf80ff3909e425d55cc6de2a2c0778c4cfed2e32e11", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 1137, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 53, - 54, - 55, - 56, - 57 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 25, - "length": 1510, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 1184, - "length": 21, + "start": 877, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54 + 41 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1137, - "length": 128, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56, - 57 + 40, + 41, + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -4498,47 +4498,47 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call()", "source_mapping": { - "start": 1417, - "length": 31, + "start": 1329, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64 + 60 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1364, - "length": 91, + "start": 1271, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 63, - 64, - 65 + 59, + 60, + 61 ], "starting_column": 5, "ending_column": 6 @@ -4630,7 +4630,7 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4642,7 +4642,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1215, + "start": 909, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", @@ -4650,7 +4650,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 42 ], "starting_column": 9, "ending_column": 21 @@ -4658,21 +4658,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1137, - "length": 128, + "start": 830, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56, - 57 + 40, + 41, + 42, + 43, + 44 ], "starting_column": 5, "ending_column": 6 @@ -4764,7 +4764,7 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4907,10 +4907,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#53-57):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#54)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#64)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#55)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L54)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L64)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L55)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L53-L57", - "id": "254751a69c99356562e79eb0a53483ca1bcb0e9c4c847219206c665624db8a4c", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#40-44):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#41)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#60)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#42)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#68)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L41)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L60)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L42)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L68)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.4.25/reentrancy-benign.sol#L40-L44", + "id": "a810049262dd308ddb72c1e0ff5f221cc85389c1e0a91b3e9c1eb06264e8de75", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json index b72e0288a..c3a8c8343 100644 --- a/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol.0.5.16.ReentrancyBenign.json @@ -4,23 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 335, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -113,46 +112,45 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 368, - "length": 37, + "start": 1064, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 48 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 335, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -245,7 +243,7 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } } }, @@ -255,41 +253,37 @@ }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "address(target).call()", "source_mapping": { - "start": 368, - "length": 37, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 61 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "externalCaller", "source_mapping": { - "start": 335, - "length": 155, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -382,7 +376,7 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "externalCaller(address)" } } }, @@ -392,41 +386,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "ethSender(address(0))", "source_mapping": { - "start": 471, - "length": 12, + "start": 1096, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21 + 49 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad4", "source_mapping": { - "start": 335, - "length": 155, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -519,143 +512,19 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#21)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L21)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22", - "id": "7222cf72aee6330979168010b682e7d820989fbbf9a23906914e967a0f5533e6", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 496, - "length": 135, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1569, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 543, + "start": 1477, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -663,7 +532,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 65 ], "starting_column": 9, "ending_column": 42 @@ -671,23 +540,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "ethSender", "source_mapping": { - "start": 496, - "length": 135, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 - ], - "starting_column": 5, + 64, + 65, + 66 + ], + "starting_column": 5, "ending_column": 6 }, "type_specific_fields": { @@ -778,49 +645,50 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "ethSender(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 543, - "length": 33, + "start": 1064, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 48 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad4", "source_mapping": { - "start": 496, - "length": 135, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -913,7 +781,7 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad4(address)" } } }, @@ -923,39 +791,37 @@ }, { "type": "node", - "name": "counter += 1", + "name": "address(target).call()", "source_mapping": { - "start": 612, - "length": 12, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 27 + 61 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "externalCaller", "source_mapping": { - "start": 496, - "length": 135, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1048,183 +914,50 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#27)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L27)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28", - "id": "182811ddaccda6e1fc2f65594a377c1592929956b04e6e52c5ad7c0121f0c809", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad2", + "type": "node", + "name": "ethSender(address(0))", "source_mapping": { - "start": 637, - "length": 243, + "start": 1096, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 49 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad4", "source_mapping": { - "start": 28, - "length": 1569, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, 47, 48, 49, 50, 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" - } - }, - { - "type": "node", - "name": "(success) = target.call()", - "source_mapping": { - "start": 684, - "length": 33, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 31 - ], - "starting_column": 9, - "ending_column": 42 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 637, - "length": 243, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 52 ], "starting_column": 5, "ending_column": 6 @@ -1317,54 +1050,47 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 754, - "length": 36, + "start": 1477, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 65 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "ethSender", "source_mapping": { - "start": 637, - "length": 243, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -1457,54 +1183,50 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "ethSender(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "varChanger()", "source_mapping": { - "start": 684, - "length": 33, + "start": 1127, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31 + 50 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 637, - "length": 243, + "start": 1017, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1597,54 +1319,48 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 754, - "length": 36, + "start": 1563, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 69 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "varChanger", "source_mapping": { - "start": 637, - "length": 243, + "start": 1523, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -1737,44 +1453,87 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "varChanger()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52", + "id": "09715812e28a5537647f577ab2ae708e7a3c903caf67e0ea43e15320f8a602c5", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "counter += 1", + "type": "function", + "name": "bad1", "source_mapping": { - "start": 804, - "length": 12, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 24, + 25, + 26, + 27, + 28 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad2", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 637, - "length": 243, + "start": 28, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, 32, @@ -1784,7 +1543,83 @@ 36, 37, 38, - 39 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad1(address)" + } + }, + { + "type": "node", + "name": "(success) = target.call()", + "source_mapping": { + "start": 543, + "length": 33, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 25 + ], + "starting_column": 9, + "ending_column": 42 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad1", + "source_mapping": { + "start": 496, + "length": 135, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -1877,173 +1712,184 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#34)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L34)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39", - "id": "252ced5708ae1cf4a55673e963669257e8c4f2601c814c635fde84d478612e2a", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad3", + "type": "node", + "name": "(success) = target.call()", "source_mapping": { - "start": 886, - "length": 125, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 25 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 42 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad1", "source_mapping": { - "start": 28, - "length": 1569, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 + 28 ], - "starting_column": 1, - "ending_column": 0 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad1(address)" } - }, - "signature": "bad3(address)" + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "counter += 1", "source_mapping": { - "start": 933, - "length": 22, + "start": 612, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 27 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 886, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2136,47 +1982,183 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L24-L28", + "id": "182811ddaccda6e1fc2f65594a377c1592929956b04e6e52c5ad7c0121f0c809", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad2", + "source_mapping": { + "start": 637, + "length": 243, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad2(address)" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 31 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad2", "source_mapping": { - "start": 1329, - "length": 89, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2269,49 +2251,54 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 933, - "length": 22, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 33 ], - "starting_column": 9, - "ending_column": 31 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 886, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2404,47 +2391,54 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 31 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad2", "source_mapping": { - "start": 1329, - "length": 89, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2537,7 +2531,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad2(address)" } } }, @@ -2547,39 +2541,44 @@ }, { "type": "node", - "name": "varChanger()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 965, - "length": 12, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 43 + 33 ], - "starting_column": 9, - "ending_column": 21 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad2", "source_mapping": { - "start": 886, - "length": 125, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2672,48 +2671,54 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "counter += 1", "source_mapping": { - "start": 1563, - "length": 25, + "start": 804, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 69 + 34 ], - "starting_column": 9, - "ending_column": 34 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "bad2", "source_mapping": { - "start": 1523, - "length": 72, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 68, - 69, - 70 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -2806,20 +2811,20 @@ "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "bad2(address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "variable_name": "counter" } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45", - "id": "b4ca5fb9ad17bbab425a11b56f4fb0466db3680404ffb27f185072af6033dae3", + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L30-L39", + "id": "252ced5708ae1cf4a55673e963669257e8c4f2601c814c635fde84d478612e2a", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2828,22 +2833,23 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad0", "source_mapping": { - "start": 1017, - "length": 172, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2898,216 +2904,84 @@ 37, 38, 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad4(address)" - } - }, - { - "type": "node", - "name": "externalCaller(target)", - "source_mapping": { - "start": 1064, - "length": 22, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 48 - ], - "starting_column": 9, - "ending_column": 31 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad4", - "source_mapping": { - "start": 1017, - "length": 172, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1569, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad4(address)" + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls" + }, + "signature": "bad0()" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 17 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad0", "source_mapping": { - "start": 1329, - "length": 89, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -3200,50 +3074,51 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 1096, - "length": 21, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 49 + 17 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad0", "source_mapping": { - "start": 1017, - "length": 172, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -3336,47 +3211,51 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "counter += 1", "source_mapping": { - "start": 1477, - "length": 33, + "start": 471, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 21 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "bad0", "source_mapping": { - "start": 1424, - "length": 93, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -3469,50 +3348,173 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "bad0()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L16-L22", + "id": "7222cf72aee6330979168010b682e7d820989fbbf9a23906914e967a0f5533e6", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad5", + "source_mapping": { + "start": 1195, + "length": 128, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 54, + 55, + 56, + 57, + 58 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad5(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "ethSender(address(0))", "source_mapping": { - "start": 1064, - "length": 22, + "start": 1242, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 48 + 55 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1017, - "length": 172, + "start": 1195, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3605,47 +3607,47 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call.value(1)()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 1477, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 65 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1329, - "length": 89, + "start": 1424, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3738,7 +3740,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -3748,40 +3750,39 @@ }, { "type": "node", - "name": "ethSender(address(0))", + "name": "varChanger()", "source_mapping": { - "start": 1096, - "length": 21, + "start": 1273, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 49 + 56 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1017, - "length": 172, + "start": 1195, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3874,47 +3875,48 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1477, - "length": 33, + "start": 1563, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 69 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "varChanger", "source_mapping": { - "start": 1424, - "length": 93, + "start": 1523, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -4007,50 +4009,173 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "varChanger()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#55)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L55)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58", + "id": "b371cf739f2ef594320a33b4d707024727f7fc7cabf48f9946f65653429b671e", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 886, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 1127, - "length": 12, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 50 + 42 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 1017, - "length": 172, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4143,48 +4268,47 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1563, - "length": 25, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 69 + 61 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1523, - "length": 72, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 68, - 69, - 70 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4277,173 +4401,49 @@ "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#49)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L49)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L47-L52", - "id": "09715812e28a5537647f577ab2ae708e7a3c903caf67e0ea43e15320f8a602c5", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 1195, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1569, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 1242, - "length": 21, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 42 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1195, - "length": 128, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4536,47 +4536,47 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1)()", + "name": "address(target).call()", "source_mapping": { - "start": 1477, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1424, - "length": 93, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4669,7 +4669,7 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4681,7 +4681,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1273, + "start": 965, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", @@ -4689,7 +4689,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 43 ], "starting_column": 9, "ending_column": 21 @@ -4697,21 +4697,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1195, - "length": 128, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4804,7 +4804,7 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4948,10 +4948,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#55)\n\t\t- address(target).call.value(1)() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L55)\n\t\t- [address(target).call.value(1)()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L54-L58", - "id": "b371cf739f2ef594320a33b4d707024727f7fc7cabf48f9946f65653429b671e", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.5.16/reentrancy-benign.sol#L41-L45", + "id": "b4ca5fb9ad17bbab425a11b56f4fb0466db3680404ffb27f185072af6033dae3", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json index b5ab98c59..58df7138f 100644 --- a/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol.0.6.11.ReentrancyBenign.json @@ -4,23 +4,26 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 335, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -113,46 +116,49 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 368, - "length": 37, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 31 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 335, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -245,7 +251,7 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } }, @@ -255,41 +261,44 @@ }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 368, - "length": 37, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 17 + 33 ], - "starting_column": 9, - "ending_column": 46 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 335, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -382,51 +391,54 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "counter += 1", + "name": "(success) = target.call()", "source_mapping": { - "start": 471, - "length": 12, + "start": 684, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 21 + 31 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 335, - "length": 155, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -519,87 +531,44 @@ "ending_column": 0 } }, - "signature": "bad0()" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#21)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L21)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22", - "id": "a7b654e48f473524c116a9596c90ad440fb301bfdf4906256200347e7d5b052f", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad1", + "type": "node", + "name": "address(target).call.value(1000)()", "source_mapping": { - "start": 496, - "length": 135, + "start": 754, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 33 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad2", "source_mapping": { - "start": 28, - "length": 1569, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.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, 32, @@ -609,83 +578,7 @@ 36, 37, 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad1(address)" - } - }, - { - "type": "node", - "name": "(success) = target.call()", - "source_mapping": { - "start": 543, - "length": 33, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 25 - ], - "starting_column": 9, - "ending_column": 42 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 496, - "length": 135, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 24, - 25, - 26, - 27, - 28 + 39 ], "starting_column": 5, "ending_column": 6 @@ -778,49 +671,54 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "counter += 1", "source_mapping": { - "start": 543, - "length": 33, + "start": 804, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 34 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 13, + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 496, - "length": 135, + "start": 637, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -913,49 +811,173 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39", + "id": "3c650a2918e51e0de52806ff655cd61f80b0b71fa3d15c7c5bf82702827ef167", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "counter += 1", + "type": "function", + "name": "bad3", "source_mapping": { - "start": 612, - "length": 12, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 27 + 41, + 42, + 43, + 44, + 45 ], - "starting_column": 9, - "ending_column": 21 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad1", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 496, - "length": 135, + "start": 28, + "length": 1569, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.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 + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad3(address)" + } + }, + { + "type": "node", + "name": "externalCaller(target)", + "source_mapping": { + "start": 933, + "length": 22, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 42 + ], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 886, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1048,183 +1070,47 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#27)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L27)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28", - "id": "8f0d7d7d0fe7ab37eac4842bec23c83b63015f99144343b9d4b2201fda3ec73b", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 637, - "length": 243, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1569, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call()", "source_mapping": { - "start": 684, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 637, - "length": 243, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1317,54 +1203,49 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "externalCaller(target)", "source_mapping": { - "start": 754, - "length": 36, + "start": 933, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 42 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 637, - "length": 243, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1457,54 +1338,47 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call()", "source_mapping": { - "start": 684, - "length": 33, + "start": 1387, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 637, - "length": 243, + "start": 1329, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1597,7 +1471,7 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, @@ -1607,44 +1481,39 @@ }, { "type": "node", - "name": "address(target).call.value(1000)()", + "name": "varChanger()", "source_mapping": { - "start": 754, - "length": 36, + "start": 965, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 43 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 637, - "length": 243, + "start": 886, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -1737,54 +1606,48 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "counter += 1", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 804, - "length": 12, + "start": 1563, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 69 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "varChanger", "source_mapping": { - "start": 637, - "length": 243, + "start": 1523, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -1877,20 +1740,20 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "varChanger()" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "counter" + "variable_name": "anotherVariableToChange" } } ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#31)\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call.value(1000)() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#34)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L31)\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call.value(1000)()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L34)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L30-L39", - "id": "3c650a2918e51e0de52806ff655cd61f80b0b71fa3d15c7c5bf82702827ef167", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45", + "id": "58281d2d0d4b435e02839ff31a2390af2ba44c481c46231470a3259a6a3bedc3", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -1899,21 +1762,21 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 886, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2006,44 +1869,44 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = target.call()", "source_mapping": { - "start": 933, - "length": 22, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 25 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 886, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2136,7 +1999,7 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } } }, @@ -2146,37 +2009,39 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 543, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 25 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1329, - "length": 89, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2269,7 +2134,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, @@ -2279,39 +2144,39 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "counter += 1", "source_mapping": { - "start": 933, - "length": 22, + "start": 612, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 27 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 886, - "length": 125, + "start": 496, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2404,47 +2269,177 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "counter" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L24-L28", + "id": "8f0d7d7d0fe7ab37eac4842bec23c83b63015f99144343b9d4b2201fda3ec73b", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 335, + "length": 155, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1569, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad0()" } }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 1387, - "length": 24, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 17 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad0", "source_mapping": { - "start": 1329, - "length": 89, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2537,49 +2532,51 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "varChanger()", + "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 965, - "length": 12, + "start": 368, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 43 + 17 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 886, - "length": 125, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2672,48 +2669,51 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "counter += 1", "source_mapping": { - "start": 1563, - "length": 25, + "start": 471, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 69 + 21 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "bad0", "source_mapping": { - "start": 1523, - "length": 72, + "start": 335, + "length": 155, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 68, - 69, - 70 + 16, + 17, + 18, + 19, + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -2806,20 +2806,20 @@ "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "bad0()" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "variable_name": "counter" } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L41-L45", - "id": "58281d2d0d4b435e02839ff31a2390af2ba44c481c46231470a3259a6a3bedc3", + "description": "Reentrancy in ReentrancyBenign.bad0() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#16-22):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#17)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#21)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad0()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L17)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L21)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.6.11/reentrancy-benign.sol#L16-L22", + "id": "a7b654e48f473524c116a9596c90ad440fb301bfdf4906256200347e7d5b052f", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json index d91115022..0f1a36a4a 100644 --- a/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json +++ b/tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol.0.7.6.ReentrancyBenign.json @@ -541,21 +541,26 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 489, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -648,14 +653,14 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } }, { "type": "node", "name": "(success) = target.call()", "source_mapping": { - "start": 536, + "start": 677, "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -663,7 +668,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 31 ], "starting_column": 9, "ending_column": 42 @@ -671,21 +676,26 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 489, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -778,7 +788,7 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, @@ -788,39 +798,44 @@ }, { "type": "node", - "name": "(success) = target.call()", + "name": "address(target).call{value: 1000}()", "source_mapping": { - "start": 536, - "length": 33, + "start": 747, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 25 + 33 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 489, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -913,49 +928,54 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "counter += 1", + "name": "(success) = target.call()", "source_mapping": { - "start": 605, - "length": 12, + "start": 677, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 27 + 31 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 489, - "length": 135, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 24, - 25, - 26, - 27, - 28 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39 ], "starting_column": 5, "ending_column": 6 @@ -1048,92 +1068,44 @@ "ending_column": 0 } }, - "signature": "bad1(address)" + "signature": "bad2(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#27)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L27)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28", - "id": "c80120e0907dee95cc562b53958082d0664ee15a3aaa617ac17e27d25ae48d46", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "bad2", + "type": "node", + "name": "address(target).call{value: 1000}()", "source_mapping": { - "start": 630, - "length": 243, + "start": 747, + "length": 36, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 33 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 13, + "ending_column": 49 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "ReentrancyBenign", + "type": "function", + "name": "bad2", "source_mapping": { - "start": 28, - "length": 1562, + "start": 630, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, 32, @@ -1143,88 +1115,7 @@ 36, 37, 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad2(address)" - } - }, - { - "type": "node", - "name": "(success) = target.call()", - "source_mapping": { - "start": 677, - "length": 33, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 31 - ], - "starting_column": 9, - "ending_column": 42 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "bad2", - "source_mapping": { - "start": 630, - "length": 243, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 39 ], "starting_column": 5, "ending_column": 6 @@ -1322,25 +1213,25 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call{value: 1000}()", + "name": "counter += 1", "source_mapping": { - "start": 747, - "length": 36, + "start": 797, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 34 ], "starting_column": 13, - "ending_column": 49 + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -1462,39 +1353,83 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#31)\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#34)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L31)\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L34)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39", + "id": "6717f4516d88a5c7e163ec2f50f29be4b3ea7e2df36e9fbc688489a69fef5d77", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "(success) = target.call()", + "type": "function", + "name": "bad4", "source_mapping": { - "start": 677, - "length": 33, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 31 + 47, + 48, + 49, + 50, + 51, + 52 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad2", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 630, - "length": 243, + "start": 28, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, 32, @@ -1504,7 +1439,84 @@ 36, 37, 38, - 39 + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad4(address)" + } + }, + { + "type": "node", + "name": "externalCaller(target)", + "source_mapping": { + "start": 1057, + "length": 22, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 48 + ], + "starting_column": 9, + "ending_column": 31 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad4", + "source_mapping": { + "start": 1010, + "length": 172, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1597,54 +1609,47 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call{value: 1000}()", + "name": "address(target).call()", "source_mapping": { - "start": 747, - "length": 36, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 33 + 61 ], - "starting_column": 13, - "ending_column": 49 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "externalCaller", "source_mapping": { - "start": 630, - "length": 243, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -1737,7 +1742,7 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "externalCaller(address)" } } }, @@ -1747,44 +1752,40 @@ }, { "type": "node", - "name": "counter += 1", + "name": "ethSender(address(0))", "source_mapping": { - "start": 797, - "length": 12, + "start": 1089, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 34 + 49 ], - "starting_column": 13, - "ending_column": 25 + "starting_column": 9, + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad4", "source_mapping": { - "start": 630, - "length": 243, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -1877,173 +1878,47 @@ "ending_column": 0 } }, - "signature": "bad2(address)" + "signature": "bad4(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "counter" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad2(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#30-39):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#31)\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tExternal calls sending eth:\n\t- address(target).call{value: 1000}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#33)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#34)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad2(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L31)\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tExternal calls sending eth:\n\t- [address(target).call{value: 1000}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L33)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L34)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L30-L39", - "id": "6717f4516d88a5c7e163ec2f50f29be4b3ea7e2df36e9fbc688489a69fef5d77", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad3", - "source_mapping": { - "start": 879, - "length": 125, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 41, - 42, - 43, - 44, - 45 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1562, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad3(address)" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 926, - "length": 22, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 65 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "ethSender", "source_mapping": { - "start": 879, - "length": 125, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -2136,47 +2011,50 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "ethSender(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call()", + "name": "externalCaller(target)", "source_mapping": { - "start": 1380, - "length": 24, + "start": 1057, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 48 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad4", "source_mapping": { - "start": 1322, - "length": 89, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2269,7 +2147,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad4(address)" } } }, @@ -2279,39 +2157,37 @@ }, { "type": "node", - "name": "externalCaller(target)", + "name": "address(target).call()", "source_mapping": { - "start": 926, - "length": 22, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 42 + 61 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "externalCaller", "source_mapping": { - "start": 879, - "length": 125, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -2404,7 +2280,7 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "externalCaller(address)" } } }, @@ -2414,37 +2290,40 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "ethSender(address(0))", "source_mapping": { - "start": 1380, - "length": 24, + "start": 1089, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 49 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad4", "source_mapping": { - "start": 1322, - "length": 89, + "start": 1010, + "length": 172, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 47, + 48, + 49, + 50, + 51, + 52 ], "starting_column": 5, "ending_column": 6 @@ -2537,7 +2416,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad4(address)" } } }, @@ -2547,41 +2426,39 @@ }, { "type": "node", - "name": "varChanger()", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 958, - "length": 12, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 43 + 65 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "ethSender", "source_mapping": { - "start": 879, - "length": 125, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 41, - 42, - 43, - 44, - 45 - ], - "starting_column": 5, + 64, + 65, + 66 + ], + "starting_column": 5, "ending_column": 6 }, "type_specific_fields": { @@ -2672,7 +2549,143 @@ "ending_column": 0 } }, - "signature": "bad3(address)" + "signature": "ethSender(address)" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" + } + }, + { + "type": "node", + "name": "varChanger()", + "source_mapping": { + "start": 1120, + "length": 12, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 50 + ], + "starting_column": 9, + "ending_column": 21 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad4", + "source_mapping": { + "start": 1010, + "length": 172, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 47, + 48, + 49, + 50, + 51, + 52 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1562, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad4(address)" } } }, @@ -2816,10 +2829,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45", - "id": "daed2df217460e31f6b03c385a5256ad0e29f973a06779d9b95c059c3c9c5c48", + "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52", + "id": "a761807476d935cb91dbefd6f8fd28baaf9b805bf4df2fb9066c4c442d768980", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" @@ -2828,22 +2841,21 @@ "elements": [ { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1010, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -2936,45 +2948,44 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "(success) = target.call()", "source_mapping": { - "start": 1057, - "length": 22, + "start": 536, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 48 + 25 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1010, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -3067,7 +3078,7 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, @@ -3077,37 +3088,39 @@ }, { "type": "node", - "name": "address(target).call()", + "name": "(success) = target.call()", "source_mapping": { - "start": 1380, - "length": 24, + "start": 536, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 25 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "bad1", "source_mapping": { - "start": 1322, - "length": 89, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -3200,7 +3213,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "bad1(address)" } } }, @@ -3210,40 +3223,39 @@ }, { "type": "node", - "name": "ethSender(address(0))", + "name": "counter += 1", "source_mapping": { - "start": 1089, - "length": 21, + "start": 605, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 49 + 27 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad1", "source_mapping": { - "start": 1010, - "length": 172, + "start": 489, + "length": 135, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, "ending_column": 6 @@ -3336,183 +3348,173 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "counter" } - }, + } + ], + "description": "Reentrancy in ReentrancyBenign.bad1(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#24-28):\n\tExternal calls:\n\t- (success) = target.call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#25)\n\tState variables written after the call(s):\n\t- counter += 1 (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#27)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad1(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28):\n\tExternal calls:\n\t- [(success) = target.call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L25)\n\tState variables written after the call(s):\n\t- [counter += 1](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L27)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L24-L28", + "id": "c80120e0907dee95cc562b53958082d0664ee15a3aaa617ac17e27d25ae48d46", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "address(target).call{value: 1}()", + "type": "function", + "name": "bad5", "source_mapping": { - "start": 1470, - "length": 33, + "start": 1188, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 54, + 55, + 56, + 57, + 58 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "ethSender", + "type": "contract", + "name": "ReentrancyBenign", "source_mapping": { - "start": 1417, - "length": 93, + "start": 28, + "length": 1562, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, 64, 65, - 66 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1562, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "ethSender(address)" + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "bad5(address)" } }, { "type": "node", - "name": "externalCaller(target)", + "name": "ethSender(address(0))", "source_mapping": { - "start": 1057, - "length": 22, + "start": 1235, + "length": 21, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 48 + 55 ], "starting_column": 9, - "ending_column": 31 + "ending_column": 30 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1010, - "length": 172, + "start": 1188, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3605,47 +3607,47 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "address(target).call()", + "name": "address(target).call{value: 1}()", "source_mapping": { - "start": 1380, - "length": 24, + "start": 1470, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 61 + 65 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "externalCaller", + "name": "ethSender", "source_mapping": { - "start": 1322, - "length": 89, + "start": 1417, + "length": 93, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 60, - 61, - 62 + 64, + 65, + 66 ], "starting_column": 5, "ending_column": 6 @@ -3738,7 +3740,7 @@ "ending_column": 0 } }, - "signature": "externalCaller(address)" + "signature": "ethSender(address)" } } }, @@ -3748,40 +3750,39 @@ }, { "type": "node", - "name": "ethSender(address(0))", + "name": "varChanger()", "source_mapping": { - "start": 1089, - "length": 21, + "start": 1266, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 49 + 56 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 21 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad5", "source_mapping": { - "start": 1010, - "length": 172, + "start": 1188, + "length": 128, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 54, + 55, + 56, + 57, + 58 ], "starting_column": 5, "ending_column": 6 @@ -3874,47 +3875,48 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad5(address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" } }, { "type": "node", - "name": "address(target).call{value: 1}()", + "name": "anotherVariableToChange ++", "source_mapping": { - "start": 1470, - "length": 33, + "start": 1556, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 69 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "varChanger", "source_mapping": { - "start": 1417, - "length": 93, + "start": 1516, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66 + 68, + 69, + 70 ], "starting_column": 5, "ending_column": 6 @@ -4007,50 +4009,173 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "varChanger()" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "anotherVariableToChange" + } + } + ], + "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#55)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L55)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58", + "id": "d1495003f18e1d1814ff11bb252ae6d8a0d3a42338e6def154390acf5d1a4d55", + "check": "reentrancy-benign", + "impact": "Low", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "bad3", + "source_mapping": { + "start": 879, + "length": 125, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "is_dependency": false, + "lines": [ + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ReentrancyBenign", + "source_mapping": { + "start": 28, + "length": 1562, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71, + 72 + ], + "starting_column": 1, + "ending_column": 0 + } + }, + "signature": "bad3(address)" } }, { "type": "node", - "name": "varChanger()", + "name": "externalCaller(target)", "source_mapping": { - "start": 1120, - "length": 12, + "start": 926, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 50 + 42 ], "starting_column": 9, - "ending_column": 21 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad4", + "name": "bad3", "source_mapping": { - "start": 1010, - "length": 172, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 47, - 48, - 49, - 50, - 51, - 52 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4143,48 +4268,47 @@ "ending_column": 0 } }, - "signature": "bad4(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "anotherVariableToChange ++", + "name": "address(target).call()", "source_mapping": { - "start": 1556, - "length": 25, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 69 + 61 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "varChanger", + "name": "externalCaller", "source_mapping": { - "start": 1516, - "length": 72, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 68, - 69, - 70 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4277,173 +4401,49 @@ "ending_column": 0 } }, - "signature": "varChanger()" + "signature": "externalCaller(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "anotherVariableToChange" - } - } - ], - "description": "Reentrancy in ReentrancyBenign.bad4(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#47-52):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#48)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tExternal calls sending eth:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#49)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#50)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad4(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L48)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tExternal calls sending eth:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L49)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L50)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L47-L52", - "id": "a761807476d935cb91dbefd6f8fd28baaf9b805bf4df2fb9066c4c442d768980", - "check": "reentrancy-benign", - "impact": "Low", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad5", - "source_mapping": { - "start": 1188, - "length": 128, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "is_dependency": false, - "lines": [ - 54, - 55, - 56, - 57, - 58 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyBenign", - "source_mapping": { - "start": 28, - "length": 1562, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72 - ], - "starting_column": 1, - "ending_column": 0 - } - }, - "signature": "bad5(address)" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "ethSender(address(0))", + "name": "externalCaller(target)", "source_mapping": { - "start": 1235, - "length": 21, + "start": 926, + "length": 22, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 55 + 42 ], "starting_column": 9, - "ending_column": 30 + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1188, - "length": 128, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4536,47 +4536,47 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "address(target).call{value: 1}()", + "name": "address(target).call()", "source_mapping": { - "start": 1470, - "length": 33, + "start": 1380, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 65 + 61 ], "starting_column": 9, - "ending_column": 42 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "ethSender", + "name": "externalCaller", "source_mapping": { - "start": 1417, - "length": 93, + "start": 1322, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 64, - 65, - 66 + 60, + 61, + 62 ], "starting_column": 5, "ending_column": 6 @@ -4669,7 +4669,7 @@ "ending_column": 0 } }, - "signature": "ethSender(address)" + "signature": "externalCaller(address)" } } }, @@ -4681,7 +4681,7 @@ "type": "node", "name": "varChanger()", "source_mapping": { - "start": 1266, + "start": 958, "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", @@ -4689,7 +4689,7 @@ "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 56 + 43 ], "starting_column": 9, "ending_column": 21 @@ -4697,21 +4697,21 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad5", + "name": "bad3", "source_mapping": { - "start": 1188, - "length": 128, + "start": 879, + "length": 125, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol", "is_dependency": false, "lines": [ - 54, - 55, - 56, - 57, - 58 + 41, + 42, + 43, + 44, + 45 ], "starting_column": 5, "ending_column": 6 @@ -4804,7 +4804,7 @@ "ending_column": 0 } }, - "signature": "bad5(address)" + "signature": "bad3(address)" } } }, @@ -4948,10 +4948,10 @@ } } ], - "description": "Reentrancy in ReentrancyBenign.bad5(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#54-58):\n\tExternal calls:\n\t- ethSender(address(0)) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#55)\n\t\t- address(target).call{value: 1}() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#65)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#56)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", - "markdown": "Reentrancy in [ReentrancyBenign.bad5(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58):\n\tExternal calls:\n\t- [ethSender(address(0))](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L55)\n\t\t- [address(target).call{value: 1}()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L65)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L56)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", - "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L54-L58", - "id": "d1495003f18e1d1814ff11bb252ae6d8a0d3a42338e6def154390acf5d1a4d55", + "description": "Reentrancy in ReentrancyBenign.bad3(address) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#41-45):\n\tExternal calls:\n\t- externalCaller(target) (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#42)\n\t\t- address(target).call() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#61)\n\tState variables written after the call(s):\n\t- varChanger() (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#43)\n\t\t- anotherVariableToChange ++ (tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#69)\n", + "markdown": "Reentrancy in [ReentrancyBenign.bad3(address)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45):\n\tExternal calls:\n\t- [externalCaller(target)](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L42)\n\t\t- [address(target).call()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L61)\n\tState variables written after the call(s):\n\t- [varChanger()](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L43)\n\t\t- [anotherVariableToChange ++](tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L69)\n", + "first_markdown_element": "tests/detectors/reentrancy-benign/0.7.6/reentrancy-benign.sol#L41-L45", + "id": "daed2df217460e31f6b03c385a5256ad0e29f973a06779d9b95c059c3c9c5c48", "check": "reentrancy-benign", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json index 0e531c382..4505f3fc8 100644 --- a/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.4.25/DAO.sol.0.4.25.ReentrancyEth.json @@ -4,101 +4,31 @@ "elements": [ { "type": "function", - "name": "executeProposal", + "name": "refund", "source_mapping": { - "start": 32955, - "length": 2978, + "start": 11531, + "length": 635, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 ], "starting_column": 5, "ending_column": 6 @@ -106,3874 +36,1451 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "DAO", + "name": "TokenCreation", "source_mapping": { - "start": 28296, - "length": 17108, + "start": 10437, + "length": 2342, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - }, - { - "type": "node", - "name": "! isRecipientAllowed(p.recipient)", - "source_mapping": { - "start": 33981, - "length": 32, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 881 - ], - "starting_column": 13, - "ending_column": 45 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())", - "source_mapping": { - "start": 43091, - "length": 289, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 1159, - 1160, - 1161, - 1162, - 1163 - ], - "starting_column": 13, - "ending_column": 71 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "isRecipientAllowed", - "source_mapping": { - "start": 42994, - "length": 457, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "isRecipientAllowed(address)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" - } - }, - { - "type": "node", - "name": "! p.recipient.call.value(p.amount)(_transactionData)", - "source_mapping": { - "start": 35109, - "length": 51, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 915 - ], - "starting_column": 17, - "ending_column": 68 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls" - } - }, - { - "type": "node", - "name": "! p.creator.send(p.proposalDeposit)", - "source_mapping": { - "start": 34718, - "length": 34, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 904 - ], - "starting_column": 17, - "ending_column": 51 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" - } - }, - { - "type": "node", - "name": "! p.recipient.call.value(p.amount)(_transactionData)", - "source_mapping": { - "start": 35109, - "length": 51, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 915 - ], - "starting_column": 17, - "ending_column": 68 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + }, + { + "type": "node", + "name": "extraBalance.balance >= extraBalance.accumulatedInput()", + "source_mapping": { + "start": 11704, + "length": 55, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 321 + ], + "starting_column": 17, + "ending_column": 72 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "extraBalance.payOut(address(this),extraBalance.accumulatedInput())", + "source_mapping": { + "start": 11777, + "length": 67, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 322 + ], + "starting_column": 17, + "ending_column": 84 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "source_mapping": { + "start": 11893, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 325 + ], + "starting_column": 17, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls" + } + }, + { + "type": "node", + "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "source_mapping": { + "start": 11893, + "length": 45, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 325 + ], + "starting_column": 17, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "executeProposal(uint256,bytes)" + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "external_calls_sending_eth" + } + }, + { + "type": "node", + "name": "weiGiven[msg.sender] = 0", + "source_mapping": { + "start": 12111, + "length": 24, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 329 + ], + "starting_column": 17, + "ending_column": 41 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "refund", + "source_mapping": { + "start": 11531, + "length": 635, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "TokenCreation", + "source_mapping": { + "start": 10437, + "length": 2342, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "refund()" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "weiGiven" + } + } + ], + "description": "Reentrancy in TokenCreation.refund() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#318-332):\n\tExternal calls:\n\t- extraBalance.balance >= extraBalance.accumulatedInput() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#321)\n\t- extraBalance.payOut(address(this),extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#322)\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tExternal calls sending eth:\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tState variables written after the call(s):\n\t- weiGiven[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#329)\n", + "markdown": "Reentrancy in [TokenCreation.refund()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332):\n\tExternal calls:\n\t- [extraBalance.balance >= extraBalance.accumulatedInput()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L321)\n\t- [extraBalance.payOut(address(this),extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L322)\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tExternal calls sending eth:\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tState variables written after the call(s):\n\t- [weiGiven[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L329)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332", + "id": "c464e3c8a788029668f77cdff5d7e6a2af53a5ec0f79e21392a5910bfb9dcbe5", + "check": "reentrancy-eth", + "impact": "High", + "confidence": "Medium" + }, + { + "elements": [ + { + "type": "function", + "name": "executeProposal", + "source_mapping": { + "start": 32955, + "length": 2978, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "external_calls_sending_eth" + }, + "signature": "executeProposal(uint256,bytes)" } }, { "type": "node", - "name": "p.proposalPassed = true", + "name": "! isRecipientAllowed(p.recipient)", "source_mapping": { - "start": 35198, - "length": 23, + "start": 33981, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 918 + 881 ], "starting_column": 13, - "ending_column": 36 + "ending_column": 45 }, "type_specific_fields": { "parent": { @@ -4630,125 +2137,53 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "closeProposal(_proposalID)", + "name": "allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())", "source_mapping": { - "start": 35817, - "length": 26, + "start": 43091, + "length": 289, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 933 - ], - "starting_column": 9, - "ending_column": 35 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "executeProposal", - "source_mapping": { - "start": 32955, - "length": 2978, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937 + 1159, + 1160, + 1161, + 1162, + 1163 + ], + "starting_column": 13, + "ending_column": 71 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "isRecipientAllowed", + "source_mapping": { + "start": 42994, + "length": 457, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167 ], "starting_column": 5, "ending_column": 6 @@ -5301,51 +2736,129 @@ "ending_column": 2 } }, - "signature": "executeProposal(uint256,bytes)" + "signature": "isRecipientAllowed(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "p.open = false", + "name": "! p.recipient.call.value(p.amount)(_transactionData)", "source_mapping": { - "start": 36121, - "length": 14, + "start": 35109, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 944 + 915 ], - "starting_column": 9, - "ending_column": 23 + "starting_column": 17, + "ending_column": 68 }, "type_specific_fields": { "parent": { "type": "function", - "name": "closeProposal", + "name": "executeProposal", "source_mapping": { - "start": 35940, - "length": 202, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 940, - 941, - 942, - 943, - 944, - 945 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -5898,31 +3411,30 @@ "ending_column": 2 } }, - "signature": "closeProposal(uint256)" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "rewardToken[address(this)] += p.amount", + "name": "! p.creator.send(p.proposalDeposit)", "source_mapping": { - "start": 35698, - "length": 38, + "start": 34718, + "length": 34, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 928 + 904 ], "starting_column": 17, - "ending_column": 55 + "ending_column": 51 }, "type_specific_fields": { "parent": { @@ -6579,26 +4091,25 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "rewardToken" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "closeProposal(_proposalID)", + "name": "! p.recipient.call.value(p.amount)(_transactionData)", "source_mapping": { - "start": 35817, - "length": 26, + "start": 35109, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 933 + 915 ], - "starting_column": 9, - "ending_column": 35 + "starting_column": 17, + "ending_column": 68 }, "type_specific_fields": { "parent": { @@ -7255,46 +4766,124 @@ } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "sumOfProposalDeposits" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "sumOfProposalDeposits -= p.proposalDeposit", + "name": "p.proposalPassed = true", "source_mapping": { - "start": 36069, - "length": 42, + "start": 35198, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 943 + 918 ], "starting_column": 13, - "ending_column": 55 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "closeProposal", + "name": "executeProposal", "source_mapping": { - "start": 35940, - "length": 202, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 940, - 941, - 942, - 943, - 944, - 945 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -7847,31 +5436,31 @@ "ending_column": 2 } }, - "signature": "closeProposal(uint256)" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "sumOfProposalDeposits" + "variable_name": "proposals" } }, { "type": "node", - "name": "totalRewardToken += p.amount", + "name": "closeProposal(_proposalID)", "source_mapping": { - "start": 35754, - "length": 28, + "start": 35817, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 929 + 933 ], - "starting_column": 17, - "ending_column": 45 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { @@ -8441,267 +6030,133 @@ 1144, 1145, 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "executeProposal(uint256,bytes)" - } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "totalRewardToken" - } - } - ], - "description": "Reentrancy in DAO.executeProposal(uint256,bytes) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#853-937):\n\tExternal calls:\n\t- ! isRecipientAllowed(p.recipient) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#881)\n\t\t- allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#1159-1163)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tExternal calls sending eth:\n\t- ! p.creator.send(p.proposalDeposit) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#904)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tState variables written after the call(s):\n\t- p.proposalPassed = true (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#918)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- p.open = false (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#944)\n\t- rewardToken[address(this)] += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#928)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- sumOfProposalDeposits -= p.proposalDeposit (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#943)\n\t- totalRewardToken += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#929)\n", - "markdown": "Reentrancy in [DAO.executeProposal(uint256,bytes)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937):\n\tExternal calls:\n\t- [! isRecipientAllowed(p.recipient)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L881)\n\t\t- [allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L1159-L1163)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tExternal calls sending eth:\n\t- [! p.creator.send(p.proposalDeposit)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L904)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tState variables written after the call(s):\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L918)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [p.open = false](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L944)\n\t- [rewardToken[address(this)] += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L928)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [sumOfProposalDeposits -= p.proposalDeposit](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L943)\n\t- [totalRewardToken += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L929)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937", - "id": "da2955efdedec834e2cbc56b913933ba273e4a4da5d9c5c6be9ff59c9249b84c", - "check": "reentrancy-eth", - "impact": "High", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "refund", - "source_mapping": { - "start": 11531, - "length": 635, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TokenCreation", - "source_mapping": { - "start": 10437, - "length": 2342, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 - ], - "starting_column": 1, - "ending_column": 2 + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "executeProposal(uint256,bytes)" } - }, - "signature": "refund()" + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "extraBalance.balance >= extraBalance.accumulatedInput()", + "name": "p.open = false", "source_mapping": { - "start": 11704, - "length": 55, + "start": 36121, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 321 + 944 ], - "starting_column": 17, - "ending_column": 72 + "starting_column": 9, + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "closeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 35940, + "length": 202, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 940, + 941, + 942, + 943, + 944, + 945 ], "starting_column": 5, "ending_column": 6 @@ -8709,136 +6164,675 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "closeProposal(uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "extraBalance.payOut(address(this),extraBalance.accumulatedInput())", + "name": "rewardToken[address(this)] += p.amount", "source_mapping": { - "start": 11777, - "length": 67, + "start": 35698, + "length": 38, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 322 + 928 ], "starting_column": 17, - "ending_column": 84 + "ending_column": 55 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "refund", - "source_mapping": { - "start": 11531, - "length": 635, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + "type": "function", + "name": "executeProposal", + "source_mapping": { + "start": 32955, + "length": 2978, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -8846,136 +6840,675 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "rewardToken" } }, { "type": "node", - "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "name": "closeProposal(_proposalID)", "source_mapping": { - "start": 11893, - "length": 45, + "start": 35817, + "length": 26, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 325 + 933 ], - "starting_column": 17, - "ending_column": 62 + "starting_column": 9, + "ending_column": 35 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "executeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -8983,273 +7516,1272 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "sumOfProposalDeposits" } }, { "type": "node", - "name": "msg.sender.call.value(weiGiven[msg.sender])()", + "name": "sumOfProposalDeposits -= p.proposalDeposit", "source_mapping": { - "start": 11893, - "length": 45, + "start": 36069, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 325 + 943 ], - "starting_column": 17, - "ending_column": 62 + "starting_column": 13, + "ending_column": 55 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "closeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 35940, + "length": 202, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "TokenCreation", - "source_mapping": { - "start": 10437, - "length": 2342, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 940, + 941, + 942, + 943, + 944, + 945 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "closeProposal(uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "sumOfProposalDeposits" } }, { "type": "node", - "name": "weiGiven[msg.sender] = 0", + "name": "totalRewardToken += p.amount", "source_mapping": { - "start": 12111, - "length": 24, + "start": 35754, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 329 + 929 ], "starting_column": 17, - "ending_column": 41 + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "refund", + "name": "executeProposal", "source_mapping": { - "start": 11531, - "length": 635, + "start": 32955, + "length": 2978, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332 + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937 ], "starting_column": 5, "ending_column": 6 @@ -9257,97 +8789,565 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "TokenCreation", + "name": "DAO", "source_mapping": { - "start": 10437, - "length": 2342, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "refund()" + "signature": "executeProposal(uint256,bytes)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "weiGiven" + "variable_name": "totalRewardToken" } } ], - "description": "Reentrancy in TokenCreation.refund() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#318-332):\n\tExternal calls:\n\t- extraBalance.balance >= extraBalance.accumulatedInput() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#321)\n\t- extraBalance.payOut(address(this),extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#322)\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tExternal calls sending eth:\n\t- msg.sender.call.value(weiGiven[msg.sender])() (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#325)\n\tState variables written after the call(s):\n\t- weiGiven[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#329)\n", - "markdown": "Reentrancy in [TokenCreation.refund()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332):\n\tExternal calls:\n\t- [extraBalance.balance >= extraBalance.accumulatedInput()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L321)\n\t- [extraBalance.payOut(address(this),extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L322)\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tExternal calls sending eth:\n\t- [msg.sender.call.value(weiGiven[msg.sender])()](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L325)\n\tState variables written after the call(s):\n\t- [weiGiven[msg.sender] = 0](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L329)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L318-L332", - "id": "c464e3c8a788029668f77cdff5d7e6a2af53a5ec0f79e21392a5910bfb9dcbe5", + "description": "Reentrancy in DAO.executeProposal(uint256,bytes) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#853-937):\n\tExternal calls:\n\t- ! isRecipientAllowed(p.recipient) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#881)\n\t\t- allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput()) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#1159-1163)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tExternal calls sending eth:\n\t- ! p.creator.send(p.proposalDeposit) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#904)\n\t- ! p.recipient.call.value(p.amount)(_transactionData) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#915)\n\tState variables written after the call(s):\n\t- p.proposalPassed = true (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#918)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- p.open = false (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#944)\n\t- rewardToken[address(this)] += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#928)\n\t- closeProposal(_proposalID) (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#933)\n\t\t- sumOfProposalDeposits -= p.proposalDeposit (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#943)\n\t- totalRewardToken += p.amount (tests/detectors/reentrancy-eth/0.4.25/DAO.sol#929)\n", + "markdown": "Reentrancy in [DAO.executeProposal(uint256,bytes)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937):\n\tExternal calls:\n\t- [! isRecipientAllowed(p.recipient)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L881)\n\t\t- [allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput())](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L1159-L1163)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tExternal calls sending eth:\n\t- [! p.creator.send(p.proposalDeposit)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L904)\n\t- [! p.recipient.call.value(p.amount)(_transactionData)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L915)\n\tState variables written after the call(s):\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L918)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [p.open = false](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L944)\n\t- [rewardToken[address(this)] += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L928)\n\t- [closeProposal(_proposalID)](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L933)\n\t\t- [sumOfProposalDeposits -= p.proposalDeposit](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L943)\n\t- [totalRewardToken += p.amount](tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L929)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.4.25/DAO.sol#L853-L937", + "id": "da2955efdedec834e2cbc56b913933ba273e4a4da5d9c5c6be9ff59c9249b84c", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json index 24be1d838..d72d00589 100644 --- a/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol.0.5.16.ReentrancyEth.json @@ -4,25 +4,26 @@ "elements": [ { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -108,48 +109,49 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", + "name": "(ret,mem) = msg.sender.call.value(amount)()", "source_mapping": { - "start": 882, - "length": 81, + "start": 2084, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 28 + 60 ], "starting_column": 9, - "ending_column": 90 + "ending_column": 73 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -235,7 +237,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -245,43 +247,44 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = 0", + "name": "userBalance[msg.sender] = amount", "source_mapping": { - "start": 1026, - "length": 27, + "start": 2183, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 32 + 62 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -367,7 +370,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -377,10 +380,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#32)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L32)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33", - "id": "e2dcb62d8ffcc2636bab0fee518b4a79c760f2974c39950214749fc78bebc9de", + "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#62)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L62)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64", + "id": "b1d5762a3d9738215079d50da4bf0ecdc8eddd575b7f8686bdbfa3d101adf809", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -389,26 +392,25 @@ "elements": [ { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -494,49 +496,48 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call.value(amount)()", + "name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", "source_mapping": { - "start": 2084, - "length": 64, + "start": 882, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 60 + 28 ], "starting_column": 9, - "ending_column": 73 + "ending_column": 90 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -622,7 +623,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -632,44 +633,43 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = amount", + "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 2183, - "length": 32, + "start": 1026, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 62 + 32 ], - "starting_column": 13, - "ending_column": 45 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -755,7 +755,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -765,10 +765,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#62)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(amount)()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L62)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L55-L64", - "id": "b1d5762a3d9738215079d50da4bf0ecdc8eddd575b7f8686bdbfa3d101adf809", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#32)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L32)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.5.16/reentrancy.sol#L25-L33", + "id": "e2dcb62d8ffcc2636bab0fee518b4a79c760f2974c39950214749fc78bebc9de", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json index 41c64d5bd..e1c0769a0 100644 --- a/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json +++ b/tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol.0.7.6.ReentrancyEth.json @@ -4,25 +4,26 @@ "elements": [ { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -108,48 +109,49 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()", + "name": "(ret,mem) = msg.sender.call{value: amount}()", "source_mapping": { - "start": 882, - "length": 81, + "start": 2084, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 28 + 60 ], "starting_column": 9, - "ending_column": 90 + "ending_column": 73 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -235,7 +237,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -245,43 +247,44 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = 0", + "name": "userBalance[msg.sender] = amount", "source_mapping": { - "start": 1026, - "length": 27, + "start": 2183, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 32 + 62 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 45 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance", + "name": "withdrawBalance_fixed_3", "source_mapping": { - "start": 703, - "length": 357, + "start": 1839, + "length": 393, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33 + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64 ], "starting_column": 5, "ending_column": 6 @@ -367,7 +370,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance()" + "signature": "withdrawBalance_fixed_3()" } } }, @@ -377,10 +380,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: userBalance[msg.sender]}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#32)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L32)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33", - "id": "df77aefe86b51d596b1dba22bde98d85390038724420e61fb18579fd90af852c", + "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: amount}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#62)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: amount}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L62)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64", + "id": "d68cc7cd493eca1fda517423f6f6ad0a5671d0bbea1d80ec0cb403ca66d5d4b8", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" @@ -389,26 +392,25 @@ "elements": [ { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -494,49 +496,48 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } }, { "type": "node", - "name": "(ret,mem) = msg.sender.call{value: amount}()", + "name": "(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()", "source_mapping": { - "start": 2084, - "length": 64, + "start": 882, + "length": 81, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 60 + 28 ], "starting_column": 9, - "ending_column": 73 + "ending_column": 90 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -622,7 +623,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -632,44 +633,43 @@ }, { "type": "node", - "name": "userBalance[msg.sender] = amount", + "name": "userBalance[msg.sender] = 0", "source_mapping": { - "start": 2183, - "length": 32, + "start": 1026, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 62 + 32 ], - "starting_column": 13, - "ending_column": 45 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawBalance_fixed_3", + "name": "withdrawBalance", "source_mapping": { - "start": 1839, - "length": 393, + "start": 703, + "length": 357, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol", "is_dependency": false, "lines": [ - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64 + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33 ], "starting_column": 5, "ending_column": 6 @@ -755,7 +755,7 @@ "ending_column": 2 } }, - "signature": "withdrawBalance_fixed_3()" + "signature": "withdrawBalance()" } } }, @@ -765,10 +765,10 @@ } } ], - "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#55-64):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: amount}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#60)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = amount (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#62)\n", - "markdown": "Reentrancy in [Reentrancy.withdrawBalance_fixed_3()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: amount}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L60)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = amount](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L62)\n", - "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L55-L64", - "id": "d68cc7cd493eca1fda517423f6f6ad0a5671d0bbea1d80ec0cb403ca66d5d4b8", + "description": "Reentrancy in Reentrancy.withdrawBalance() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#25-33):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call{value: userBalance[msg.sender]}() (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#28)\n\tState variables written after the call(s):\n\t- userBalance[msg.sender] = 0 (tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#32)\n", + "markdown": "Reentrancy in [Reentrancy.withdrawBalance()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33):\n\tExternal calls:\n\t- [(ret,mem) = msg.sender.call{value: userBalance[msg.sender]}()](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L28)\n\tState variables written after the call(s):\n\t- [userBalance[msg.sender] = 0](tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L32)\n", + "first_markdown_element": "tests/detectors/reentrancy-eth/0.7.6/reentrancy.sol#L25-L33", + "id": "df77aefe86b51d596b1dba22bde98d85390038724420e61fb18579fd90af852c", "check": "reentrancy-eth", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json index b0b061cbf..eb1b1c5de 100644 --- a/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol.0.4.25.ReentrancyReadBeforeWritten.json @@ -4,37 +4,90 @@ "elements": [ { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -587,62 +640,113 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } }, { "type": "node", - "name": "reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]", + "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", "source_mapping": { - "start": 39789, - "length": 145, + "start": 37159, + "length": 49, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1044, - 1045, - 1046 + 974 ], - "starting_column": 9, - "ending_column": 54 + "starting_column": 13, + "ending_column": 62 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -1195,7 +1299,7 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } } }, @@ -1205,55 +1309,38 @@ }, { "type": "node", - "name": "! DAOrewardAccount.payOut(dao.rewardAccount(),reward)", + "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", "source_mapping": { - "start": 39977, - "length": 53, + "start": 44544, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1048 + 1196 ], - "starting_column": 17, - "ending_column": 70 + "starting_column": 9, + "ending_column": 83 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "createNewDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 44427, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 1194, + 1195, + 1196, + 1197 ], "starting_column": 5, "ending_column": 6 @@ -1806,65 +1893,118 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "createNewDAO(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "! DAOrewardAccount.payOut(dao,reward)", + "name": "withdrawRewardFor(msg.sender)", "source_mapping": { - "start": 40100, - "length": 37, + "start": 38796, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1052 + 1015 ], - "starting_column": 17, - "ending_column": 54 + "starting_column": 9, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "splitDAO", "source_mapping": { - "start": 39505, - "length": 735, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -2417,7 +2557,7 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "splitDAO(uint256,address)" } } }, @@ -2427,55 +2567,45 @@ }, { "type": "node", - "name": "DAOpaidOut[msg.sender] += reward", + "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", "source_mapping": { - "start": 40180, - "length": 32, + "start": 40461, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1055 + 1065 ], - "starting_column": 9, - "ending_column": 41 + "starting_column": 13, + "ending_column": 103 }, "type_specific_fields": { "parent": { "type": "function", - "name": "retrieveDAOReward", + "name": "withdrawRewardFor", "source_mapping": { - "start": 39505, - "length": 735, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -3028,499 +3158,45 @@ "ending_column": 2 } }, - "signature": "retrieveDAOReward(bool)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "DAOpaidOut" + "underlying_type": "external_calls_sending_eth" } - } - ], - "description": "Reentrancy in DAO.retrieveDAOReward(bool) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1037-1057):\n\tExternal calls:\n\t- reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1044-1046)\n\t- ! DAOrewardAccount.payOut(dao.rewardAccount(),reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1048)\n\t- ! DAOrewardAccount.payOut(dao,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1052)\n\tState variables written after the call(s):\n\t- DAOpaidOut[msg.sender] += reward (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1055)\n", - "markdown": "Reentrancy in [DAO.retrieveDAOReward(bool)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057):\n\tExternal calls:\n\t- [reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1044-L1046)\n\t- [! DAOrewardAccount.payOut(dao.rewardAccount(),reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1048)\n\t- [! DAOrewardAccount.payOut(dao,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1052)\n\tState variables written after the call(s):\n\t- [DAOpaidOut[msg.sender] += reward](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1055)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057", - "id": "f4fcbe9e693a60538ed19ff7c298fa578309af52604f3265bac4254b82e45d8f", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ + }, { - "type": "function", - "name": "splitDAO", + "type": "node", + "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 40581, + "length": 116, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1068, + 1069 ], - "starting_column": 5, - "ending_column": 6 + "starting_column": 9, + "ending_column": 103 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "DAO", + "type": "function", + "name": "withdrawRewardFor", "source_mapping": { - "start": 28296, - "length": 17108, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, 1064, 1065, 1066, @@ -3531,268 +3207,7 @@ 1071, 1072, 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - }, - { - "type": "node", - "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", - "source_mapping": { - "start": 37159, - "length": 49, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 974 - ], - "starting_column": 13, - "ending_column": 62 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1074 ], "starting_column": 5, "ending_column": 6 @@ -4345,48 +3760,55 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", + "name": "! rewardAccount.payOut(_account,reward)", "source_mapping": { - "start": 44544, - "length": 74, + "start": 40711, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1196 + 1070 ], - "starting_column": 9, - "ending_column": 83 + "starting_column": 13, + "ending_column": 52 }, "type_specific_fields": { "parent": { "type": "function", - "name": "createNewDAO", + "name": "withdrawRewardFor", "source_mapping": { - "start": 44427, - "length": 198, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1194, - 1195, - 1196, - 1197 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -4939,7 +4361,7 @@ "ending_column": 2 } }, - "signature": "createNewDAO(address)" + "signature": "withdrawRewardFor(address)" } } }, @@ -4949,20 +4371,20 @@ }, { "type": "node", - "name": "p.splitData[0].splitBalance = actualBalance()", + "name": "balances[msg.sender] = 0", "source_mapping": { - "start": 37456, - "length": 45, + "start": 38912, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 981 + 1017 ], - "starting_column": 13, - "ending_column": 58 + "starting_column": 9, + "ending_column": 33 }, "type_specific_fields": { "parent": { @@ -5609,25 +5031,25 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "balances" } }, { "type": "node", - "name": "p.splitData[0].rewardToken = rewardToken[address(this)]", + "name": "paidOut[msg.sender] = 0", "source_mapping": { - "start": 37515, - "length": 55, + "start": 38946, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 982 + 1018 ], - "starting_column": 13, - "ending_column": 68 + "starting_column": 9, + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -6274,25 +5696,25 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "paidOut" } }, { "type": "node", - "name": "p.splitData[0].totalSupply = totalSupply", + "name": "totalSupply -= balances[msg.sender]", "source_mapping": { - "start": 37584, - "length": 40, + "start": 38867, + "length": 35, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 983 + 1016 ], - "starting_column": 13, - "ending_column": 53 + "starting_column": 9, + "ending_column": 44 }, "type_specific_fields": { "parent": { @@ -6939,2024 +6361,637 @@ }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "proposals" + "variable_name": "totalSupply" } - }, + } + ], + "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\t- withdrawRewardFor(msg.sender) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1015)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- balances[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1017)\n\t- paidOut[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1018)\n\t- totalSupply -= balances[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1016)\n", + "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\t- [withdrawRewardFor(msg.sender)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1015)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [balances[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1017)\n\t- [paidOut[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1018)\n\t- [totalSupply -= balances[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1016)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", + "id": "4ce8b483e6c9e8e2bbc854d3ff7713e20404b0be5e7cc714329c9a56c52e8d31", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "p.proposalPassed = true", + "type": "function", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 37638, - "length": 23, - "filename_used": "/GENERIC_PATH", + "start": 41743, + "length": 247, + "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 984 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], - "starting_column": 13, - "ending_column": 36 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "splitDAO", + "type": "contract", + "name": "DAO", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "proposals" - } - } - ], - "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\tState variables written after the call(s):\n\t- p.splitData[0].splitBalance = actualBalance() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#981)\n\t- p.splitData[0].rewardToken = rewardToken[address(this)] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#982)\n\t- p.splitData[0].totalSupply = totalSupply (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#983)\n\t- p.proposalPassed = true (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#984)\n", - "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\tState variables written after the call(s):\n\t- [p.splitData[0].splitBalance = actualBalance()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L981)\n\t- [p.splitData[0].rewardToken = rewardToken[address(this)]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L982)\n\t- [p.splitData[0].totalSupply = totalSupply](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L983)\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L984)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", - "id": "ca170302627c298d8230a6d9f9cae19a84c58325d2df49a6ef15a0b17208bf00", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" - } - }, - { - "type": "node", - "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", - "source_mapping": { - "start": 37159, - "length": 49, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 974 - ], - "starting_column": 13, - "ending_column": 62 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "splitDAO", - "source_mapping": { - "start": 36148, - "length": 2849, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "DAO", - "source_mapping": { - "start": 28296, - "length": 17108, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "splitDAO(uint256,address)" + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "external_calls" + }, + "signature": "transferFromWithoutReward(address,address,uint256)" } }, { "type": "node", - "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", + "name": "! withdrawRewardFor(_from)", "source_mapping": { - "start": 44544, - "length": 74, + "start": 41890, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1196 + 1118 ], - "starting_column": 9, - "ending_column": 83 + "starting_column": 13, + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "createNewDAO", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 44427, - "length": 198, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1194, - 1195, - 1196, - 1197 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -9509,118 +7544,55 @@ "ending_column": 2 } }, - "signature": "createNewDAO(address)" + "signature": "transferFromWithoutReward(address,address,uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "withdrawRewardFor(msg.sender)", + "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", "source_mapping": { - "start": 38796, - "length": 29, + "start": 40461, + "length": 90, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1015 + 1065 ], - "starting_column": 9, - "ending_column": 38 + "starting_column": 13, + "ending_column": 103 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "withdrawRewardFor", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 40361, + "length": 473, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074 ], "starting_column": 5, "ending_column": 6 @@ -10173,29 +8145,30 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "withdrawRewardFor(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", + "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", "source_mapping": { - "start": 40461, - "length": 90, + "start": 40581, + "length": 116, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1065 + 1068, + 1069 ], - "starting_column": 13, + "starting_column": 9, "ending_column": 103 }, "type_specific_fields": { @@ -10784,21 +8757,20 @@ }, { "type": "node", - "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", - "source_mapping": { - "start": 40581, - "length": 116, + "name": "! rewardAccount.payOut(_account,reward)", + "source_mapping": { + "start": 40711, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1068, - 1069 + 1070 ], - "starting_column": 9, - "ending_column": 103 + "starting_column": 13, + "ending_column": 52 }, "type_specific_fields": { "parent": { @@ -11386,9 +9358,9 @@ }, { "type": "node", - "name": "! rewardAccount.payOut(_account,reward)", + "name": "transferFrom(_from,_to,_value)", "source_mapping": { - "start": 40711, + "start": 41944, "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", @@ -11396,35 +9368,34 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1070 + 1120 ], - "starting_column": 13, - "ending_column": 52 + "starting_column": 9, + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 40361, - "length": 473, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -11977,118 +9948,315 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "transferFromWithoutReward(address,address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "balances" + } + }, + { + "type": "node", + "name": "balances[_to] += _amount", + "source_mapping": { + "start": 4393, + "length": 24, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 120 + ], + "starting_column": 13, + "ending_column": 37 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transferFrom", + "source_mapping": { + "start": 4127, + "length": 509, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Token", + "source_mapping": { + "start": 3440, + "length": 1550, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "transferFrom(address,address,uint256)" + } + } + }, + "additional_fields": { + "underlying_type": "variables_written", + "variable_name": "balances" + } + }, + { + "type": "node", + "name": "balances[_from] -= _amount", + "source_mapping": { + "start": 4431, + "length": 26, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 121 + ], + "starting_column": 13, + "ending_column": 39 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transferFrom", + "source_mapping": { + "start": 4127, + "length": 509, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "Token", + "source_mapping": { + "start": 3440, + "length": 1550, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 90, + 91, + 92, + 93, + 94, + 95, + 96, + 97, + 98, + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 122, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "transferFrom(address,address,uint256)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "balances" } }, { "type": "node", - "name": "balances[msg.sender] = 0", + "name": "transferFrom(_from,_to,_value)", "source_mapping": { - "start": 38912, - "length": 24, + "start": 41944, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1017 + 1120 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 48 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferFromWithoutReward", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41743, + "length": 247, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121 ], "starting_column": 5, "ending_column": 6 @@ -12641,119 +10809,58 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferFromWithoutReward(address,address,uint256)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "balances" + "variable_name": "paidOut" } }, { "type": "node", - "name": "paidOut[msg.sender] = 0", + "name": "paidOut[_from] -= transferPaidOut", "source_mapping": { - "start": 38946, - "length": 23, + "start": 42279, + "length": 33, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1018 + 1133 ], "starting_column": 9, - "ending_column": 32 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferPaidOut", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41997, + "length": 384, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136 ], "starting_column": 5, "ending_column": 6 @@ -13306,7 +11413,7 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferPaidOut(address,address,uint256)" } } }, @@ -13317,108 +11424,47 @@ }, { "type": "node", - "name": "totalSupply -= balances[msg.sender]", + "name": "paidOut[_to] += transferPaidOut", "source_mapping": { - "start": 38867, - "length": 35, + "start": 42322, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1016 + 1134 ], "starting_column": 9, - "ending_column": 44 + "ending_column": 40 }, "type_specific_fields": { "parent": { "type": "function", - "name": "splitDAO", + "name": "transferPaidOut", "source_mapping": { - "start": 36148, - "length": 2849, + "start": 41997, + "length": 384, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020 + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136 ], "starting_column": 5, "ending_column": 6 @@ -13971,20 +12017,20 @@ "ending_column": 2 } }, - "signature": "splitDAO(uint256,address)" + "signature": "transferPaidOut(address,address,uint256)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "totalSupply" + "variable_name": "paidOut" } } ], - "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\t- withdrawRewardFor(msg.sender) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1015)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- balances[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1017)\n\t- paidOut[msg.sender] = 0 (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1018)\n\t- totalSupply -= balances[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1016)\n", - "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\t- [withdrawRewardFor(msg.sender)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1015)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [balances[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1017)\n\t- [paidOut[msg.sender] = 0](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1018)\n\t- [totalSupply -= balances[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1016)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", - "id": "4ce8b483e6c9e8e2bbc854d3ff7713e20404b0be5e7cc714329c9a56c52e8d31", + "description": "Reentrancy in DAO.transferFromWithoutReward(address,address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1112-1121):\n\tExternal calls:\n\t- ! withdrawRewardFor(_from) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1118)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#120)\n\t\t- balances[_from] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#121)\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", + "markdown": "Reentrancy in [DAO.transferFromWithoutReward(address,address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121):\n\tExternal calls:\n\t- [! withdrawRewardFor(_from)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1118)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L120)\n\t\t- [balances[_from] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L121)\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121", + "id": "b888f2335a7b1a29c1f4940886bfbe26a6277d2dca59310ede3dfdb6f02adeb0", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -13993,26 +12039,21 @@ "elements": [ { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -14565,49 +12606,44 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } }, { "type": "node", - "name": "! withdrawRewardFor(_from)", + "name": "! getMyReward()", "source_mapping": { - "start": 41890, - "length": 25, + "start": 41288, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1118 + 1092 ], "starting_column": 13, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -15160,7 +13196,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -16974,44 +15010,39 @@ }, { "type": "node", - "name": "transferFrom(_from,_to,_value)", + "name": "transfer(_to,_value)", "source_mapping": { - "start": 41944, - "length": 39, + "start": 41331, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1120 + 1094 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -17564,7 +15595,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -17575,53 +15606,44 @@ }, { "type": "node", - "name": "balances[_to] += _amount", + "name": "balances[msg.sender] -= _amount", "source_mapping": { - "start": 4393, - "length": 24, + "start": 3920, + "length": 31, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 120 - ], - "starting_column": 13, - "ending_column": 37 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "transferFrom", - "source_mapping": { - "start": 4127, - "length": 509, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128 + 101 + ], + "starting_column": 13, + "ending_column": 44 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "transfer", + "source_mapping": { + "start": 3765, + "length": 356, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108 ], "starting_column": 5, "ending_column": 6 @@ -17694,7 +15716,7 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "transfer(address,uint256)" } } }, @@ -17705,53 +15727,44 @@ }, { "type": "node", - "name": "balances[_from] -= _amount", + "name": "balances[_to] += _amount", "source_mapping": { - "start": 4431, - "length": 26, + "start": 3965, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 121 + 102 ], "starting_column": 13, - "ending_column": 39 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFrom", + "name": "transfer", "source_mapping": { - "start": 4127, - "length": 509, + "start": 3765, + "length": 356, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128 + 99, + 100, + 101, + 102, + 103, + 104, + 105, + 106, + 107, + 108 ], "starting_column": 5, "ending_column": 6 @@ -17824,7 +15837,7 @@ "ending_column": 2 } }, - "signature": "transferFrom(address,address,uint256)" + "signature": "transfer(address,uint256)" } } }, @@ -17835,44 +15848,39 @@ }, { "type": "node", - "name": "transferFrom(_from,_to,_value)", + "name": "transfer(_to,_value)", "source_mapping": { - "start": 41944, - "length": 39, + "start": 41331, + "length": 28, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1120 + 1094 ], "starting_column": 9, - "ending_column": 48 + "ending_column": 37 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferFromWithoutReward", + "name": "transferWithoutReward", "source_mapping": { - "start": 41743, - "length": 247, + "start": 41191, + "length": 175, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121 + 1091, + 1092, + 1093, + 1094, + 1095 ], "starting_column": 5, "ending_column": 6 @@ -18425,7 +16433,7 @@ "ending_column": 2 } }, - "signature": "transferFromWithoutReward(address,address,uint256)" + "signature": "transferWithoutReward(address,uint256)" } } }, @@ -19643,10 +17651,10 @@ } } ], - "description": "Reentrancy in DAO.transferFromWithoutReward(address,address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1112-1121):\n\tExternal calls:\n\t- ! withdrawRewardFor(_from) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1118)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#120)\n\t\t- balances[_from] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#121)\n\t- transferFrom(_from,_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1120)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", - "markdown": "Reentrancy in [DAO.transferFromWithoutReward(address,address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121):\n\tExternal calls:\n\t- [! withdrawRewardFor(_from)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1118)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L120)\n\t\t- [balances[_from] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L121)\n\t- [transferFrom(_from,_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1120)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1112-L1121", - "id": "b888f2335a7b1a29c1f4940886bfbe26a6277d2dca59310ede3dfdb6f02adeb0", + "description": "Reentrancy in DAO.transferWithoutReward(address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1091-1095):\n\tExternal calls:\n\t- ! getMyReward() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1092)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- balances[msg.sender] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#101)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#102)\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", + "markdown": "Reentrancy in [DAO.transferWithoutReward(address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095):\n\tExternal calls:\n\t- [! getMyReward()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1092)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [balances[msg.sender] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L101)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L102)\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095", + "id": "bb78c66126a39c10a22c2be95caccd1bc16b010bc959bdeb23bdc1d728654eea", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" @@ -19655,21 +17663,90 @@ "elements": [ { "type": "function", - "name": "transferWithoutReward", + "name": "splitDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -20218,48 +18295,711 @@ 1222, 1223 ], - "starting_column": 1, - "ending_column": 2 + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "splitDAO(uint256,address)" + } + }, + { + "type": "node", + "name": "p.splitData[0].newDAO = createNewDAO(_newCurator)", + "source_mapping": { + "start": 37159, + "length": 49, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 974 + ], + "starting_column": 13, + "ending_column": 62 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "splitDAO", + "source_mapping": { + "start": 36148, + "length": 2849, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "DAO", + "source_mapping": { + "start": 28296, + "length": 17108, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", + "is_dependency": false, + "lines": [ + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "splitDAO(uint256,address)" } - }, - "signature": "transferWithoutReward(address,uint256)" + } + }, + "additional_fields": { + "underlying_type": "external_calls" } }, { "type": "node", - "name": "! getMyReward()", + "name": "daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)", "source_mapping": { - "start": 41288, - "length": 14, + "start": 44544, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1092 + 1196 ], - "starting_column": 13, - "ending_column": 27 + "starting_column": 9, + "ending_column": 83 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "createNewDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 44427, + "length": 198, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 1194, + 1195, + 1196, + 1197 ], "starting_column": 5, "ending_column": 6 @@ -20812,55 +19552,118 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "createNewDAO(address)" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { "type": "node", - "name": "(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]", + "name": "p.splitData[0].splitBalance = actualBalance()", "source_mapping": { - "start": 40461, - "length": 90, + "start": 37456, + "length": 45, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1065 + 981 ], "starting_column": 13, - "ending_column": 103 + "ending_column": 58 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -21413,56 +20216,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]", + "name": "p.splitData[0].rewardToken = rewardToken[address(this)]", "source_mapping": { - "start": 40581, - "length": 116, + "start": 37515, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1068, - 1069 - ], - "starting_column": 9, - "ending_column": 103 + 982 + ], + "starting_column": 13, + "ending_column": 68 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -22015,55 +20881,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "! rewardAccount.payOut(_account,reward)", + "name": "p.splitData[0].totalSupply = totalSupply", "source_mapping": { - "start": 40711, - "length": 39, + "start": 37584, + "length": 40, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1070 + 983 ], "starting_column": 13, - "ending_column": 52 + "ending_column": 53 }, "type_specific_fields": { "parent": { "type": "function", - "name": "withdrawRewardFor", + "name": "splitDAO", "source_mapping": { - "start": 40361, - "length": 473, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -22616,49 +21546,119 @@ "ending_column": 2 } }, - "signature": "withdrawRewardFor(address)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "proposals" } }, { "type": "node", - "name": "transfer(_to,_value)", + "name": "p.proposalPassed = true", "source_mapping": { - "start": 41331, - "length": 28, + "start": 37638, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1094 + 984 ], - "starting_column": 9, - "ending_column": 37 + "starting_column": 13, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "splitDAO", "source_mapping": { - "start": 41191, - "length": 175, + "start": 36148, + "length": 2849, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020 ], "starting_column": 5, "ending_column": 6 @@ -23211,176 +22211,667 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "splitDAO(uint256,address)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "balances" + "variable_name": "proposals" } - }, + } + ], + "description": "Reentrancy in DAO.splitDAO(uint256,address) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#947-1020):\n\tExternal calls:\n\t- p.splitData[0].newDAO = createNewDAO(_newCurator) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#974)\n\t\t- daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1196)\n\tState variables written after the call(s):\n\t- p.splitData[0].splitBalance = actualBalance() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#981)\n\t- p.splitData[0].rewardToken = rewardToken[address(this)] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#982)\n\t- p.splitData[0].totalSupply = totalSupply (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#983)\n\t- p.proposalPassed = true (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#984)\n", + "markdown": "Reentrancy in [DAO.splitDAO(uint256,address)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020):\n\tExternal calls:\n\t- [p.splitData[0].newDAO = createNewDAO(_newCurator)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L974)\n\t\t- [daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1196)\n\tState variables written after the call(s):\n\t- [p.splitData[0].splitBalance = actualBalance()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L981)\n\t- [p.splitData[0].rewardToken = rewardToken[address(this)]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L982)\n\t- [p.splitData[0].totalSupply = totalSupply](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L983)\n\t- [p.proposalPassed = true](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L984)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L947-L1020", + "id": "ca170302627c298d8230a6d9f9cae19a84c58325d2df49a6ef15a0b17208bf00", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "balances[msg.sender] -= _amount", + "type": "function", + "name": "retrieveDAOReward", "source_mapping": { - "start": 3920, - "length": 31, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 101 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], - "starting_column": 13, - "ending_column": 44 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "transfer", + "type": "contract", + "name": "DAO", "source_mapping": { - "start": 3765, - "length": 356, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Token", - "source_mapping": { - "start": 3440, - "length": 1550, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", - "is_dependency": false, - "lines": [ - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "transfer(address,uint256)" + "starting_column": 1, + "ending_column": 2 } - } - }, - "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "balances" + }, + "signature": "retrieveDAOReward(bool)" } }, { "type": "node", - "name": "balances[_to] += _amount", + "name": "reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]", "source_mapping": { - "start": 3965, - "length": 24, + "start": 39789, + "length": 145, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 102 + 1044, + 1045, + 1046 ], - "starting_column": 13, - "ending_column": 37 + "starting_column": 9, + "ending_column": 54 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transfer", + "name": "retrieveDAOReward", "source_mapping": { - "start": 3765, - "length": 356, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -23388,115 +22879,610 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Token", + "name": "DAO", "source_mapping": { - "start": 3440, - "length": 1550, + "start": 28296, + "length": 17108, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139 + 694, + 695, + 696, + 697, + 698, + 699, + 700, + 701, + 702, + 703, + 704, + 705, + 706, + 707, + 708, + 709, + 710, + 711, + 712, + 713, + 714, + 715, + 716, + 717, + 718, + 719, + 720, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 728, + 729, + 730, + 731, + 732, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 742, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 754, + 755, + 756, + 757, + 758, + 759, + 760, + 761, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 774, + 775, + 776, + 777, + 778, + 779, + 780, + 781, + 782, + 783, + 784, + 785, + 786, + 787, + 788, + 789, + 790, + 791, + 792, + 793, + 794, + 795, + 796, + 797, + 798, + 799, + 800, + 801, + 802, + 803, + 804, + 805, + 806, + 807, + 808, + 809, + 810, + 811, + 812, + 813, + 814, + 815, + 816, + 817, + 818, + 819, + 820, + 821, + 822, + 823, + 824, + 825, + 826, + 827, + 828, + 829, + 830, + 831, + 832, + 833, + 834, + 835, + 836, + 837, + 838, + 839, + 840, + 841, + 842, + 843, + 844, + 845, + 846, + 847, + 848, + 849, + 850, + 851, + 852, + 853, + 854, + 855, + 856, + 857, + 858, + 859, + 860, + 861, + 862, + 863, + 864, + 865, + 866, + 867, + 868, + 869, + 870, + 871, + 872, + 873, + 874, + 875, + 876, + 877, + 878, + 879, + 880, + 881, + 882, + 883, + 884, + 885, + 886, + 887, + 888, + 889, + 890, + 891, + 892, + 893, + 894, + 895, + 896, + 897, + 898, + 899, + 900, + 901, + 902, + 903, + 904, + 905, + 906, + 907, + 908, + 909, + 910, + 911, + 912, + 913, + 914, + 915, + 916, + 917, + 918, + 919, + 920, + 921, + 922, + 923, + 924, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 935, + 936, + 937, + 938, + 939, + 940, + 941, + 942, + 943, + 944, + 945, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 954, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 966, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 974, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 982, + 983, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1008, + 1009, + 1010, + 1011, + 1012, + 1013, + 1014, + 1015, + 1016, + 1017, + 1018, + 1019, + 1020, + 1021, + 1022, + 1023, + 1024, + 1025, + 1026, + 1027, + 1028, + 1029, + 1030, + 1031, + 1032, + 1033, + 1034, + 1035, + 1036, + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057, + 1058, + 1059, + 1060, + 1061, + 1062, + 1063, + 1064, + 1065, + 1066, + 1067, + 1068, + 1069, + 1070, + 1071, + 1072, + 1073, + 1074, + 1075, + 1076, + 1077, + 1078, + 1079, + 1080, + 1081, + 1082, + 1083, + 1084, + 1085, + 1086, + 1087, + 1088, + 1089, + 1090, + 1091, + 1092, + 1093, + 1094, + 1095, + 1096, + 1097, + 1098, + 1099, + 1100, + 1101, + 1102, + 1103, + 1104, + 1105, + 1106, + 1107, + 1108, + 1109, + 1110, + 1111, + 1112, + 1113, + 1114, + 1115, + 1116, + 1117, + 1118, + 1119, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1155, + 1156, + 1157, + 1158, + 1159, + 1160, + 1161, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1217, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer(address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "balances" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "transfer(_to,_value)", + "name": "! DAOrewardAccount.payOut(dao.rewardAccount(),reward)", "source_mapping": { - "start": 41331, - "length": 28, + "start": 39977, + "length": 53, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1094 + 1048 ], - "starting_column": 9, - "ending_column": 37 + "starting_column": 17, + "ending_column": 70 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferWithoutReward", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41191, - "length": 175, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1091, - 1092, - 1093, - 1094, - 1095 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -24049,58 +24035,65 @@ "ending_column": 2 } }, - "signature": "transferWithoutReward(address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "paidOut" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "paidOut[_from] -= transferPaidOut", + "name": "! DAOrewardAccount.payOut(dao,reward)", "source_mapping": { - "start": 42279, - "length": 33, + "start": 40100, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1133 + 1052 ], - "starting_column": 9, - "ending_column": 42 + "starting_column": 17, + "ending_column": 54 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferPaidOut", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41997, - "length": 384, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -24653,58 +24646,65 @@ "ending_column": 2 } }, - "signature": "transferPaidOut(address,address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "paidOut" + "underlying_type": "external_calls" } }, { "type": "node", - "name": "paidOut[_to] += transferPaidOut", + "name": "DAOpaidOut[msg.sender] += reward", "source_mapping": { - "start": 42322, - "length": 31, + "start": 40180, + "length": 32, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1134 + 1055 ], "starting_column": 9, - "ending_column": 40 + "ending_column": 41 }, "type_specific_fields": { "parent": { "type": "function", - "name": "transferPaidOut", + "name": "retrieveDAOReward", "source_mapping": { - "start": 41997, - "length": 384, + "start": 39505, + "length": 735, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol", "is_dependency": false, "lines": [ - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136 + 1037, + 1038, + 1039, + 1040, + 1041, + 1042, + 1043, + 1044, + 1045, + 1046, + 1047, + 1048, + 1049, + 1050, + 1051, + 1052, + 1053, + 1054, + 1055, + 1056, + 1057 ], "starting_column": 5, "ending_column": 6 @@ -25257,20 +25257,20 @@ "ending_column": 2 } }, - "signature": "transferPaidOut(address,address,uint256)" + "signature": "retrieveDAOReward(bool)" } } }, "additional_fields": { "underlying_type": "variables_written", - "variable_name": "paidOut" + "variable_name": "DAOpaidOut" } } ], - "description": "Reentrancy in DAO.transferWithoutReward(address,uint256) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1091-1095):\n\tExternal calls:\n\t- ! getMyReward() (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1092)\n\t\t- (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1065)\n\t\t- reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1068-1069)\n\t\t- ! rewardAccount.payOut(_account,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1070)\n\tState variables written after the call(s):\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- balances[msg.sender] -= _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#101)\n\t\t- balances[_to] += _amount (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#102)\n\t- transfer(_to,_value) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1094)\n\t\t- paidOut[_from] -= transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1133)\n\t\t- paidOut[_to] += transferPaidOut (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1134)\n", - "markdown": "Reentrancy in [DAO.transferWithoutReward(address,uint256)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095):\n\tExternal calls:\n\t- [! getMyReward()](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1092)\n\t\t- [(balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1065)\n\t\t- [reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1068-L1069)\n\t\t- [! rewardAccount.payOut(_account,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1070)\n\tState variables written after the call(s):\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [balances[msg.sender] -= _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L101)\n\t\t- [balances[_to] += _amount](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L102)\n\t- [transfer(_to,_value)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1094)\n\t\t- [paidOut[_from] -= transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1133)\n\t\t- [paidOut[_to] += transferPaidOut](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1134)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1091-L1095", - "id": "bb78c66126a39c10a22c2be95caccd1bc16b010bc959bdeb23bdc1d728654eea", + "description": "Reentrancy in DAO.retrieveDAOReward(bool) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1037-1057):\n\tExternal calls:\n\t- reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender] (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1044-1046)\n\t- ! DAOrewardAccount.payOut(dao.rewardAccount(),reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1048)\n\t- ! DAOrewardAccount.payOut(dao,reward) (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1052)\n\tState variables written after the call(s):\n\t- DAOpaidOut[msg.sender] += reward (tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#1055)\n", + "markdown": "Reentrancy in [DAO.retrieveDAOReward(bool)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057):\n\tExternal calls:\n\t- [reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender]](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1044-L1046)\n\t- [! DAOrewardAccount.payOut(dao.rewardAccount(),reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1048)\n\t- [! DAOrewardAccount.payOut(dao,reward)](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1052)\n\tState variables written after the call(s):\n\t- [DAOpaidOut[msg.sender] += reward](tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1055)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.4.25/DAO.sol#L1037-L1057", + "id": "f4fcbe9e693a60538ed19ff7c298fa578309af52604f3265bac4254b82e45d8f", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json index b547f1715..3c2fe6275 100644 --- a/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol.0.5.16.ReentrancyReadBeforeWritten.json @@ -4,24 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 336, - "length": 188, + "start": 530, + "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": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -83,14 +81,14 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 397, + "start": 605, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -98,7 +96,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 18 + 27 ], "starting_column": 9, "ending_column": 46 @@ -106,24 +104,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 336, - "length": 188, + "start": 530, + "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": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -185,7 +181,7 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, @@ -195,42 +191,40 @@ }, { "type": "node", - "name": "notCalled = false", + "name": "bad0()", "source_mapping": { - "start": 500, - "length": 17, + "start": 678, + "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": [ - 22 + 29 ], "starting_column": 9, - "ending_column": 26 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 336, - "length": 188, + "start": 530, + "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": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 + 25, + 26, + 27, + 28, + 29, + 30 ], "starting_column": 5, "ending_column": 6 @@ -292,113 +286,19 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, "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#16-23):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23", - "id": "c9ba81d76d46579f9e78ac96b1aae43b71f2d4a96d4c47b2fab9831bf0f15a8f", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 530, - "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": [ - 25, - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyWrite", - "source_mapping": { - "start": 28, - "length": 859, - "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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 605, + "start": 397, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", @@ -406,7 +306,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol", "is_dependency": false, "lines": [ - 27 + 18 ], "starting_column": 9, "ending_column": 46 @@ -414,22 +314,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 530, - "length": 161, + "start": 336, + "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": [ - 25, - 26, - 27, - 28, - 29, - 30 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -491,12 +393,12 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { @@ -601,25 +503,26 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "notCalled" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "notCalled = false", "source_mapping": { - "start": 397, - "length": 37, + "start": 500, + "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": [ - 18 + 22 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -708,45 +611,143 @@ } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "notCalled" } - }, + } + ], + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#25-30):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#27)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L27)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30", + "id": "9fbfafd0d47ce4f4ead524570f382093c186c4e9e5e96ce0067fce3ffb6dc74a", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "bad0()", + "type": "function", + "name": "bad0", "source_mapping": { - "start": 678, - "length": 6, + "start": 336, + "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": [ - 29 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], - "starting_column": 9, - "ending_column": 15 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad1", + "type": "contract", + "name": "ReentrancyWrite", "source_mapping": { - "start": 530, - "length": 161, + "start": 28, + "length": 859, "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 + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "(success) = msg.sender.call()", + "source_mapping": { + "start": 397, + "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": [ + 18 + ], + "starting_column": 9, + "ending_column": 46 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 336, + "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": [ + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23 ], "starting_column": 5, "ending_column": 6 @@ -808,13 +809,12 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" + "underlying_type": "external_calls" } }, { @@ -926,10 +926,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#25-30):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#27)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#29)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L27)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L29)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L25-L30", - "id": "9fbfafd0d47ce4f4ead524570f382093c186c4e9e5e96ce0067fce3ffb6dc74a", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#16-23):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#18)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#22)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L18)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L22)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.5.16/reentrancy-write.sol#L16-L23", + "id": "c9ba81d76d46579f9e78ac96b1aae43b71f2d4a96d4c47b2fab9831bf0f15a8f", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json index bd69b8713..7d49512de 100644 --- a/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json +++ b/tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol.0.7.6.ReentrancyReadBeforeWritten.json @@ -4,24 +4,22 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 383, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -83,14 +81,14 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 444, + "start": 652, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -98,7 +96,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 22 + 31 ], "starting_column": 9, "ending_column": 46 @@ -106,24 +104,22 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 383, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -185,7 +181,7 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, @@ -195,42 +191,40 @@ }, { "type": "node", - "name": "notCalled = false", + "name": "bad0()", "source_mapping": { - "start": 547, - "length": 17, + "start": 725, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 26 + 33 ], "starting_column": 9, - "ending_column": 26 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 383, - "length": 188, + "start": 577, + "length": 161, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27 + 29, + 30, + 31, + 32, + 33, + 34 ], "starting_column": 5, "ending_column": 6 @@ -292,113 +286,19 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(address)" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" - } - } - ], - "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#20-27):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27", - "id": "ef995e89d54c7b577af2ca26540e01da65ac0e2466d6d7a58e4d11e9211b12a4", - "check": "reentrancy-no-eth", - "impact": "Medium", - "confidence": "Medium" - }, - { - "elements": [ - { - "type": "function", - "name": "bad1", - "source_mapping": { - "start": 577, - "length": 161, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 29, - 30, - 31, - 32, - 33, - 34 - ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ReentrancyWrite", - "source_mapping": { - "start": 82, - "length": 852, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", - "is_dependency": false, - "lines": [ - 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, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "bad1(address)" + "underlying_type": "external_calls" } }, { "type": "node", "name": "(success) = msg.sender.call()", "source_mapping": { - "start": 652, + "start": 444, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", @@ -406,7 +306,7 @@ "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 31 + 22 ], "starting_column": 9, "ending_column": 46 @@ -414,22 +314,24 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 577, - "length": 161, + "start": 383, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 29, - 30, - 31, - 32, - 33, - 34 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -491,12 +393,12 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "external_calls_sending_eth" } }, { @@ -601,25 +503,26 @@ } }, "additional_fields": { - "underlying_type": "external_calls" + "underlying_type": "variables_written", + "variable_name": "notCalled" } }, { "type": "node", - "name": "(success) = msg.sender.call()", + "name": "notCalled = false", "source_mapping": { - "start": 444, - "length": 37, + "start": 547, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 22 + 26 ], "starting_column": 9, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { @@ -708,45 +611,143 @@ } }, "additional_fields": { - "underlying_type": "external_calls_sending_eth" + "underlying_type": "variables_written", + "variable_name": "notCalled" } - }, + } + ], + "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#29-34):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#31)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L31)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34", + "id": "11273f8e5ccbb848ea0de9b7c15e3fb66deb7c061265f88b8aa7646eed935c0e", + "check": "reentrancy-no-eth", + "impact": "Medium", + "confidence": "Medium" + }, + { + "elements": [ { - "type": "node", - "name": "bad0()", + "type": "function", + "name": "bad0", "source_mapping": { - "start": 725, - "length": 6, + "start": 383, + "length": 188, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ - 33 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], - "starting_column": 9, - "ending_column": 15 + "starting_column": 5, + "ending_column": 6 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "bad1", + "type": "contract", + "name": "ReentrancyWrite", "source_mapping": { - "start": 577, - "length": 161, + "start": 82, + "length": 852, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", "is_dependency": false, "lines": [ + 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, 32, 33, - 34 + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "bad0()" + } + }, + { + "type": "node", + "name": "(success) = msg.sender.call()", + "source_mapping": { + "start": 444, + "length": 37, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 22 + ], + "starting_column": 9, + "ending_column": 46 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "bad0", + "source_mapping": { + "start": 383, + "length": 188, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27 ], "starting_column": 5, "ending_column": 6 @@ -808,13 +809,12 @@ "ending_column": 2 } }, - "signature": "bad1(address)" + "signature": "bad0()" } } }, "additional_fields": { - "underlying_type": "variables_written", - "variable_name": "notCalled" + "underlying_type": "external_calls" } }, { @@ -926,10 +926,10 @@ } } ], - "description": "Reentrancy in ReentrancyWrite.bad1(address) (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#29-34):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#31)\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#33)\n\t\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", - "markdown": "Reentrancy in [ReentrancyWrite.bad1(address)](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L31)\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L33)\n\t\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", - "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L29-L34", - "id": "11273f8e5ccbb848ea0de9b7c15e3fb66deb7c061265f88b8aa7646eed935c0e", + "description": "Reentrancy in ReentrancyWrite.bad0() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#20-27):\n\tExternal calls:\n\t- (success) = msg.sender.call() (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#22)\n\tState variables written after the call(s):\n\t- notCalled = false (tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#26)\n", + "markdown": "Reentrancy in [ReentrancyWrite.bad0()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27):\n\tExternal calls:\n\t- [(success) = msg.sender.call()](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L22)\n\tState variables written after the call(s):\n\t- [notCalled = false](tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L26)\n", + "first_markdown_element": "tests/detectors/reentrancy-no-eth/0.7.6/reentrancy-write.sol#L20-L27", + "id": "ef995e89d54c7b577af2ca26540e01da65ac0e2466d6d7a58e4d11e9211b12a4", "check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json b/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json index 2612dca44..1e3ee1354 100644 --- a/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json +++ b/tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol.0.4.21.ReusedBaseConstructor.json @@ -4,21 +4,21 @@ "elements": [ { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 155, - "length": 65, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -26,19 +26,19 @@ }, { "type": "function", - "name": "A", + "name": "C", "source_mapping": { - "start": 34, - "length": 50, + "start": 176, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -46,47 +46,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "C", "source_mapping": { - "start": 0, - "length": 86, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "A(uint256)" + "signature": "C(uint256)" } }, { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 155, - "length": 65, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -94,31 +93,31 @@ }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 88, - "length": 65, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18", - "id": "d2847fcb309e0ee45dfb303bf749123bbebee692a080ae6a718a76ef785ae8d2", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor C.C(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [C.C(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "085dceba8f0b37580e72952eafe1368bf0d09f10c2f44c0b6ff53ad7e72f92b1", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -127,21 +126,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "E", "source_mapping": { - "start": 222, - "length": 71, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -238,10 +237,10 @@ } } ], - "description": "D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24", - "id": "7436d3215ee6260f9a4b2f4697fa242225ad3f10e30bfbd162679a5e3fa48f10", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "14d6bffb3f1849cfebb7156cb797315fd01ac83911a1261650f702792f4db830", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -250,41 +249,42 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 295, - "length": 77, + "start": 375, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "function", - "name": "B", + "name": "A", "source_mapping": { - "start": 109, - "length": 42, + "start": 34, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -292,78 +292,80 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "A", "source_mapping": { - "start": 88, - "length": 65, + "start": 0, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "B(uint256)" + "signature": "A(uint256)" } }, { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 295, - "length": 77, + "start": 375, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 222, - "length": 71, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor B.B(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [B.B(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "e79d62c434ba85788dd5087e4994bb136be6b9e8a55e8057b0e30c9b0436abdc", + "description": "F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38", + "id": "71e08d0e5c44bbc2671e014018a6333bd92db7380a85732bf2d17aa5500f6434", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -372,21 +374,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "D", "source_mapping": { - "start": 295, - "length": 77, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -394,19 +396,19 @@ }, { "type": "function", - "name": "C", + "name": "A", "source_mapping": { - "start": 176, - "length": 42, + "start": 34, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -414,46 +416,47 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "A", "source_mapping": { - "start": 155, - "length": 65, + "start": 0, + "length": 86, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "C(uint256)" + "signature": "A(uint256)" } }, { "type": "contract", - "name": "E", + "name": "C", "source_mapping": { - "start": 295, - "length": 77, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -461,31 +464,31 @@ }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 222, - "length": 71, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor C.C(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [C.C(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "085dceba8f0b37580e72952eafe1368bf0d09f10c2f44c0b6ff53ad7e72f92b1", + "description": "D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24", + "id": "7436d3215ee6260f9a4b2f4697fa242225ad3f10e30bfbd162679a5e3fa48f10", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -494,21 +497,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "C", "source_mapping": { - "start": 295, - "length": 77, + "start": 155, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -605,10 +608,10 @@ } } ], - "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", - "id": "14d6bffb3f1849cfebb7156cb797315fd01ac83911a1261650f702792f4db830", + "description": "C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L14-L18", + "id": "d2847fcb309e0ee45dfb303bf749123bbebee692a080ae6a718a76ef785ae8d2", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -617,42 +620,41 @@ "elements": [ { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 375, - "length": 57, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { "type": "function", - "name": "A", + "name": "B", "source_mapping": { - "start": 34, - "length": 50, + "start": 109, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -660,80 +662,78 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 86, + "start": 88, + "length": 65, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "A(uint256)" + "signature": "B(uint256)" } }, { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 375, - "length": 57, + "start": 295, + "length": 77, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 88, - "length": 65, + "start": 222, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) gives base constructor A.A(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) gives base constructor [A.A(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L33-L38", - "id": "71e08d0e5c44bbc2671e014018a6333bd92db7380a85732bf2d17aa5500f6434", + "description": "E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) gives base constructor B.B(uint256) (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) gives base constructor [B.B(uint256)](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.21/reused_base_constructor.sol#L26-L30", + "id": "e79d62c434ba85788dd5087e4994bb136be6b9e8a55e8057b0e30c9b0436abdc", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json b/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json index 9d698a4c3..6d9285833 100644 --- a/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json +++ b/tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol.0.4.25.ReusedBaseConstructor.json @@ -4,21 +4,21 @@ "elements": [ { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 157, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -115,10 +115,10 @@ } } ], - "description": "C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18", - "id": "2d9d2b1b6d2540f86fd909f9766e128da573e659f40a50835cc9adef3c4dbee8", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", + "id": "1f85bf19873eaee39a8f703b0c783aa86e34c91fad5556ee831eb7c6adcfdb77", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -127,21 +127,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 225, - "length": 72, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -151,17 +151,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 110, - "length": 43, + "start": 34, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -169,21 +169,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "A", "source_mapping": { - "start": 89, - "length": 66, + "start": 0, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -194,21 +195,21 @@ }, { "type": "contract", - "name": "D", + "name": "C", "source_mapping": { - "start": 225, - "length": 72, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -216,31 +217,31 @@ }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 225, - "length": 72, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "5f3b188e7d6c737684f829c3fde96f739cd502b4aba8f3f6e3ceab7decffa618", + "description": "C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18", + "id": "2d9d2b1b6d2540f86fd909f9766e128da573e659f40a50835cc9adef3c4dbee8", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -249,21 +250,21 @@ "elements": [ { "type": "contract", - "name": "D", + "name": "E", "source_mapping": { - "start": 225, - "length": 72, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -314,6 +315,28 @@ "signature": "constructor(uint256)" } }, + { + "type": "contract", + "name": "E", + "source_mapping": { + "start": 299, + "length": 78, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 26, + 27, + 28, + 29, + 30 + ], + "starting_column": 1, + "ending_column": 2 + } + }, { "type": "contract", "name": "D", @@ -359,10 +382,10 @@ } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "b579da8996b6a1a35169bcae74ad8126c68fb0a1819d3977cea3e0e295ff2d5c", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", + "id": "33b16377cf3026b60d644e79d92682e6e626d7ad6598387440c9b20fd8aa44fe", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -395,17 +418,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 34, - "length": 51, + "start": 110, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -413,22 +436,21 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 87, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 @@ -439,21 +461,21 @@ }, { "type": "contract", - "name": "C", + "name": "D", "source_mapping": { - "start": 157, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -461,31 +483,31 @@ }, { "type": "contract", - "name": "B", + "name": "D", "source_mapping": { - "start": 89, - "length": 66, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", - "id": "1f85bf19873eaee39a8f703b0c783aa86e34c91fad5556ee831eb7c6adcfdb77", + "id": "5f3b188e7d6c737684f829c3fde96f739cd502b4aba8f3f6e3ceab7decffa618", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -494,21 +516,21 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "D", "source_mapping": { - "start": 299, - "length": 78, + "start": 225, + "length": 72, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 @@ -518,7 +540,7 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 110, + "start": 178, "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", @@ -526,9 +548,9 @@ "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -536,9 +558,9 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "B", + "name": "C", "source_mapping": { - "start": 89, + "start": 157, "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", @@ -546,11 +568,11 @@ "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -559,50 +581,6 @@ "signature": "constructor(uint256)" } }, - { - "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, { "type": "contract", "name": "D", @@ -648,10 +626,10 @@ } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) contract definition\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) contract definition\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "ee7d44329ffb81dc06e2a2f1b3a166a5115287a1175b32cf828b57479afbc4ae", + "description": "D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24", + "id": "b579da8996b6a1a35169bcae74ad8126c68fb0a1819d3977cea3e0e295ff2d5c", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -660,41 +638,42 @@ "elements": [ { "type": "contract", - "name": "E", + "name": "F", "source_mapping": { - "start": 299, - "length": 78, + "start": 380, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 26, - 27, - 28, - 29, - 30 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "function", "name": "constructor", "source_mapping": { - "start": 178, - "length": 43, + "start": 34, + "length": 51, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 3, + 4, + 5 ], "starting_column": 5, "ending_column": 6 @@ -702,21 +681,22 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "C", + "name": "A", "source_mapping": { - "start": 157, - "length": 66, + "start": 0, + "length": 87, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 1, + 2, + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -727,75 +707,54 @@ }, { "type": "contract", - "name": "E", - "source_mapping": { - "start": 299, - "length": 78, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", - "is_dependency": false, - "lines": [ - 26, - 27, - 28, - 29, - 30 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "contract", - "name": "D", + "name": "F", "source_mapping": { - "start": 225, - "length": 72, + "start": 380, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 33, + 34, + 35, + 36, + 37, + 38 ], "starting_column": 1, - "ending_column": 2 + "ending_column": 0 } }, { "type": "contract", - "name": "D", + "name": "B", "source_mapping": { - "start": 225, - "length": 72, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor C.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#15-17) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [C.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L15-L17) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "33b16377cf3026b60d644e79d92682e6e626d7ad6598387440c9b20fd8aa44fe", + "description": "F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38", + "id": "b74eb2b11af7a004b623d28b035228963f09aed588c95efed636021f426c5cdc", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -828,17 +787,17 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 34, - "length": 51, + "start": 110, + "length": 43, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -846,22 +805,21 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "A", + "name": "B", "source_mapping": { - "start": 0, - "length": 87, + "start": 89, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12 ], "starting_column": 1, "ending_column": 2 @@ -872,21 +830,21 @@ }, { "type": "contract", - "name": "C", + "name": "E", "source_mapping": { - "start": 157, - "length": 66, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 14, - 15, - 16, - 17, - 18 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, "ending_column": 2 @@ -894,31 +852,75 @@ }, { "type": "contract", - "name": "B", + "name": "E", "source_mapping": { - "start": 89, - "length": 66, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12 + 26, + 27, + 28, + 29, + 30 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 225, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "contract", + "name": "D", + "source_mapping": { + "start": 225, + "length": 72, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", + "is_dependency": false, + "lines": [ + 20, + 21, + 22, + 23, + 24 ], "starting_column": 1, "ending_column": 2 } } ], - "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor B.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#9-11) arguments more than once in inheritance hierarchy:\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) contract definition\n\t- From E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) constructor definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) contract definition\n\t- From D (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#20-24) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [B.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L9-L11) arguments more than once in inheritance hierarchy:\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) contract definition\n\t- From [E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) constructor definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) contract definition\n\t- From [D](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L20-L24) constructor definition\n", "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", - "id": "f5c86955c15d44fe9471680d12d37843a15ba934cbb124786cadab0919ea68d1", + "id": "ee7d44329ffb81dc06e2a2f1b3a166a5115287a1175b32cf828b57479afbc4ae", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" @@ -927,25 +929,24 @@ "elements": [ { "type": "contract", - "name": "F", + "name": "E", "source_mapping": { - "start": 380, - "length": 58, + "start": 299, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 26, + 27, + 28, + 29, + 30 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { @@ -996,25 +997,24 @@ }, { "type": "contract", - "name": "F", + "name": "C", "source_mapping": { - "start": 380, - "length": 58, + "start": 157, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol", "is_dependency": false, "lines": [ - 33, - 34, - 35, - 36, - 37, - 38 + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, - "ending_column": 0 + "ending_column": 2 } }, { @@ -1040,10 +1040,10 @@ } } ], - "description": "F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From F (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#33-38) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", - "markdown": "[F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [F](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", - "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L33-L38", - "id": "b74eb2b11af7a004b623d28b035228963f09aed588c95efed636021f426c5cdc", + "description": "E (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#26-30) gives base constructor A.constructor(uint256) (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#3-5) arguments more than once in inheritance hierarchy:\n\t- From C (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#14-18) constructor definition\n\t- From B (tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#8-12) constructor definition\n", + "markdown": "[E](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30) gives base constructor [A.constructor(uint256)](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L3-L5) arguments more than once in inheritance hierarchy:\n\t- From [C](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L14-L18) constructor definition\n\t- From [B](tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L8-L12) constructor definition\n", + "first_markdown_element": "tests/detectors/reused-constructor/0.4.25/reused_base_constructor.sol#L26-L30", + "id": "f5c86955c15d44fe9471680d12d37843a15ba934cbb124786cadab0919ea68d1", "check": "reused-constructor", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json b/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json index 14a2a32d1..7c0bd82fa 100644 --- a/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json +++ b/tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol.0.4.25.BuiltinSymbolShadowing.json @@ -4,40 +4,38 @@ "elements": [ { "type": "variable", - "name": "blockhash", + "name": "mutable", "source_mapping": { - "start": 54, - "length": 14, + "start": 527, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 4 + 32 ], "starting_column": 5, - "ending_column": 19 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "Reserved", "source_mapping": { - "start": 26, - "length": 94, + "start": 504, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 31, + 32, + 33, + 34 ], "starting_column": 1, "ending_column": 2 @@ -46,10 +44,10 @@ } } ], - "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4", - "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", + "description": "Reserved.mutable (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#32) (state variable) shadows built-in symbol\"\n", + "markdown": "[Reserved.mutable](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32", + "id": "11840553a9e11623596d7a07275814e65a5b1d90277ae0e2954cd8ce74d6a6d2", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -58,40 +56,41 @@ "elements": [ { "type": "variable", - "name": "now", + "name": "ecrecover", "source_mapping": { - "start": 74, - "length": 8, + "start": 170, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 5 + 11 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 26, - "length": 94, + "start": 122, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 @@ -100,10 +99,10 @@ } } ], - "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5", - "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", + "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11", + "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -111,54 +110,145 @@ { "elements": [ { - "type": "event", - "name": "revert", + "type": "variable", + "name": "keccak256", "source_mapping": { - "start": 89, - "length": 29, + "start": 449, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 7 + 25 + ], + "starting_column": 9, + "ending_column": 23 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "require", + "source_mapping": { + "start": 380, + "length": 120, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25, + 26, + 27, + 28 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "FurtherExtendedContract", + "source_mapping": { + "start": 263, + "length": 239, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "require()" + } + } + } + } + ], + "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25", + "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "variable", + "name": "abi", + "source_mapping": { + "start": 365, + "length": 8, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 21 ], "starting_column": 5, - "ending_column": 34 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 26, - "length": 94, + "start": 263, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "revert(bool)" + } } } ], - "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", - "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7", - "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", + "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21", + "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -166,57 +256,53 @@ { "elements": [ { - "type": "function", - "name": "assert", + "type": "variable", + "name": "blockhash", "source_mapping": { - "start": 195, - "length": 64, + "start": 54, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 19 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 122, - "length": 139, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "assert(bool)" + } } } ], - "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15", - "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", + "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L4", + "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -225,76 +311,58 @@ "elements": [ { "type": "variable", - "name": "msg", + "name": "this", "source_mapping": { - "start": 244, - "length": 8, + "start": 346, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 14 + 20 ], - "starting_column": 9, - "ending_column": 17 + "starting_column": 5, + "ending_column": 18 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "assert", + "type": "contract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 195, - "length": 64, + "start": 263, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ExtendedContract", - "source_mapping": { - "start": 122, - "length": 139, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "assert(bool)" + "starting_column": 1, + "ending_column": 2 } } } } ], - "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14", - "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20", + "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -303,41 +371,40 @@ "elements": [ { "type": "variable", - "name": "ecrecover", + "name": "now", "source_mapping": { - "start": 170, - "length": 18, + "start": 74, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 11 + 5 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 122, - "length": 139, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 @@ -346,10 +413,10 @@ } } ], - "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L11", - "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", + "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L5", + "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -357,65 +424,54 @@ { "elements": [ { - "type": "function", - "name": "require", + "type": "event", + "name": "revert", "source_mapping": { - "start": 380, - "length": 120, + "start": 89, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 7 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 263, - "length": 239, + "start": 26, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "revert(bool)" } } ], - "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28", - "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", + "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", + "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L7", + "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -424,40 +480,37 @@ "elements": [ { "type": "variable", - "name": "keccak256", + "name": "msg", "source_mapping": { - "start": 449, - "length": 14, + "start": 244, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 25 + 14 ], "starting_column": 9, - "ending_column": 23 + "ending_column": 17 }, "type_specific_fields": { "parent": { "type": "function", - "name": "require", + "name": "assert", "source_mapping": { - "start": 380, - "length": 120, + "start": 195, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -465,43 +518,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "ExtendedContract", "source_mapping": { - "start": 263, - "length": 239, + "start": 122, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "assert(bool)" } } } } ], - "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L25", - "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L14", + "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "assert", + "source_mapping": { + "start": 195, + "length": 64, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ExtendedContract", + "source_mapping": { + "start": 122, + "length": 139, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "assert(bool)" + } + } + ], + "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L13-L15", + "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -655,81 +761,26 @@ { "elements": [ { - "type": "variable", - "name": "this", - "source_mapping": { - "start": 346, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 20 - ], - "starting_column": 5, - "ending_column": 18 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "FurtherExtendedContract", - "source_mapping": { - "start": 263, - "length": 239, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L20", - "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "abi", + "type": "function", + "name": "require", "source_mapping": { - "start": 365, - "length": 8, + "start": 380, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 21 + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -760,66 +811,15 @@ "starting_column": 1, "ending_column": 2 } - } - } - } - ], - "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L21", - "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "mutable", - "source_mapping": { - "start": 527, - "length": 15, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 32 - ], - "starting_column": 5, - "ending_column": 20 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "Reserved", - "source_mapping": { - "start": 504, - "length": 42, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 31, - 32, - 33, - 34 - ], - "starting_column": 1, - "ending_column": 2 - } - } + }, + "signature": "require()" } } ], - "description": "Reserved.mutable (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#32) (state variable) shadows built-in symbol\"\n", - "markdown": "[Reserved.mutable](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L32", - "id": "11840553a9e11623596d7a07275814e65a5b1d90277ae0e2954cd8ce74d6a6d2", + "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.4.25/shadowing_builtin_symbols.sol#L23-L28", + "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json b/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json index 1012fbe88..167b72990 100644 --- a/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json +++ b/tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol.0.5.16.BuiltinSymbolShadowing.json @@ -4,40 +4,41 @@ "elements": [ { "type": "variable", - "name": "blockhash", + "name": "ecrecover", "source_mapping": { - "start": 57, - "length": 14, + "start": 173, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 4 + 11 ], "starting_column": 5, - "ending_column": 19 + "ending_column": 23 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 94, + "start": 125, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 @@ -46,10 +47,10 @@ } } ], - "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4", - "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", + "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11", + "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -58,52 +59,84 @@ "elements": [ { "type": "variable", - "name": "now", + "name": "keccak256", "source_mapping": { - "start": 77, - "length": 8, + "start": 452, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 5 + 25 ], - "starting_column": 5, - "ending_column": 13 + "starting_column": 9, + "ending_column": 23 }, "type_specific_fields": { "parent": { - "type": "contract", - "name": "BaseContract", + "type": "function", + "name": "require", "source_mapping": { - "start": 29, - "length": 94, + "start": 383, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 23, + 24, + 25, + 26, + 27, + 28 ], - "starting_column": 1, - "ending_column": 2 + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "FurtherExtendedContract", + "source_mapping": { + "start": 266, + "length": 239, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "require()" } } } } ], - "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", - "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5", - "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", + "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25", + "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -111,54 +144,59 @@ { "elements": [ { - "type": "event", - "name": "revert", + "type": "variable", + "name": "abi", "source_mapping": { - "start": 92, - "length": 29, + "start": 368, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 7 + 21 ], "starting_column": 5, - "ending_column": 34 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 29, - "length": 94, + "start": 266, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "revert(bool)" + } } } ], - "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", - "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7", - "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", + "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21", + "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -166,57 +204,53 @@ { "elements": [ { - "type": "function", - "name": "assert", + "type": "variable", + "name": "blockhash", "source_mapping": { - "start": 198, - "length": 64, + "start": 57, + "length": 14, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 19 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 125, - "length": 139, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } - }, - "signature": "assert(bool)" + } } } ], - "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15", - "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", + "description": "BaseContract.blockhash (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#4) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.blockhash](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L4", + "id": "61d1c1452e694c321d00576decdf35c62efbe8860f664273955fadce5e063cc8", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -225,76 +259,58 @@ "elements": [ { "type": "variable", - "name": "msg", + "name": "this", "source_mapping": { - "start": 247, - "length": 8, + "start": 349, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 14 + 20 ], - "starting_column": 9, - "ending_column": 17 + "starting_column": 5, + "ending_column": 18 }, "type_specific_fields": { "parent": { - "type": "function", - "name": "assert", + "type": "contract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 198, - "length": 64, + "start": 266, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], - "starting_column": 5, - "ending_column": 6 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "ExtendedContract", - "source_mapping": { - "start": 125, - "length": 139, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "assert(bool)" + "starting_column": 1, + "ending_column": 2 } } } } ], - "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14", - "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20", + "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -303,41 +319,40 @@ "elements": [ { "type": "variable", - "name": "ecrecover", + "name": "now", "source_mapping": { - "start": 173, - "length": 18, + "start": 77, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 11 + 5 ], "starting_column": 5, - "ending_column": 23 + "ending_column": 13 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 125, - "length": 139, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 @@ -346,76 +361,65 @@ } } ], - "description": "ExtendedContract.ecrecover (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#11) (state variable) shadows built-in symbol\"\n", - "markdown": "[ExtendedContract.ecrecover](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L11", - "id": "39737925cf3bd4ebf9a1c7bbe39da8b80ba28e5a3d93a938d1a4cca78a6a436d", + "description": "BaseContract.now (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#5) (state variable) shadows built-in symbol\"\n", + "markdown": "[BaseContract.now](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5) (state variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L5", + "id": "942ad0405af0bc533374dded6e2474c53892747c98d2df14d59cbb6840fa18b3", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" }, { "elements": [ - { - "type": "function", - "name": "require", + { + "type": "event", + "name": "revert", "source_mapping": { - "start": 383, - "length": 120, + "start": 92, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 7 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 34 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 266, - "length": 239, + "start": 29, + "length": 94, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 3, + 4, + 5, + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "revert(bool)" } } ], - "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28", - "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", + "description": "BaseContractrevert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#7) (event) shadows built-in symbol\"\n", + "markdown": "[BaseContractrevert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7) (event) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L7", + "id": "9c428e61cb4832d899b2bb711c8d428154425dbadf5dfc2e2d857254824d8f72", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -424,40 +428,37 @@ "elements": [ { "type": "variable", - "name": "keccak256", + "name": "msg", "source_mapping": { - "start": 452, - "length": 14, + "start": 247, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 25 + 14 ], "starting_column": 9, - "ending_column": 23 + "ending_column": 17 }, "type_specific_fields": { "parent": { "type": "function", - "name": "require", + "name": "assert", "source_mapping": { - "start": 383, - "length": 120, + "start": 198, + "length": 64, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25, - 26, - 27, - 28 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -465,43 +466,96 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "ExtendedContract", "source_mapping": { - "start": 266, - "length": 239, + "start": 125, + "length": 139, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 10, + 11, + 12, + 13, + 14, + 15, + 16 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "require()" + "signature": "assert(bool)" } } } } ], - "description": "FurtherExtendedContract.require().keccak256 (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#25) (local variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.require().keccak256](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25) (local variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L25", - "id": "40f0453d27abf2d9ed76fe60853b6e2e0cd9a443d639e9da457460ea02b2bdc7", + "description": "ExtendedContract.assert(bool).msg (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#14) (local variable) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool).msg](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14) (local variable) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L14", + "id": "a2a7e1e27320d38e52b51c9b1ec67cca0a403673ff6fdd59652f9cd8425d011f", + "check": "shadowing-builtin", + "impact": "Low", + "confidence": "High" + }, + { + "elements": [ + { + "type": "function", + "name": "assert", + "source_mapping": { + "start": 198, + "length": 64, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 13, + 14, + 15 + ], + "starting_column": 5, + "ending_column": 6 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "ExtendedContract", + "source_mapping": { + "start": 125, + "length": 139, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", + "is_dependency": false, + "lines": [ + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "assert(bool)" + } + } + ], + "description": "ExtendedContract.assert(bool) (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#13-15) (function) shadows built-in symbol\"\n", + "markdown": "[ExtendedContract.assert(bool)](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15) (function) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L13-L15", + "id": "b3a1b23c1daed52b1a2ff5fb76d4fcdf2bc0b2126524303321cf8e7835116d6f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" @@ -655,81 +709,26 @@ { "elements": [ { - "type": "variable", - "name": "this", - "source_mapping": { - "start": 349, - "length": 13, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 20 - ], - "starting_column": 5, - "ending_column": 18 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "FurtherExtendedContract", - "source_mapping": { - "start": 266, - "length": 239, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", - "is_dependency": false, - "lines": [ - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 - ], - "starting_column": 1, - "ending_column": 2 - } - } - } - } - ], - "description": "FurtherExtendedContract.this (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#20) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.this](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L20", - "id": "87e1cc0cb95181dd120d3e6e55d89fdc7b5cd01da2f89cd7a3d105738f57c10b", - "check": "shadowing-builtin", - "impact": "Low", - "confidence": "High" - }, - { - "elements": [ - { - "type": "variable", - "name": "abi", + "type": "function", + "name": "require", "source_mapping": { - "start": 368, - "length": 8, + "start": 383, + "length": 120, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol", "is_dependency": false, "lines": [ - 21 + 23, + 24, + 25, + 26, + 27, + 28 ], "starting_column": 5, - "ending_column": 13 + "ending_column": 6 }, "type_specific_fields": { "parent": { @@ -760,14 +759,15 @@ "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "require()" } } ], - "description": "FurtherExtendedContract.abi (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#21) (state variable) shadows built-in symbol\"\n", - "markdown": "[FurtherExtendedContract.abi](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21) (state variable) shadows built-in symbol\"\n", - "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L21", - "id": "4665243a2df090e3543ab26447528fa3401916f4669fe1264145891846d4bc40", + "description": "FurtherExtendedContract.require() (tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#23-28) (modifier) shadows built-in symbol\"\n", + "markdown": "[FurtherExtendedContract.require()](tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28) (modifier) shadows built-in symbol\"\n", + "first_markdown_element": "tests/detectors/shadowing-builtin/0.5.16/shadowing_builtin_symbols.sol#L23-L28", + "id": "db6c26c9a7c319c1a34c486e6e625c0906a2b118f8cd72f38a38c167832aab4f", "check": "shadowing-builtin", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json b/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json index 9516c83cb..a0e0cdaea 100644 --- a/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol.0.4.25.LocalShadowing.json @@ -338,9 +338,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "v", "source_mapping": { - "start": 405, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", @@ -350,8 +350,8 @@ "lines": [ 25 ], - "starting_column": 59, - "ending_column": 65 + "starting_column": 75, + "ending_column": 81 }, "type_specific_fields": { "parent": { @@ -406,21 +406,21 @@ } }, { - "type": "function", - "name": "z", + "type": "event", + "name": "v", "source_mapping": { - "start": 150, - "length": 27, + "start": 183, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 13 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -447,14 +447,14 @@ "ending_column": 2 } }, - "signature": "z()" + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -595,9 +595,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 421, + "start": 405, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", @@ -607,8 +607,8 @@ "lines": [ 25 ], - "starting_column": 75, - "ending_column": 81 + "starting_column": 59, + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -663,21 +663,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 183, - "length": 10, + "start": 150, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -704,14 +704,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.4.25/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json b/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json index bb012fce1..9fab3c6ba 100644 --- a/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol.0.5.16.LocalShadowing.json @@ -338,9 +338,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "v", "source_mapping": { - "start": 408, + "start": 424, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", @@ -350,8 +350,8 @@ "lines": [ 25 ], - "starting_column": 59, - "ending_column": 65 + "starting_column": 75, + "ending_column": 81 }, "type_specific_fields": { "parent": { @@ -406,21 +406,21 @@ } }, { - "type": "function", - "name": "z", + "type": "event", + "name": "v", "source_mapping": { - "start": 153, - "length": 27, + "start": 186, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 13 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 15 }, "type_specific_fields": { "parent": { @@ -447,14 +447,14 @@ "ending_column": 2 } }, - "signature": "z()" + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -595,9 +595,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 424, + "start": 408, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", @@ -607,8 +607,8 @@ "lines": [ 25 ], - "starting_column": 75, - "ending_column": 81 + "starting_column": 59, + "ending_column": 65 }, "type_specific_fields": { "parent": { @@ -663,21 +663,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 186, - "length": 10, + "start": 153, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -704,14 +704,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.5.16/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json b/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json index f4eed78f8..3cd190e9f 100644 --- a/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol.0.6.11.LocalShadowing.json @@ -4,10 +4,10 @@ "elements": [ { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 382, - "length": 8, + "start": 406, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -16,8 +16,8 @@ "lines": [ 25 ], - "starting_column": 30, - "ending_column": 38 + "starting_column": 54, + "ending_column": 59 }, "type_specific_fields": { "parent": { @@ -73,45 +73,38 @@ }, { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 260, - "length": 12, + "start": 73, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 17 + 5 ], "starting_column": 5, - "ending_column": 17 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 201, - "length": 239, + "start": 29, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26 + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -120,10 +113,10 @@ } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#17) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L17) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#5) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L5) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", + "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -132,10 +125,10 @@ "elements": [ { "type": "variable", - "name": "y", + "name": "v", "source_mapping": { - "start": 406, - "length": 5, + "start": 429, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -144,8 +137,8 @@ "lines": [ 25 ], - "starting_column": 54, - "ending_column": 59 + "starting_column": 77, + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -200,10 +193,10 @@ } }, { - "type": "variable", - "name": "y", + "type": "event", + "name": "v", "source_mapping": { - "start": 73, + "start": 187, "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -211,7 +204,7 @@ "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 5, "ending_column": 15 @@ -219,32 +212,36 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 57, + "start": 88, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#5) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L5) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -253,9 +250,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "w", "source_mapping": { - "start": 413, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -265,8 +262,8 @@ "lines": [ 25 ], - "starting_column": 61, - "ending_column": 67 + "starting_column": 69, + "ending_column": 75 }, "type_specific_fields": { "parent": { @@ -322,54 +319,61 @@ }, { "type": "function", - "name": "z", + "name": "w", "source_mapping": { - "start": 154, - "length": 27, + "start": 280, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 20, + 21, + 22, + 23 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 88, - "length": 111, + "start": 201, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "z()" + "signature": "w()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#20-23) (modifier)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L20-L23) (modifier)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -378,10 +382,10 @@ "elements": [ { "type": "variable", - "name": "w", + "name": "__x", "source_mapping": { - "start": 421, - "length": 6, + "start": 382, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -390,8 +394,8 @@ "lines": [ 25 ], - "starting_column": 69, - "ending_column": 75 + "starting_column": 30, + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -446,24 +450,21 @@ } }, { - "type": "function", - "name": "w", + "type": "variable", + "name": "__x", "source_mapping": { - "start": 280, - "length": 71, + "start": 260, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23 + 17 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -493,15 +494,14 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "w()" + } } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#20-23) (modifier)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L20-L23) (modifier)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#17) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L17) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", + "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -510,9 +510,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 429, + "start": 413, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", @@ -522,8 +522,8 @@ "lines": [ 25 ], - "starting_column": 77, - "ending_column": 83 + "starting_column": 61, + "ending_column": 67 }, "type_specific_fields": { "parent": { @@ -578,21 +578,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 187, - "length": 10, + "start": 154, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -619,14 +619,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.6.11/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json b/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json index d79a3b6fb..086e4ed2f 100644 --- a/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json +++ b/tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol.0.7.6.LocalShadowing.json @@ -4,10 +4,10 @@ "elements": [ { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 382, - "length": 8, + "start": 406, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -16,8 +16,8 @@ "lines": [ 25 ], - "starting_column": 30, - "ending_column": 38 + "starting_column": 54, + "ending_column": 59 }, "type_specific_fields": { "parent": { @@ -73,45 +73,38 @@ }, { "type": "variable", - "name": "__x", + "name": "y", "source_mapping": { - "start": 260, - "length": 12, + "start": 73, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 17 + 5 ], "starting_column": 5, - "ending_column": 17 + "ending_column": 15 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "FurtherExtendedContract", + "name": "BaseContract", "source_mapping": { - "start": 201, - "length": 239, + "start": 29, + "length": 57, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26 + 3, + 4, + 5, + 6 ], "starting_column": 1, "ending_column": 2 @@ -120,10 +113,10 @@ } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#17) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L17) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#5) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L5) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", + "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -132,10 +125,10 @@ "elements": [ { "type": "variable", - "name": "y", + "name": "v", "source_mapping": { - "start": 406, - "length": 5, + "start": 429, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -144,8 +137,8 @@ "lines": [ 25 ], - "starting_column": 54, - "ending_column": 59 + "starting_column": 77, + "ending_column": 83 }, "type_specific_fields": { "parent": { @@ -200,10 +193,10 @@ } }, { - "type": "variable", - "name": "y", + "type": "event", + "name": "v", "source_mapping": { - "start": 73, + "start": 187, "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -211,7 +204,7 @@ "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 5, "ending_column": 15 @@ -219,32 +212,36 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseContract", + "name": "ExtendedContract", "source_mapping": { - "start": 29, - "length": 57, + "start": 88, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6 + 8, + 9, + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 } - } + }, + "signature": "v()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- BaseContract.y (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#5) (state variable)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [BaseContract.y](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L5) (state variable)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L13) (event)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "465bd81cbb09a3d2cc84ea6102fb059296f1970e85e2d86a171f8219f1a34508", + "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -253,9 +250,9 @@ "elements": [ { "type": "variable", - "name": "z", + "name": "w", "source_mapping": { - "start": 413, + "start": 421, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -265,8 +262,8 @@ "lines": [ 25 ], - "starting_column": 61, - "ending_column": 67 + "starting_column": 69, + "ending_column": 75 }, "type_specific_fields": { "parent": { @@ -322,54 +319,61 @@ }, { "type": "function", - "name": "z", + "name": "w", "source_mapping": { - "start": 154, - "length": 27, + "start": 280, + "length": 71, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 11 + 20, + 21, + 22, + 23 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 6 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "ExtendedContract", + "name": "FurtherExtendedContract", "source_mapping": { - "start": 88, - "length": 111, + "start": 201, + "length": 239, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14 + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "z()" + "signature": "w()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#11) (function)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L11) (function)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#20-23) (modifier)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L20-L23) (modifier)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", + "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -378,10 +382,10 @@ "elements": [ { "type": "variable", - "name": "w", + "name": "__x", "source_mapping": { - "start": 421, - "length": 6, + "start": 382, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", @@ -390,8 +394,8 @@ "lines": [ 25 ], - "starting_column": 69, - "ending_column": 75 + "starting_column": 30, + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -446,24 +450,21 @@ } }, { - "type": "function", - "name": "w", + "type": "variable", + "name": "__x", "source_mapping": { - "start": 280, - "length": 71, + "start": 260, + "length": 12, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23 + 17 ], "starting_column": 5, - "ending_column": 6 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -493,15 +494,14 @@ "starting_column": 1, "ending_column": 2 } - }, - "signature": "w()" + } } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).w (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.w() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#20-23) (modifier)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).w](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.w()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L20-L23) (modifier)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- FurtherExtendedContract.__x (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#17) (state variable)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [FurtherExtendedContract.__x](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L17) (state variable)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "a94a2b9331482c75582868e6d3cc5c9b01487e7505f219abcf36a20d76e0b089", + "id": "cd61765f88a1447471f5c75c7a488af44534d81be3998f5d01a6b5fa8f693327", "check": "shadowing-local", "impact": "Low", "confidence": "High" @@ -510,9 +510,9 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "z", "source_mapping": { - "start": 429, + "start": 413, "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", @@ -522,8 +522,8 @@ "lines": [ 25 ], - "starting_column": 77, - "ending_column": 83 + "starting_column": 61, + "ending_column": 67 }, "type_specific_fields": { "parent": { @@ -578,21 +578,21 @@ } }, { - "type": "event", - "name": "v", + "type": "function", + "name": "z", "source_mapping": { - "start": 187, - "length": 10, + "start": 154, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 5, - "ending_column": 15 + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -619,14 +619,14 @@ "ending_column": 2 } }, - "signature": "v()" + "signature": "z()" } } ], - "description": "FurtherExtendedContract.shadowingParent(uint256).v (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContractv() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#13) (event)\n", - "markdown": "[FurtherExtendedContract.shadowingParent(uint256).v](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContractv()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L13) (event)\n", + "description": "FurtherExtendedContract.shadowingParent(uint256).z (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#25) shadows:\n\t- ExtendedContract.z() (tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#11) (function)\n", + "markdown": "[FurtherExtendedContract.shadowingParent(uint256).z](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25) shadows:\n\t- [ExtendedContract.z()](tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L11) (function)\n", "first_markdown_element": "tests/detectors/shadowing-local/0.7.6/shadowing_local_variable.sol#L25", - "id": "973e31cc30dc7a3e1f089dfa5848234075f237f78fa492c772b1083e12c79054", + "id": "e3d2948e9c1252fe84e0d7e58f6682af7af84ef209f6e71f039faccabf07b0bd", "check": "shadowing-local", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json b/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json index 5e92ed5a7..a079d019e 100644 --- a/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json +++ b/tests/detectors/solc-version/0.6.10/static.sol.0.6.10.IncorrectSolc.json @@ -1,5 +1,15 @@ [ [ + { + "elements": [], + "description": "solc-0.6.10 is not recommended for deployment\n", + "markdown": "solc-0.6.10 is not recommended for deployment\n", + "first_markdown_element": "", + "id": "b2c2f26d29a163098673e6dcb2342e00d94996a84040bac62f7dbb2f20fa8f28", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -35,16 +45,6 @@ "check": "solc-version", "impact": "Informational", "confidence": "High" - }, - { - "elements": [], - "description": "solc-0.6.10 is not recommended for deployment\n", - "markdown": "solc-0.6.10 is not recommended for deployment\n", - "first_markdown_element": "", - "id": "b2c2f26d29a163098673e6dcb2342e00d94996a84040bac62f7dbb2f20fa8f28", - "check": "solc-version", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json b/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json index 66976b6a6..0f03e7d15 100644 --- a/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json +++ b/tests/detectors/solc-version/0.7.4/static.sol.0.7.4.IncorrectSolc.json @@ -1,5 +1,15 @@ [ [ + { + "elements": [], + "description": "solc-0.7.4 is not recommended for deployment\n", + "markdown": "solc-0.7.4 is not recommended for deployment\n", + "first_markdown_element": "", + "id": "27e54a3813c974274b355c03bd742d4f2b8cd63fa57143b4fb741cbecd022dd2", + "check": "solc-version", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -35,16 +45,6 @@ "check": "solc-version", "impact": "Informational", "confidence": "High" - }, - { - "elements": [], - "description": "solc-0.7.4 is not recommended for deployment\n", - "markdown": "solc-0.7.4 is not recommended for deployment\n", - "first_markdown_element": "", - "id": "27e54a3813c974274b355c03bd742d4f2b8cd63fa57143b4fb741cbecd022dd2", - "check": "solc-version", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol.0.5.10.StorageSignedIntegerArray.json b/tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol.0.5.10.StorageSignedIntegerArray.json index f1087d83f..9f3a635e5 100644 --- a/tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol.0.5.10.StorageSignedIntegerArray.json +++ b/tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol.0.5.10.StorageSignedIntegerArray.json @@ -64,19 +64,19 @@ }, { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 355, - "length": 132, + "start": 601, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -142,42 +142,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(int128[3])" } }, { "type": "node", - "name": "intArray = (- 1,- 2,- 3)", + "name": "intArray = userArray", "source_mapping": { - "start": 384, - "length": 23, + "start": 746, + "length": 20, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 11 + 16 ], "starting_column": 5, - "ending_column": 28 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 355, - "length": 132, + "start": 601, + "length": 170, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12 + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -243,16 +243,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1(int128[3])" } } } } ], - "description": "Contract A (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#3-45) \n\t- Function A.bad0() (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#10-12)\n\t\t- intArray = (- 1,- 2,- 3) (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#11) has a storage signed integer array assignment\n", - "markdown": "Contract [A](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45) \n\t- Function [A.bad0()](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L10-L12)\n\t\t- [intArray = (- 1,- 2,- 3)](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L11) has a storage signed integer array assignment\n", + "description": "Contract A (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#3-45) \n\t- Function A.bad1(int128[3]) (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#15-17)\n\t\t- intArray = userArray (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#16) has a storage signed integer array assignment\n", + "markdown": "Contract [A](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45) \n\t- Function [A.bad1(int128[3])](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L15-L17)\n\t\t- [intArray = userArray](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L16) has a storage signed integer array assignment\n", "first_markdown_element": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45", - "id": "da870be9a396bc52d2f6f8caeb00e6b8809ad1b6fb4c24a019568257b3404a2f", + "id": "7ba5efbfb61ba63a7ac01d376a0cede2fda18c2a2d8604c4a82cccec92ae2bdb", "check": "storage-array", "impact": "High", "confidence": "Medium" @@ -321,19 +321,19 @@ }, { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 601, - "length": 170, + "start": 355, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -399,42 +399,42 @@ "ending_column": 2 } }, - "signature": "bad1(int128[3])" + "signature": "bad0()" } }, { "type": "node", - "name": "intArray = userArray", + "name": "intArray = (- 1,- 2,- 3)", "source_mapping": { - "start": 746, - "length": 20, + "start": 384, + "length": 23, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 16 + 11 ], "starting_column": 5, - "ending_column": 25 + "ending_column": 28 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 601, - "length": 170, + "start": 355, + "length": 132, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol", "is_dependency": false, "lines": [ - 15, - 16, - 17 + 10, + 11, + 12 ], "starting_column": 3, "ending_column": 4 @@ -500,16 +500,16 @@ "ending_column": 2 } }, - "signature": "bad1(int128[3])" + "signature": "bad0()" } } } } ], - "description": "Contract A (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#3-45) \n\t- Function A.bad1(int128[3]) (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#15-17)\n\t\t- intArray = userArray (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#16) has a storage signed integer array assignment\n", - "markdown": "Contract [A](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45) \n\t- Function [A.bad1(int128[3])](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L15-L17)\n\t\t- [intArray = userArray](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L16) has a storage signed integer array assignment\n", + "description": "Contract A (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#3-45) \n\t- Function A.bad0() (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#10-12)\n\t\t- intArray = (- 1,- 2,- 3) (tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#11) has a storage signed integer array assignment\n", + "markdown": "Contract [A](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45) \n\t- Function [A.bad0()](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L10-L12)\n\t\t- [intArray = (- 1,- 2,- 3)](tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L11) has a storage signed integer array assignment\n", "first_markdown_element": "tests/detectors/storage-array/0.5.10/storage_signed_integer_array.sol#L3-L45", - "id": "7ba5efbfb61ba63a7ac01d376a0cede2fda18c2a2d8604c4a82cccec92ae2bdb", + "id": "da870be9a396bc52d2f6f8caeb00e6b8809ad1b6fb4c24a019568257b3404a2f", "check": "storage-array", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json b/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json index 84c033bd8..08e972fe3 100644 --- a/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json +++ b/tests/detectors/timestamp/0.4.25/timestamp.sol.0.4.25.Timestamp.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +59,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 81, - "length": 29, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 14 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +137,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.4.25/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6", - "id": "9d7c44d1a332d53aacc312d316891fc85c62db8b5a5a638a64cdb718c9f20029", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.4.25/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.4.25/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.4.25/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15", + "id": "2182d79d032d47fdf8137bc06dd7d4c1796356e19fab558e282f5d596391ec58", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +155,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +210,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +288,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.4.25/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11", - "id": "d2f6167c2351e267210692e16350d8426db102519fe3eaeeadb6d17d2445dbbd", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.4.25/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6", + "id": "9d7c44d1a332d53aacc312d316891fc85c62db8b5a5a638a64cdb718c9f20029", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +306,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +362,43 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 10 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.4.25/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.4.25/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.4.25/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15", - "id": "2182d79d032d47fdf8137bc06dd7d4c1796356e19fab558e282f5d596391ec58", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.4.25/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11", + "id": "d2f6167c2351e267210692e16350d8426db102519fe3eaeeadb6d17d2445dbbd", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json b/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json index 93e067ba7..d5a96fc97 100644 --- a/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json +++ b/tests/detectors/timestamp/0.5.16/timestamp.sol.0.5.16.Timestamp.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +60,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 81, - "length": 29, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +139,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.5.16/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6", - "id": "ae9cf69893e0e1a3487dc6ce8a8ae0f5ea9628607d77d32b3dfcb0202617d6e3", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.5.16/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11", + "id": "95b42362b948094ddfa2507b20840e67789d4c5d92e8e3ddac30f5b6577dc1cb", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +157,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +212,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.5.16/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.5.16/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +290,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.5.16/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L8-L11", - "id": "95b42362b948094ddfa2507b20840e67789d4c5d92e8e3ddac30f5b6577dc1cb", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.5.16/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.5.16/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.5.16/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.5.16/timestamp.sol#L4-L6", + "id": "ae9cf69893e0e1a3487dc6ce8a8ae0f5ea9628607d77d32b3dfcb0202617d6e3", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json b/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json index a933c4198..db2cda014 100644 --- a/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json +++ b/tests/detectors/timestamp/0.6.11/timestamp.sol.0.6.11.Timestamp.json @@ -4,19 +4,20 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +60,43 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 81, - "length": 29, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad1", "source_mapping": { - "start": 47, - "length": 70, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +139,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.6.11/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6", - "id": "e4e3a8ade3a3bd11b4788b70785548f81395e776a86f2940834731e8f5e05bdc", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.6.11/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11", + "id": "5d42d80cf0c66675f78bbf7717e2c532f05e8b0641d100c436ef8e1d6dc02f61", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +157,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 126, - "length": 96, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +212,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 197, - "length": 18, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 14 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 126, - "length": 96, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +290,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.6.11/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L8-L11", - "id": "5d42d80cf0c66675f78bbf7717e2c532f05e8b0641d100c436ef8e1d6dc02f61", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.6.11/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.6.11/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.6.11/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15", + "id": "c2c1fc5eaaf8498a2f03135fb61180314cbd104df5ab6b2447620b8ac3978cac", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +308,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 231, - "length": 79, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +363,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 5 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 231, - "length": 79, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.6.11/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.6.11/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.6.11/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.6.11/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.6.11/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L13-L15", - "id": "c2c1fc5eaaf8498a2f03135fb61180314cbd104df5ab6b2447620b8ac3978cac", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.6.11/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.6.11/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.6.11/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.6.11/timestamp.sol#L4-L6", + "id": "e4e3a8ade3a3bd11b4788b70785548f81395e776a86f2940834731e8f5e05bdc", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json b/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json index 5ac960dcc..37c8a90f7 100644 --- a/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json +++ b/tests/detectors/timestamp/0.7.6/timestamp.sol.0.7.6.Timestamp.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -59,42 +59,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "require(bool)(block.timestamp == 0)", + "name": "block.timestamp > 0", "source_mapping": { - "start": 81, - "length": 29, + "start": 279, + "length": 24, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 5 + 14 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 33 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 47, - "length": 70, + "start": 231, + "length": 79, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -137,16 +137,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "Timestamp.bad0() (tests/detectors/timestamp/0.7.6/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#5)\n", - "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L5)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6", - "id": "e776b1a35c5ff7cecd1cf6eba25c7017c852dfab68d0aaa8b2c8ecaf97b69a6b", + "description": "Timestamp.bad2() (tests/detectors/timestamp/0.7.6/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.7.6/timestamp.sol#14)\n", + "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.7.6/timestamp.sol#L14)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15", + "id": "11b3472709ff3f3a4b3ec47abaa5a62f8dbfcd3b0b6bea0972f5b3d790049130", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -155,20 +155,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -211,43 +210,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", - "name": "require(bool)(time == 0)", + "name": "require(bool)(block.timestamp == 0)", "source_mapping": { - "start": 197, - "length": 18, + "start": 81, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 10 + 5 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 126, - "length": 96, + "start": 47, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10, - 11 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -290,16 +288,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "Timestamp.bad1() (tests/detectors/timestamp/0.7.6/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#10)\n", - "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L10)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11", - "id": "fc05e44a41cc99fb6e68c9d8bfc8cbc97377f3327ed7a3c75ba170c9e75394d1", + "description": "Timestamp.bad0() (tests/detectors/timestamp/0.7.6/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#5)\n", + "markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L5)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L4-L6", + "id": "e776b1a35c5ff7cecd1cf6eba25c7017c852dfab68d0aaa8b2c8ecaf97b69a6b", "check": "timestamp", "impact": "Low", "confidence": "Medium" @@ -308,19 +306,20 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -363,42 +362,43 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "block.timestamp > 0", + "name": "require(bool)(time == 0)", "source_mapping": { - "start": 279, - "length": 24, + "start": 197, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 14 + 10 ], "starting_column": 9, - "ending_column": 33 + "ending_column": 27 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 231, - "length": 79, + "start": 126, + "length": 96, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/timestamp/0.7.6/timestamp.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/timestamp/0.7.6/timestamp.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15 + 8, + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -441,16 +441,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "Timestamp.bad2() (tests/detectors/timestamp/0.7.6/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.7.6/timestamp.sol#14)\n", - "markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.7.6/timestamp.sol#L14)\n", - "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L13-L15", - "id": "11b3472709ff3f3a4b3ec47abaa5a62f8dbfcd3b0b6bea0972f5b3d790049130", + "description": "Timestamp.bad1() (tests/detectors/timestamp/0.7.6/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.7.6/timestamp.sol#10)\n", + "markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.7.6/timestamp.sol#L10)\n", + "first_markdown_element": "tests/detectors/timestamp/0.7.6/timestamp.sol#L8-L11", + "id": "fc05e44a41cc99fb6e68c9d8bfc8cbc97377f3327ed7a3c75ba170c9e75394d1", "check": "timestamp", "impact": "Low", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json b/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json index a866423ae..1ece15736 100644 --- a/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.4.25/too_many_digits.sol.0.4.25.TooManyDigits.json @@ -86,20 +86,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 209, - "length": 18, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 12 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -187,10 +187,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L12)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "33591d733ce2e17a001b912024d5bbe2fd89b63811968c715cf1feed5e302ef1", + "id": "07b9feef94432fdda97b5b5f32b4b6acfa23801e48f9fbd9997c5c3142c56474", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "3e08ab6e8312a9489e23b50c6252a0ae7db88a7fc2c9d83c34d6d8aceb634d08", + "description": "C.h() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24", + "id": "2ae61bfeb6a9bad69fe9cb1990583dae50614da8a86cc9a720493218e11e0aa5", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 272, - "length": 29, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "07b9feef94432fdda97b5b5f32b4b6acfa23801e48f9fbd9997c5c3142c56474", + "id": "33591d733ce2e17a001b912024d5bbe2fd89b63811968c715cf1feed5e302ef1", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", - "id": "809a1adef5afed04cc3371628a1595dd47bb1b1003a9e0cc6be72987c4034345", + "id": "3e08ab6e8312a9489e23b50c6252a0ae7db88a7fc2c9d83c34d6d8aceb634d08", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,14 +857,14 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x4 = 100000", "source_mapping": { - "start": 512, + "start": 311, "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", @@ -874,7 +872,7 @@ "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 13 ], "starting_column": 9, "ending_column": 25 @@ -882,21 +880,23 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L20-L24", - "id": "2ae61bfeb6a9bad69fe9cb1990583dae50614da8a86cc9a720493218e11e0aa5", + "description": "C.f() (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L13)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.4.25/too_many_digits.sol#L9-L15", + "id": "809a1adef5afed04cc3371628a1595dd47bb1b1003a9e0cc6be72987c4034345", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json b/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json index 5d5827e21..012c9cb75 100644 --- a/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.5.16/too_many_digits.sol.0.5.16.TooManyDigits.json @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "ae48ab82ba202c409ec056e498d7255162ef5ab54ddb9ced3b46feb51f4c5021", + "description": "C.h() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24", + "id": "2ca6b97b24a0e595f484c9a0090c3b17b654c167be300e04d9c2cc9a44406d10", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x4 = 100000", "source_mapping": { - "start": 272, - "length": 29, + "start": 311, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 13 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L13)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "c295b48b8aece38cfd41bceca05ef1953bf5bf0018073076809087a4580ff086", + "id": "7e07e946fcdb14de3e3d3bc796f8f6aff17f22002129db4937e0d12767260d3d", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 11 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", - "id": "7e07e946fcdb14de3e3d3bc796f8f6aff17f22002129db4937e0d12767260d3d", + "id": "ae48ab82ba202c409ec056e498d7255162ef5ab54ddb9ced3b46feb51f4c5021", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,44 +857,46 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 512, - "length": 16, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 12 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L20-L24", - "id": "2ca6b97b24a0e595f484c9a0090c3b17b654c167be300e04d9c2cc9a44406d10", + "description": "C.f() (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L12)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.5.16/too_many_digits.sol#L9-L15", + "id": "c295b48b8aece38cfd41bceca05ef1953bf5bf0018073076809087a4580ff086", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json b/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json index c49da46de..4e96d8149 100644 --- a/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.6.11/too_many_digits.sol.0.6.11.TooManyDigits.json @@ -86,20 +86,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 209, - "length": 18, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 11 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -187,10 +187,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "d467d1c664634fc17c861de567ef53f0ce8964e9b337127308dad5d3cb0bc343", + "id": "302b9a771b1009999d212d50adb2b938ccf41f2c26880fe17060a8922ea4836a", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -199,23 +199,21 @@ "elements": [ { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -276,46 +274,44 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x2 = 100000", "source_mapping": { - "start": 237, - "length": 25, + "start": 512, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 22 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 25 }, "type_specific_fields": { "parent": { "type": "function", - "name": "f", + "name": "h", "source_mapping": { - "start": 177, - "length": 195, + "start": 456, + "length": 113, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11, - 12, - 13, - 14, - 15 + 20, + 21, + 22, + 23, + 24 ], "starting_column": 5, "ending_column": 6 @@ -376,16 +372,16 @@ "ending_column": 2 } }, - "signature": "f()" + "signature": "h()" } } } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L11)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "302b9a771b1009999d212d50adb2b938ccf41f2c26880fe17060a8922ea4836a", + "description": "C.h() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#22)\n", + "markdown": "[C.h()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L22)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24", + "id": "7cd1e51c89ae28bc9bf2c7e406b39f97a648cde765fc2a05c14697648ad27e92", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -476,20 +472,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x4 = 100000", "source_mapping": { - "start": 272, - "length": 29, + "start": 311, + "length": 16, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 13 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 25 }, "type_specific_fields": { "parent": { @@ -577,10 +573,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#13)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L13)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "ed4cd26212cad644e275c3784912d9fe2d0789a9cb731a1a20bfdb30554f6f3a", + "id": "b8986c1b09fc9896372df90e6b43a08dfb3e3a920bd002ab5ee9eb4a29f92d95", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -671,20 +667,20 @@ }, { "type": "node", - "name": "x4 = 100000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 311, - "length": 16, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 13 + 10 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -772,10 +768,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#13)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x4 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L13)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", - "id": "b8986c1b09fc9896372df90e6b43a08dfb3e3a920bd002ab5ee9eb4a29f92d95", + "id": "d467d1c664634fc17c861de567ef53f0ce8964e9b337127308dad5d3cb0bc343", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -784,21 +780,23 @@ "elements": [ { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -859,44 +857,46 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } }, { "type": "node", - "name": "x2 = 100000", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 512, - "length": 16, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 22 + 12 ], "starting_column": 9, - "ending_column": 25 + "ending_column": 38 }, "type_specific_fields": { "parent": { "type": "function", - "name": "h", + "name": "f", "source_mapping": { - "start": 456, - "length": 113, + "start": 177, + "length": 195, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24 + 9, + 10, + 11, + 12, + 13, + 14, + 15 ], "starting_column": 5, "ending_column": 6 @@ -957,16 +957,16 @@ "ending_column": 2 } }, - "signature": "h()" + "signature": "f()" } } } } ], - "description": "C.h() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#22)\n", - "markdown": "[C.h()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24) uses literals with too many digits:\n\t- [x2 = 100000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L22)\n", - "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L20-L24", - "id": "7cd1e51c89ae28bc9bf2c7e406b39f97a648cde765fc2a05c14697648ad27e92", + "description": "C.f() (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L12)\n", + "first_markdown_element": "tests/detectors/too-many-digits/0.6.11/too_many_digits.sol#L9-L15", + "id": "ed4cd26212cad644e275c3784912d9fe2d0789a9cb731a1a20bfdb30554f6f3a", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json b/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json index b62da518b..eb97dc505 100644 --- a/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json +++ b/tests/detectors/too-many-digits/0.7.6/too_many_digits.sol.0.7.6.TooManyDigits.json @@ -85,20 +85,20 @@ }, { "type": "node", - "name": "x1 = 0x000001", + "name": "x2 = 0x0000000000001", "source_mapping": { - "start": 209, - "length": 18, + "start": 237, + "length": 25, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 10 + 11 ], "starting_column": 9, - "ending_column": 27 + "ending_column": 34 }, "type_specific_fields": { "parent": { @@ -185,10 +185,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#10)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L10)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#11)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L11)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "a053c2f439e1e4ac84469e1aab54f4403d4ab14bf81bae6e7a3d2e489b3514bd", + "id": "41a60e2fb1f3a88adafd67ca77db4633849be26e1b8b9973b8bf9e8ea5a9d024", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -278,20 +278,20 @@ }, { "type": "node", - "name": "x2 = 0x0000000000001", + "name": "x3 = 1000000000000000000", "source_mapping": { - "start": 237, - "length": 25, + "start": 272, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 11 + 12 ], "starting_column": 9, - "ending_column": 34 + "ending_column": 38 }, "type_specific_fields": { "parent": { @@ -378,10 +378,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#11)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x2 = 0x0000000000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L11)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#12)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L12)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "41a60e2fb1f3a88adafd67ca77db4633849be26e1b8b9973b8bf9e8ea5a9d024", + "id": "4876b33b2a9fb13f6def960f7f9060cbf858f117079526017b1b35a928771680", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" @@ -471,20 +471,20 @@ }, { "type": "node", - "name": "x3 = 1000000000000000000", + "name": "x1 = 0x000001", "source_mapping": { - "start": 272, - "length": 29, + "start": 209, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol", "is_dependency": false, "lines": [ - 12 + 10 ], "starting_column": 9, - "ending_column": 38 + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -571,10 +571,10 @@ } } ], - "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#12)\n", - "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x3 = 1000000000000000000](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L12)\n", + "description": "C.f() (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001 (tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#10)\n", + "markdown": "[C.f()](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15) uses literals with too many digits:\n\t- [x1 = 0x000001](tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L10)\n", "first_markdown_element": "tests/detectors/too-many-digits/0.7.6/too_many_digits.sol#L9-L15", - "id": "4876b33b2a9fb13f6def960f7f9060cbf858f117079526017b1b35a928771680", + "id": "a053c2f439e1e4ac84469e1aab54f4403d4ab14bf81bae6e7a3d2e489b3514bd", "check": "too-many-digits", "impact": "Informational", "confidence": "Medium" diff --git a/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json b/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json index d201f65cf..19736cc16 100644 --- a/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json +++ b/tests/detectors/tx-origin/0.4.25/tx_origin.sol.0.4.25.TxOrigin.json @@ -4,19 +4,21 @@ "elements": [ { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 116, - "length": 60, + "start": 182, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -63,42 +65,44 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } }, { "type": "node", - "name": "require(bool)(tx.origin == owner)", + "name": "tx.origin != owner", "source_mapping": { - "start": 142, - "length": 27, + "start": 212, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 116, - "length": 60, + "start": 182, + "length": 89, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -145,16 +149,16 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } } } } ], - "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.4.25/tx_origin.sol#10)\n", - "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L10)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11", - "id": "b8173796b90a23f4587ed67d7100dfd3c890bf9f96910e177630bb8a6f1703fe", + "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.4.25/tx_origin.sol#14)\n", + "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L14)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17", + "id": "7abecda0c73eb43dadcd93458222d0848b1dee58af66887f81b9381c90e656f6", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" @@ -163,21 +167,19 @@ "elements": [ { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 182, - "length": 89, + "start": 116, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -224,44 +226,42 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } }, { "type": "node", - "name": "tx.origin != owner", + "name": "require(bool)(tx.origin == owner)", "source_mapping": { - "start": 212, - "length": 18, + "start": 142, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 182, - "length": 89, + "start": 116, + "length": 60, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.4.25/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -308,16 +308,16 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } } } } ], - "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.4.25/tx_origin.sol#14)\n", - "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L14)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L13-L17", - "id": "7abecda0c73eb43dadcd93458222d0848b1dee58af66887f81b9381c90e656f6", + "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.4.25/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.4.25/tx_origin.sol#10)\n", + "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.4.25/tx_origin.sol#L10)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.4.25/tx_origin.sol#L9-L11", + "id": "b8173796b90a23f4587ed67d7100dfd3c890bf9f96910e177630bb8a6f1703fe", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json b/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json index 2a8ec6848..ba4dcbb61 100644 --- a/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json +++ b/tests/detectors/tx-origin/0.7.6/tx_origin.sol.0.7.6.TxOrigin.json @@ -4,19 +4,21 @@ "elements": [ { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 130, - "length": 66, + "start": 202, + "length": 95, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -63,42 +65,44 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } }, { "type": "node", - "name": "require(bool)(tx.origin == owner)", + "name": "tx.origin != owner", "source_mapping": { - "start": 162, - "length": 27, + "start": 238, + "length": 18, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 10 + 14 ], - "starting_column": 9, - "ending_column": 36 + "starting_column": 13, + "ending_column": 31 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug0", + "name": "bug2", "source_mapping": { - "start": 130, - "length": 66, + "start": 202, + "length": 95, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 9, - 10, - 11 + 13, + 14, + 15, + 16, + 17 ], "starting_column": 5, "ending_column": 6 @@ -145,16 +149,16 @@ "ending_column": 2 } }, - "signature": "bug0()" + "signature": "bug2()" } } } } ], - "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.7.6/tx_origin.sol#10)\n", - "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L10)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11", - "id": "d3d9d4cb2307781870af54ebca528052197b021adcabf4d0c3a897e96affece3", + "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.7.6/tx_origin.sol#14)\n", + "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L14)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17", + "id": "1c195c6a3ea5b7e77c12b7580544ef2320699359862c22961726f112ab27b3a5", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" @@ -163,21 +167,19 @@ "elements": [ { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 202, - "length": 95, + "start": 130, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -224,44 +226,42 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } }, { "type": "node", - "name": "tx.origin != owner", + "name": "require(bool)(tx.origin == owner)", "source_mapping": { - "start": 238, - "length": 18, + "start": 162, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 14 + 10 ], - "starting_column": 13, - "ending_column": 31 + "starting_column": 9, + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bug2", + "name": "bug0", "source_mapping": { - "start": 202, - "length": 95, + "start": 130, + "length": 66, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/tx-origin/0.7.6/tx_origin.sol", "is_dependency": false, "lines": [ - 13, - 14, - 15, - 16, - 17 + 9, + 10, + 11 ], "starting_column": 5, "ending_column": 6 @@ -308,16 +308,16 @@ "ending_column": 2 } }, - "signature": "bug2()" + "signature": "bug0()" } } } } ], - "description": "TxOrigin.bug2() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/detectors/tx-origin/0.7.6/tx_origin.sol#14)\n", - "markdown": "[TxOrigin.bug2()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L14)\n", - "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L13-L17", - "id": "1c195c6a3ea5b7e77c12b7580544ef2320699359862c22961726f112ab27b3a5", + "description": "TxOrigin.bug0() (tests/detectors/tx-origin/0.7.6/tx_origin.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/detectors/tx-origin/0.7.6/tx_origin.sol#10)\n", + "markdown": "[TxOrigin.bug0()](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/detectors/tx-origin/0.7.6/tx_origin.sol#L10)\n", + "first_markdown_element": "tests/detectors/tx-origin/0.7.6/tx_origin.sol#L9-L11", + "id": "d3d9d4cb2307781870af54ebca528052197b021adcabf4d0c3a897e96affece3", "check": "tx-origin", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json index 86616d80a..db2e09b5b 100644 --- a/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol.0.4.25.UnimplementedFunctionDetection.json @@ -4,21 +4,23 @@ "elements": [ { "type": "contract", - "name": "DerivedContract_bad0", + "name": "DerivedContract_good", "source_mapping": { - "start": 185, - "length": 133, + "start": 775, + "length": 243, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 10, - 11, - 12, - 13, - 14 + 35, + 36, + 37, + 38, + 39, + 40, + 41 ], "starting_column": 1, "ending_column": 2 @@ -26,92 +28,126 @@ }, { "type": "function", - "name": "f2", + "name": "get", "source_mapping": { - "start": 72, - "length": 37, + "start": 495, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 3 + 24 ], "starting_column": 5, - "ending_column": 42 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface", + "name": "BaseInterface3", "source_mapping": { - "start": 0, - "length": 111, + "start": 465, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 1, - 2, - 3, - 4 + 23, + 24, + 25 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f2()" + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_good (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#35-41) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_good](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41", + "id": "08d3e8a72b5da6d189acb46ecd36f00787a87812727526a0cae248a2bac348fc", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 541, + "length": 232, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 } }, { "type": "function", - "name": "f3", + "name": "get", "source_mapping": { - "start": 144, - "length": 37, + "start": 495, + "length": 42, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 7 + 24 ], "starting_column": 5, - "ending_column": 42 + "ending_column": 47 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface2", + "name": "BaseInterface3", "source_mapping": { - "start": 113, - "length": 70, + "start": 465, + "length": 74, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 6, - 7, - 8 + 23, + 24, + 25 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f3()" + "signature": "get(uint256)" } } ], - "description": "DerivedContract_bad0 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#10-14) does not implement functions:\n\t- BaseInterface.f2() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#3)\n\t- BaseInterface2.f3() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#7)\n", - "markdown": "[DerivedContract_bad0](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14) does not implement functions:\n\t- [BaseInterface.f2()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L3)\n\t- [BaseInterface2.f3()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L7)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14", - "id": "8614d351f7aac0c05e8df6ef7c89c6b46a2b8acf6295c9d5a886ff6489c74a41", + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" @@ -120,22 +156,21 @@ "elements": [ { "type": "contract", - "name": "AbstractContract_bad1", + "name": "DerivedContract_bad0", "source_mapping": { - "start": 320, - "length": 143, + "start": 185, + "length": 133, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 10, + 11, + 12, + 13, + 14 ], "starting_column": 1, "ending_column": 2 @@ -143,9 +178,9 @@ }, { "type": "function", - "name": "f1", + "name": "f2", "source_mapping": { - "start": 357, + "start": 72, "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", @@ -153,7 +188,7 @@ "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 17 + 3 ], "starting_column": 5, "ending_column": 42 @@ -161,111 +196,74 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "AbstractContract_bad1", + "name": "BaseInterface", "source_mapping": { - "start": 320, - "length": 143, + "start": 0, + "length": 111, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 16, - 17, - 18, - 19, - 20, - 21 + 1, + 2, + 3, + 4 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "f1()" - } - } - ], - "description": "AbstractContract_bad1 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#16-21) does not implement functions:\n\t- AbstractContract_bad1.f1() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#17)\n", - "markdown": "[AbstractContract_bad1](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21) does not implement functions:\n\t- [AbstractContract_bad1.f1()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L17)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21", - "id": "adc202df4717efc4e19b549c0e623a79fac759a36bffb5d5e4aac401e33375d7", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 541, - "length": 232, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 + "signature": "f2()" } }, { "type": "function", - "name": "get", + "name": "f3", "source_mapping": { - "start": 495, - "length": 42, + "start": 144, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 24 + 7 ], "starting_column": 5, - "ending_column": 47 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface3", + "name": "BaseInterface2", "source_mapping": { - "start": 465, - "length": 74, + "start": 113, + "length": 70, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25 + 6, + 7, + 8 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "get(uint256)" + "signature": "f3()" } } ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "description": "DerivedContract_bad0 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#10-14) does not implement functions:\n\t- BaseInterface.f2() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#3)\n\t- BaseInterface2.f3() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#7)\n", + "markdown": "[DerivedContract_bad0](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14) does not implement functions:\n\t- [BaseInterface.f2()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L3)\n\t- [BaseInterface2.f3()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L7)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L10-L14", + "id": "8614d351f7aac0c05e8df6ef7c89c6b46a2b8acf6295c9d5a886ff6489c74a41", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" @@ -274,23 +272,22 @@ "elements": [ { "type": "contract", - "name": "DerivedContract_good", + "name": "AbstractContract_bad1", "source_mapping": { - "start": 775, - "length": 243, + "start": 320, + "length": 143, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 35, - 36, - 37, - 38, - 39, - 40, - 41 + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 @@ -298,50 +295,53 @@ }, { "type": "function", - "name": "get", + "name": "f1", "source_mapping": { - "start": 495, - "length": 42, + "start": 357, + "length": 37, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 24 + 17 ], "starting_column": 5, - "ending_column": 47 + "ending_column": 42 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "BaseInterface3", + "name": "AbstractContract_bad1", "source_mapping": { - "start": 465, - "length": 74, + "start": 320, + "length": 143, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol", "is_dependency": false, "lines": [ - 23, - 24, - 25 + 16, + 17, + 18, + 19, + 20, + 21 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "get(uint256)" + "signature": "f1()" } } ], - "description": "DerivedContract_good (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#35-41) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_good](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L35-L41", - "id": "08d3e8a72b5da6d189acb46ecd36f00787a87812727526a0cae248a2bac348fc", + "description": "AbstractContract_bad1 (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#16-21) does not implement functions:\n\t- AbstractContract_bad1.f1() (tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#17)\n", + "markdown": "[AbstractContract_bad1](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21) does not implement functions:\n\t- [AbstractContract_bad1.f1()](tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L17)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.4.25/unimplemented.sol#L16-L21", + "id": "adc202df4717efc4e19b549c0e623a79fac759a36bffb5d5e4aac401e33375d7", "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json index 418279203..638105ffb 100644 --- a/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol.0.6.11.UnimplementedFunctionDetection.json @@ -1,5 +1,81 @@ [ [ + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 593, + "length": 344, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "function", + "name": "get", + "source_mapping": { + "start": 539, + "length": 50, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 24 + ], + "starting_column": 5, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "BaseInterface3", + "source_mapping": { + "start": 500, + "length": 91, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -193,82 +269,6 @@ "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 593, - "length": 344, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "function", - "name": "get", - "source_mapping": { - "start": 539, - "length": 50, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 24 - ], - "starting_column": 5, - "ending_column": 55 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "BaseInterface3", - "source_mapping": { - "start": 500, - "length": 91, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol", - "is_dependency": false, - "lines": [ - 23, - 24, - 25 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "get(uint256)" - } - } - ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.6.11/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json b/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json index e3074383a..a835cdf9a 100644 --- a/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json +++ b/tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol.0.7.6.UnimplementedFunctionDetection.json @@ -1,5 +1,81 @@ [ [ + { + "elements": [ + { + "type": "contract", + "name": "DerivedContract_bad2", + "source_mapping": { + "start": 593, + "length": 344, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 27, + 28, + 29, + 30, + 31, + 32, + 33 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "function", + "name": "get", + "source_mapping": { + "start": 539, + "length": 50, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 24 + ], + "starting_column": 5, + "ending_column": 55 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "BaseInterface3", + "source_mapping": { + "start": 500, + "length": 91, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", + "is_dependency": false, + "lines": [ + 23, + 24, + 25 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "get(uint256)" + } + } + ], + "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#24)\n", + "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L24)\n", + "first_markdown_element": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33", + "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", + "check": "unimplemented-functions", + "impact": "Informational", + "confidence": "High" + }, { "elements": [ { @@ -193,82 +269,6 @@ "check": "unimplemented-functions", "impact": "Informational", "confidence": "High" - }, - { - "elements": [ - { - "type": "contract", - "name": "DerivedContract_bad2", - "source_mapping": { - "start": 593, - "length": 344, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 27, - 28, - 29, - 30, - 31, - 32, - 33 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "function", - "name": "get", - "source_mapping": { - "start": 539, - "length": 50, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 24 - ], - "starting_column": 5, - "ending_column": 55 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "BaseInterface3", - "source_mapping": { - "start": 500, - "length": 91, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol", - "is_dependency": false, - "lines": [ - 23, - 24, - 25 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "get(uint256)" - } - } - ], - "description": "DerivedContract_bad2 (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#27-33) does not implement functions:\n\t- BaseInterface3.get(uint256) (tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#24)\n", - "markdown": "[DerivedContract_bad2](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33) does not implement functions:\n\t- [BaseInterface3.get(uint256)](tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L24)\n", - "first_markdown_element": "tests/detectors/unimplemented-functions/0.7.6/unimplemented.sol#L27-L33", - "id": "31915d2f480e24ddd054de973440a02abdac0ccd6332c47cd4eb8d836d3fddda", - "check": "unimplemented-functions", - "impact": "Informational", - "confidence": "High" } ] ] \ No newline at end of file diff --git a/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json b/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json index 83bc555c0..42f3c9091 100644 --- a/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json +++ b/tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol.0.4.25.UninitializedFunctionPtrsConstructor.json @@ -4,23 +4,26 @@ "elements": [ { "type": "contract", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 27, - "length": 149, + "start": 486, + "length": 199, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 @@ -28,39 +31,38 @@ }, { "type": "node", - "name": "a(10)", + "name": "s.a(10)", "source_mapping": { - "start": 164, - "length": 5, + "start": 671, + "length": 7, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 7 + 27 ], "starting_column": 5, - "ending_column": 10 + "ending_column": 12 }, "type_specific_fields": { "parent": { "type": "function", "name": "constructor", "source_mapping": { - "start": 45, - "length": 129, + "start": 628, + "length": 55, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6, - 7, - 8 + 25, + 26, + 27, + 28 ], "starting_column": 3, "ending_column": 4 @@ -68,23 +70,26 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 27, - "length": 149, + "start": 486, + "length": 199, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29 ], "starting_column": 1, "ending_column": 2 @@ -96,10 +101,10 @@ } } ], - "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9", - "id": "38a85244054f0e06f1d3b476742113d0cf1cbe82b6c2a16f6abfa8cb7611aa2d", + "description": "Contract bad2 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#20-29) \n\t s.a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#27) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad2](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29) \n\t [s.a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L27) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29", + "id": "1b01aa44445395d800ebe53b807c6884d1c5fc96d38f255bc402e1b339a8a6f2", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -108,24 +113,23 @@ "elements": [ { "type": "contract", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 178, - "length": 306, + "start": 27, + "length": 149, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 + 3, + 4, + 5, + 6, + 7, + 8, + 9 ], "starting_column": 1, "ending_column": 2 @@ -133,9 +137,9 @@ }, { "type": "node", - "name": "b(10)", + "name": "a(10)", "source_mapping": { - "start": 472, + "start": 164, "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", @@ -143,7 +147,7 @@ "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 16 + 7 ], "starting_column": 5, "ending_column": 10 @@ -153,20 +157,19 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 196, - "length": 286, + "start": 45, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14, - 15, - 16, - 17 + 4, + 5, + 6, + 7, + 8 ], "starting_column": 3, "ending_column": 4 @@ -174,24 +177,23 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 178, - "length": 306, + "start": 27, + "length": 149, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 + 3, + 4, + 5, + 6, + 7, + 8, + 9 ], "starting_column": 1, "ending_column": 2 @@ -203,10 +205,10 @@ } } ], - "description": "Contract bad1 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#11-18) \n\t b(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#16) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad1](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18) \n\t [b(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L16) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18", - "id": "eca46630e741d928b03312539f0e9ddfb182cb16b0425b5ff881a7800a50511e", + "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L3-L9", + "id": "38a85244054f0e06f1d3b476742113d0cf1cbe82b6c2a16f6abfa8cb7611aa2d", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -215,26 +217,28 @@ "elements": [ { "type": "contract", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 486, - "length": 199, + "start": 687, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42 ], "starting_column": 1, "ending_column": 2 @@ -242,38 +246,38 @@ }, { "type": "node", - "name": "s.a(10)", + "name": "a(10)", "source_mapping": { - "start": 671, - "length": 7, + "start": 858, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 27 + 36 ], "starting_column": 5, - "ending_column": 12 + "ending_column": 10 }, "type_specific_fields": { "parent": { "type": "function", "name": "constructor", "source_mapping": { - "start": 628, - "length": 55, + "start": 831, + "length": 50, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 25, - 26, - 27, - 28 + 35, + 36, + 37, + 38 ], "starting_column": 3, "ending_column": 4 @@ -281,26 +285,28 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 486, - "length": 199, + "start": 687, + "length": 269, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29 + 31, + 32, + 33, + 34, + 35, + 36, + 37, + 38, + 39, + 40, + 41, + 42 ], "starting_column": 1, "ending_column": 2 @@ -312,10 +318,10 @@ } } ], - "description": "Contract bad2 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#20-29) \n\t s.a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#27) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad2](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29) \n\t [s.a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L27) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L20-L29", - "id": "1b01aa44445395d800ebe53b807c6884d1c5fc96d38f255bc402e1b339a8a6f2", + "description": "Contract bad3 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#31-42) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#36) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad3](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L36) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42", + "id": "4bfb037a7504ad1a677e70cdba68b2b4d47f485e4c0d039ac0a6364465b4e56e", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" @@ -324,28 +330,24 @@ "elements": [ { "type": "contract", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 687, - "length": 269, + "start": 178, + "length": 306, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -353,9 +355,9 @@ }, { "type": "node", - "name": "a(10)", + "name": "b(10)", "source_mapping": { - "start": 858, + "start": 472, "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", @@ -363,7 +365,7 @@ "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 36 + 16 ], "starting_column": 5, "ending_column": 10 @@ -373,18 +375,20 @@ "type": "function", "name": "constructor", "source_mapping": { - "start": 831, - "length": 50, + "start": 196, + "length": 286, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 35, - 36, - 37, - 38 + 12, + 13, + 14, + 15, + 16, + 17 ], "starting_column": 3, "ending_column": 4 @@ -392,28 +396,24 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 687, - "length": 269, + "start": 178, + "length": 306, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol", "is_dependency": false, "lines": [ - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18 ], "starting_column": 1, "ending_column": 2 @@ -425,10 +425,10 @@ } } ], - "description": "Contract bad3 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#31-42) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#36) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad3](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L36) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L31-L42", - "id": "4bfb037a7504ad1a677e70cdba68b2b4d47f485e4c0d039ac0a6364465b4e56e", + "description": "Contract bad1 (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#11-18) \n\t b(10) (tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#16) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad1](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18) \n\t [b(10)](tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L16) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.4.25/uninitialized_function_ptr_constructor.sol#L11-L18", + "id": "eca46630e741d928b03312539f0e9ddfb182cb16b0425b5ff881a7800a50511e", "check": "uninitialized-fptr-cst", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json b/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json index 3c3591c5d..7935b85b3 100644 --- a/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json +++ b/tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol.0.5.8.UninitializedFunctionPtrsConstructor.json @@ -1,109 +1,5 @@ [ [ - { - "elements": [ - { - "type": "contract", - "name": "bad0", - "source_mapping": { - "start": 27, - "length": 149, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - { - "type": "node", - "name": "a(10)", - "source_mapping": { - "start": 164, - "length": 5, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 7 - ], - "starting_column": 5, - "ending_column": 10 - }, - "type_specific_fields": { - "parent": { - "type": "function", - "name": "constructor", - "source_mapping": { - "start": 45, - "length": 129, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 4, - 5, - 6, - 7, - 8 - ], - "starting_column": 3, - "ending_column": 4 - }, - "type_specific_fields": { - "parent": { - "type": "contract", - "name": "bad0", - "source_mapping": { - "start": 27, - "length": 149, - "filename_used": "/GENERIC_PATH", - "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "filename_absolute": "/GENERIC_PATH", - "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", - "is_dependency": false, - "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9 - ], - "starting_column": 1, - "ending_column": 2 - } - }, - "signature": "constructor()" - } - } - } - } - ], - "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", - "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", - "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9", - "id": "e1e469fcf69ffbf93884287be133945396a1a363e77db02f241c90027f19bf48", - "check": "uninitialized-fptr-cst", - "impact": "Low", - "confidence": "High" - }, { "elements": [ { @@ -320,6 +216,110 @@ "impact": "Low", "confidence": "High" }, + { + "elements": [ + { + "type": "contract", + "name": "bad0", + "source_mapping": { + "start": 27, + "length": 149, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + { + "type": "node", + "name": "a(10)", + "source_mapping": { + "start": 164, + "length": 5, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 7 + ], + "starting_column": 5, + "ending_column": 10 + }, + "type_specific_fields": { + "parent": { + "type": "function", + "name": "constructor", + "source_mapping": { + "start": 45, + "length": 129, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 4, + 5, + 6, + 7, + 8 + ], + "starting_column": 3, + "ending_column": 4 + }, + "type_specific_fields": { + "parent": { + "type": "contract", + "name": "bad0", + "source_mapping": { + "start": 27, + "length": 149, + "filename_used": "/GENERIC_PATH", + "filename_relative": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "filename_absolute": "/GENERIC_PATH", + "filename_short": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol", + "is_dependency": false, + "lines": [ + 3, + 4, + 5, + 6, + 7, + 8, + 9 + ], + "starting_column": 1, + "ending_column": 2 + } + }, + "signature": "constructor()" + } + } + } + } + ], + "description": "Contract bad0 (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#3-9) \n\t a(10) (tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#7) is an unintialized function pointer call in a constructor\n", + "markdown": "Contract [bad0](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9) \n\t [a(10)](tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L7) is an unintialized function pointer call in a constructor\n", + "first_markdown_element": "tests/detectors/uninitialized-fptr-cst/0.5.8/uninitialized_function_ptr_constructor.sol#L3-L9", + "id": "e1e469fcf69ffbf93884287be133945396a1a363e77db02f241c90027f19bf48", + "check": "uninitialized-fptr-cst", + "impact": "Low", + "confidence": "High" + }, { "elements": [ { diff --git a/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json index 7cffff3a3..90dd94c8d 100644 --- a/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.4.25/uninitialized.sol.0.4.25.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 58, - "length": 19, + "start": 698, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 24 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 29, - "length": 140, + "start": 644, + "length": 354, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 84, - "length": 82, + "start": 878, + "length": 117, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 29, - "length": 140, + "start": 644, + "length": 354, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 698, - "length": 15, + "start": 751, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 878, - "length": 117, + "start": 820, + "length": 52, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 751, - "length": 6, + "start": 58, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 644, - "length": 354, + "start": 29, + "length": 140, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 820, - "length": 52, + "start": 84, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 644, - "length": 354, + "start": 29, + "length": 140, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.4.25/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json index b57293e93..0c996ec25 100644 --- a/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.5.16/uninitialized.sol.0.5.16.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.5.16/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json index e82e93548..63c5067ce 100644 --- a/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.6.11/uninitialized.sol.0.6.11.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.6.11/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json b/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json index a35c50194..c27eb6c1e 100644 --- a/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json +++ b/tests/detectors/uninitialized-state/0.7.6/uninitialized.sol.0.7.6.UninitializedStateVarsDetection.json @@ -4,43 +4,51 @@ "elements": [ { "type": "variable", - "name": "destination", + "name": "st", "source_mapping": { - "start": 57, - "length": 27, + "start": 729, + "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 5 + 45 ], "starting_column": 5, - "ending_column": 32 + "ending_column": 20 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 @@ -50,19 +58,20 @@ }, { "type": "function", - "name": "transfer", + "name": "use", "source_mapping": { - "start": 91, - "length": 82, + "start": 916, + "length": 129, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 7, - 8, - 9 + 53, + 54, + 55, + 56 ], "starting_column": 5, "ending_column": 6 @@ -70,38 +79,46 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Uninitialized", + "name": "Test2", "source_mapping": { - "start": 28, - "length": 148, + "start": 675, + "length": 373, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 + 42, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "transfer()" + "signature": "use()" } } ], - "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#7-9)\n", - "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L7-L9)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5", - "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", + "description": "Test2.st (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#53-56)\n", + "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L53-L56)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45", + "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -227,20 +244,20 @@ "elements": [ { "type": "variable", - "name": "st", + "name": "v", "source_mapping": { - "start": 729, - "length": 15, + "start": 782, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 45 + 47 ], "starting_column": 5, - "ending_column": 20 + "ending_column": 11 }, "type_specific_fields": { "parent": { @@ -281,20 +298,19 @@ }, { "type": "function", - "name": "use", + "name": "init", "source_mapping": { - "start": 916, - "length": 129, + "start": 851, + "length": 59, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 53, - 54, - 55, - 56 + 49, + 50, + 51 ], "starting_column": 5, "ending_column": 6 @@ -334,14 +350,14 @@ "ending_column": 2 } }, - "signature": "use()" + "signature": "init()" } } ], - "description": "Test2.st (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#45) is never initialized. It is used in:\n\t- Test2.use() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#53-56)\n", - "markdown": "[Test2.st](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45) is never initialized. It is used in:\n\t- [Test2.use()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L53-L56)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L45", - "id": "427f100397f455d8000eff7b1d2463763ca8e452d5d98f7b7de693fd5e625a32", + "description": "Test2.v (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#49-51)\n", + "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L49-L51)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47", + "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", "check": "uninitialized-state", "impact": "High", "confidence": "High" @@ -350,51 +366,43 @@ "elements": [ { "type": "variable", - "name": "v", + "name": "destination", "source_mapping": { - "start": 782, - "length": 6, + "start": 57, + "length": 27, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 47 + 5 ], "starting_column": 5, - "ending_column": 11 + "ending_column": 32 }, "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 @@ -404,19 +412,19 @@ }, { "type": "function", - "name": "init", + "name": "transfer", "source_mapping": { - "start": 851, - "length": 59, + "start": 91, + "length": 82, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 49, - 50, - 51 + 7, + 8, + 9 ], "starting_column": 5, "ending_column": 6 @@ -424,46 +432,38 @@ "type_specific_fields": { "parent": { "type": "contract", - "name": "Test2", + "name": "Uninitialized", "source_mapping": { - "start": 675, - "length": 373, + "start": 28, + "length": 148, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol", "is_dependency": false, "lines": [ - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 ], "starting_column": 1, "ending_column": 2 } }, - "signature": "init()" + "signature": "transfer()" } } ], - "description": "Test2.v (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#47) is never initialized. It is used in:\n\t- Test2.init() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#49-51)\n", - "markdown": "[Test2.v](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47) is never initialized. It is used in:\n\t- [Test2.init()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L49-L51)\n", - "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L47", - "id": "bf96eee949943a12926cf1407a2df2b07e99b30a6fc2e78aebf088cdefcf77a7", + "description": "Uninitialized.destination (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#5) is never initialized. It is used in:\n\t- Uninitialized.transfer() (tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#7-9)\n", + "markdown": "[Uninitialized.destination](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5) is never initialized. It is used in:\n\t- [Uninitialized.transfer()](tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L7-L9)\n", + "first_markdown_element": "tests/detectors/uninitialized-state/0.7.6/uninitialized.sol#L5", + "id": "e4711aebbd53922a9fe1e728917bf8e98eac065305e20d766b6b552debe79e44", "check": "uninitialized-state", "impact": "High", "confidence": "High" diff --git a/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json b/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json index 91aed0691..520599b12 100644 --- a/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json +++ b/tests/detectors/unused-return/0.4.25/unused_return.sol.0.4.25.UnusedReturnValues.json @@ -72,20 +72,20 @@ }, { "type": "node", - "name": "t.f()", + "name": "a.add(0)", "source_mapping": { - "start": 279, - "length": 5, + "start": 353, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.4.25/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.4.25/unused_return.sol", "is_dependency": false, "lines": [ - 18 + 22 ], "starting_column": 9, - "ending_column": 14 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -159,10 +159,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.4.25/unused_return.sol#18)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.4.25/unused_return.sol#L18)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.4.25/unused_return.sol#22)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.4.25/unused_return.sol#L22)\n", "first_markdown_element": "tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29", - "id": "73c54c292f1f2fb8a8d88b230cd0bf2da3bc8fff0d758b009839ca883b36c84e", + "id": "619bba0a79919e4f53e583a88cd4e32f204489c8d86e365a20bf3f9ce4c0f542", "check": "unused-return", "impact": "Medium", "confidence": "Medium" @@ -239,20 +239,20 @@ }, { "type": "node", - "name": "a.add(0)", + "name": "t.f()", "source_mapping": { - "start": 353, - "length": 8, + "start": 279, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.4.25/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.4.25/unused_return.sol", "is_dependency": false, "lines": [ - 22 + 18 ], "starting_column": 9, - "ending_column": 17 + "ending_column": 14 }, "type_specific_fields": { "parent": { @@ -326,10 +326,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.4.25/unused_return.sol#22)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.4.25/unused_return.sol#L22)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.4.25/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.4.25/unused_return.sol#18)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.4.25/unused_return.sol#L18)\n", "first_markdown_element": "tests/detectors/unused-return/0.4.25/unused_return.sol#L17-L29", - "id": "619bba0a79919e4f53e583a88cd4e32f204489c8d86e365a20bf3f9ce4c0f542", + "id": "73c54c292f1f2fb8a8d88b230cd0bf2da3bc8fff0d758b009839ca883b36c84e", "check": "unused-return", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json b/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json index 37152b359..65b2400b1 100644 --- a/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json +++ b/tests/detectors/unused-return/0.7.6/unused_return.sol.0.7.6.UnusedReturnValues.json @@ -72,20 +72,20 @@ }, { "type": "node", - "name": "t.f()", + "name": "a.add(0)", "source_mapping": { - "start": 296, - "length": 5, + "start": 370, + "length": 8, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.7.6/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.7.6/unused_return.sol", "is_dependency": false, "lines": [ - 18 + 22 ], "starting_column": 9, - "ending_column": 14 + "ending_column": 17 }, "type_specific_fields": { "parent": { @@ -159,10 +159,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.7.6/unused_return.sol#18)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.7.6/unused_return.sol#L18)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.7.6/unused_return.sol#22)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.7.6/unused_return.sol#L22)\n", "first_markdown_element": "tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29", - "id": "d5027a5d25ac3528c0d03d48a3bbd9ef6ea582b2a286b47e8e7f741c26c35634", + "id": "3774dfb7de028a13f2945c0e19a075ffb1fb27a7785aaaf79dff863f7f1bbec7", "check": "unused-return", "impact": "Medium", "confidence": "Medium" @@ -239,20 +239,20 @@ }, { "type": "node", - "name": "a.add(0)", + "name": "t.f()", "source_mapping": { - "start": 370, - "length": 8, + "start": 296, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-return/0.7.6/unused_return.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/unused-return/0.7.6/unused_return.sol", "is_dependency": false, "lines": [ - 22 + 18 ], "starting_column": 9, - "ending_column": 17 + "ending_column": 14 }, "type_specific_fields": { "parent": { @@ -326,10 +326,10 @@ } } ], - "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by a.add(0) (tests/detectors/unused-return/0.7.6/unused_return.sol#22)\n", - "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [a.add(0)](tests/detectors/unused-return/0.7.6/unused_return.sol#L22)\n", + "description": "User.test(Target) (tests/detectors/unused-return/0.7.6/unused_return.sol#17-29) ignores return value by t.f() (tests/detectors/unused-return/0.7.6/unused_return.sol#18)\n", + "markdown": "[User.test(Target)](tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29) ignores return value by [t.f()](tests/detectors/unused-return/0.7.6/unused_return.sol#L18)\n", "first_markdown_element": "tests/detectors/unused-return/0.7.6/unused_return.sol#L17-L29", - "id": "3774dfb7de028a13f2945c0e19a075ffb1fb27a7785aaaf79dff863f7f1bbec7", + "id": "d5027a5d25ac3528c0d03d48a3bbd9ef6ea582b2a286b47e8e7f741c26c35634", "check": "unused-return", "impact": "Medium", "confidence": "Medium" diff --git a/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json b/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json index ba44c43a3..2356dda78 100644 --- a/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.4.25/unused_state.sol.0.4.25.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.4.25/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.4.25/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.4.25/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.4.25/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.4.25/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.4.25/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.4.25/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.4.25/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.4.25/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.4.25/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.4.25/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.4.25/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.4.25/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.4.25/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.4.25/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.4.25/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.4.25/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json b/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json index 5f3f1b7d0..6858e129b 100644 --- a/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.5.16/unused_state.sol.0.5.16.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.5.16/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.5.16/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.5.16/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.5.16/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.5.16/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.5.16/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.5.16/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.5.16/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.5.16/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.5.16/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.5.16/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.5.16/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.5.16/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.5.16/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.5.16/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.5.16/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.5.16/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json b/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json index ee43e3df6..357b5d4f1 100644 --- a/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.6.11/unused_state.sol.0.6.11.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.6.11/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.6.11/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.6.11/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.6.11/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.6.11/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.6.11/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.6.11/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.6.11/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.6.11/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.6.11/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.6.11/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.6.11/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.6.11/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.6.11/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.6.11/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.6.11/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.6.11/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json b/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json index 7bf0db31b..7eedbf232 100644 --- a/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json +++ b/tests/detectors/unused-state/0.7.6/unused_state.sol.0.7.6.UnusedStateVars.json @@ -82,9 +82,9 @@ "elements": [ { "type": "variable", - "name": "unused2", + "name": "unused4", "source_mapping": { - "start": 64, + "start": 106, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -92,7 +92,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 5 + 7 ], "starting_column": 5, "ending_column": 20 @@ -148,10 +148,10 @@ } } ], - "description": "A.unused2 (tests/detectors/unused-state/0.7.6/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused2](tests/detectors/unused-state/0.7.6/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L5", - "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", + "description": "A.unused4 (tests/detectors/unused-state/0.7.6/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused4](tests/detectors/unused-state/0.7.6/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L7", + "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -160,9 +160,9 @@ "elements": [ { "type": "variable", - "name": "unused3", + "name": "unused2", "source_mapping": { - "start": 85, + "start": 64, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -170,7 +170,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 6 + 5 ], "starting_column": 5, "ending_column": 20 @@ -226,10 +226,10 @@ } } ], - "description": "A.unused3 (tests/detectors/unused-state/0.7.6/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused3](tests/detectors/unused-state/0.7.6/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L6", - "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", + "description": "A.unused2 (tests/detectors/unused-state/0.7.6/unused_state.sol#5) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused2](tests/detectors/unused-state/0.7.6/unused_state.sol#L5) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L5", + "id": "886250d01813743573f3d311b742e0f818e0012ccbf8ad97738c029fd129d870", "check": "unused-state", "impact": "Informational", "confidence": "High" @@ -238,9 +238,9 @@ "elements": [ { "type": "variable", - "name": "unused4", + "name": "unused3", "source_mapping": { - "start": 106, + "start": 85, "length": 15, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/unused-state/0.7.6/unused_state.sol", @@ -248,7 +248,7 @@ "filename_short": "tests/detectors/unused-state/0.7.6/unused_state.sol", "is_dependency": false, "lines": [ - 7 + 6 ], "starting_column": 5, "ending_column": 20 @@ -304,10 +304,10 @@ } } ], - "description": "A.unused4 (tests/detectors/unused-state/0.7.6/unused_state.sol#7) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", - "markdown": "[A.unused4](tests/detectors/unused-state/0.7.6/unused_state.sol#L7) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", - "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L7", - "id": "562d3e6a04f6f6068c3e4f0c074ecdbcff87929e43ec6fbeb6c088e715f63cf2", + "description": "A.unused3 (tests/detectors/unused-state/0.7.6/unused_state.sol#6) is never used in B (tests/detectors/unused-state/0.7.6/unused_state.sol#11-16)\n", + "markdown": "[A.unused3](tests/detectors/unused-state/0.7.6/unused_state.sol#L6) is never used in [B](tests/detectors/unused-state/0.7.6/unused_state.sol#L11-L16)\n", + "first_markdown_element": "tests/detectors/unused-state/0.7.6/unused_state.sol#L6", + "id": "e2ac51590509d97ff791ce50d9a711fc5ad01c20d23eacf6fb31939bd91b9f48", "check": "unused-state", "impact": "Informational", "confidence": "High" diff --git a/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json b/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json index baa4240bc..217499938 100644 --- a/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json +++ b/tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol.0.4.25.PredeclarationUsageLocal.json @@ -4,20 +4,20 @@ "elements": [ { "type": "variable", - "name": "x", + "name": "i", "source_mapping": { - "start": 130, - "length": 10, + "start": 199, + "length": 11, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 5 + 8 ], - "starting_column": 9, - "ending_column": 19 + "starting_column": 18, + "ending_column": 29 }, "type_specific_fields": { "parent": { @@ -168,20 +168,20 @@ }, { "type": "node", - "name": "y = x + 9 + z", + "name": "i --", "source_mapping": { - "start": 69, - "length": 13, + "start": 417, + "length": 3, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 4 + 14 ], - "starting_column": 9, - "ending_column": 22 + "starting_column": 29, + "ending_column": 32 }, "type_specific_fields": { "parent": { @@ -259,10 +259,10 @@ } } ], - "description": "Variable 'C.f(uint256).x (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#5)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: y = x + 9 + z (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#4)\n", - "markdown": "Variable '[C.f(uint256).x](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [y = x + 9 + z](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L4)\n", - "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5", - "id": "ede1e902fdfe70c5e7cf91f33df8540f1d15952d00f70a9a5dfb9edbcbe49cb6", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i -- (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i --](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", + "id": "24ed055a29ee9bac066b9a99a36d40f7bd77314605d8f1a6440a5576a38b24fb", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -702,20 +702,20 @@ }, { "type": "node", - "name": "i > 0", + "name": "x += i", "source_mapping": { - "start": 410, - "length": 5, + "start": 436, + "length": 6, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 14 + 15 ], - "starting_column": 22, - "ending_column": 27 + "starting_column": 13, + "ending_column": 19 }, "type_specific_fields": { "parent": { @@ -793,10 +793,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i > 0 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i > 0](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: x += i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#15)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [x += i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L15)\n", "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "ffb778e86e0b11beed38687c3abf9ffd0de948ec4ccc0109a78954741220de9e", + "id": "e346a217ae6931f9fa7ff70302d05db17c0422dd4272f87935b633950239b592", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -805,20 +805,20 @@ "elements": [ { "type": "variable", - "name": "i", + "name": "x", "source_mapping": { - "start": 199, - "length": 11, + "start": 130, + "length": 10, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 8 + 5 ], - "starting_column": 18, - "ending_column": 29 + "starting_column": 9, + "ending_column": 19 }, "type_specific_fields": { "parent": { @@ -969,20 +969,20 @@ }, { "type": "node", - "name": "x += i", + "name": "y = x + 9 + z", "source_mapping": { - "start": 436, - "length": 6, + "start": 69, + "length": 13, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "is_dependency": false, "lines": [ - 15 + 4 ], - "starting_column": 13, - "ending_column": 19 + "starting_column": 9, + "ending_column": 22 }, "type_specific_fields": { "parent": { @@ -1060,10 +1060,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: x += i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#15)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [x += i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L15)\n", - "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "e346a217ae6931f9fa7ff70302d05db17c0422dd4272f87935b633950239b592", + "description": "Variable 'C.f(uint256).x (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#5)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: y = x + 9 + z (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#4)\n", + "markdown": "Variable '[C.f(uint256).x](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [y = x + 9 + z](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L4)\n", + "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L5", + "id": "ede1e902fdfe70c5e7cf91f33df8540f1d15952d00f70a9a5dfb9edbcbe49cb6", "check": "variable-scope", "impact": "Low", "confidence": "High" @@ -1236,10 +1236,10 @@ }, { "type": "node", - "name": "i --", + "name": "i > 0", "source_mapping": { - "start": 417, - "length": 3, + "start": 410, + "length": 5, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol", "filename_absolute": "/GENERIC_PATH", @@ -1248,8 +1248,8 @@ "lines": [ 14 ], - "starting_column": 29, - "ending_column": 32 + "starting_column": 22, + "ending_column": 27 }, "type_specific_fields": { "parent": { @@ -1327,10 +1327,10 @@ } } ], - "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i -- (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", - "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i --](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", + "description": "Variable 'C.f(uint256).i (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#8)' in C.f(uint256) (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#2-17) potentially used before declaration: i > 0 (tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#14)\n", + "markdown": "Variable '[C.f(uint256).i](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8)' in [C.f(uint256)](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L2-L17) potentially used before declaration: [i > 0](tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L14)\n", "first_markdown_element": "tests/detectors/variable-scope/0.4.25/predeclaration_usage_local.sol#L8", - "id": "24ed055a29ee9bac066b9a99a36d40f7bd77314605d8f1a6440a5576a38b24fb", + "id": "ffb778e86e0b11beed38687c3abf9ffd0de948ec4ccc0109a78954741220de9e", "check": "variable-scope", "impact": "Low", "confidence": "High" diff --git a/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json b/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json index c1cb5e048..93950c93c 100644 --- a/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json +++ b/tests/detectors/weak-prng/0.4.25/bad_prng.sol.0.4.25.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 216, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6", - "id": "fc717c512384a74aab058df35c032bca15e276f4e03446ad7b52f33acac1a556", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14", + "id": "4ac936f85dc1e903d3d6688aaea992d3a5b124bb90eb73eb372dffcc60ccd9dc", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,19 +169,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 122, - "length": 56, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -231,42 +231,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = now % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 154, - "length": 17, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 21 ], "starting_column": 7, - "ending_column": 24 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad3", "source_mapping": { - "start": 122, - "length": 56, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10", - "id": "b6c45323a90c31dea54db817de9a3d13e40431227ca6240465e43183004f6541", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22", + "id": "9ea8ea8faa26193b33dc2b3be5a338350aa82a076a4b5ec387ad8f5c15b7181f", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 184, - "length": 78, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = now % 10", "source_mapping": { - "start": 216, - "length": 39, + "start": 154, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 9 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad1", "source_mapping": { - "start": 184, - "length": 78, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L12-L14", - "id": "4ac936f85dc1e903d3d6688aaea992d3a5b124bb90eb73eb372dffcc60ccd9dc", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L8-L10", + "id": "b6c45323a90c31dea54db817de9a3d13e40431227ca6240465e43183004f6541", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 5 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.4.25/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L20-L22", - "id": "9ea8ea8faa26193b33dc2b3be5a338350aa82a076a4b5ec387ad8f5c15b7181f", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.4.25/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.4.25/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.4.25/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.4.25/bad_prng.sol#L4-L6", + "id": "fc717c512384a74aab058df35c032bca15e276f4e03446ad7b52f33acac1a556", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json b/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json index 06344769b..83e527ab7 100644 --- a/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json +++ b/tests/detectors/weak-prng/0.5.16/bad_prng.sol.0.5.16.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 21 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6", - "id": "5bb9fd5cdaccfeb6303fb8ea676c6aed0164ba2ce3fc8b5c2778cd280afe61b0", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22", + "id": "342f1496b7a91c084d108fd76054672be5ac3a1a5481f907b93d3c72e32f70dc", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,19 +169,19 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 122, - "length": 56, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -231,42 +231,42 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = now % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 154, - "length": 17, + "start": 216, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 13 ], "starting_column": 7, - "ending_column": 24 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad2", "source_mapping": { - "start": 122, - "length": 56, + "start": 184, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10", - "id": "963866d884f65c4552ae10288cc1f92de1050f5f6254d4d2df132c7fbb7ce773", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14", + "id": "4769d2b25e78345ad05fa046a989f5f5545739c20e8c2b93c2968cdca69a5501", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 184, - "length": 78, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 216, - "length": 39, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 5 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad0", "source_mapping": { - "start": 184, - "length": 78, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L12-L14", - "id": "4769d2b25e78345ad05fa046a989f5f5545739c20e8c2b93c2968cdca69a5501", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L4-L6", + "id": "5bb9fd5cdaccfeb6303fb8ea676c6aed0164ba2ce3fc8b5c2778cd280afe61b0", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 363, - "length": 58, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = now % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 154, + "length": 17, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 9 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 24 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 363, - "length": 58, + "start": 122, + "length": 56, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.5.16/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L20-L22", - "id": "342f1496b7a91c084d108fd76054672be5ac3a1a5481f907b93d3c72e32f70dc", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.5.16/bad_prng.sol#8-10) uses a weak PRNG: \"i = now % 10 (tests/detectors/weak-prng/0.5.16/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = now % 10](tests/detectors/weak-prng/0.5.16/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.5.16/bad_prng.sol#L8-L10", + "id": "963866d884f65c4552ae10288cc1f92de1050f5f6254d4d2df132c7fbb7ce773", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json b/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json index acf094666..cd31e5f63 100644 --- a/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json +++ b/tests/detectors/weak-prng/0.6.11/bad_prng.sol.0.6.11.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 395, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 21 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad3", "source_mapping": { - "start": 45, - "length": 68, + "start": 363, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6", - "id": "bfdb804ad9a58c4a694182e0f4dff561ffe37a0680f850763136ac57af57cea6", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22", + "id": "211bbc7b73c90c6ae03f3e73c2b306c74699381229a4af6d4687891b024f2189", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 395, - "length": 19, + "start": 77, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 5 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad0", "source_mapping": { - "start": 363, - "length": 58, + "start": 45, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.6.11/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L20-L22", - "id": "211bbc7b73c90c6ae03f3e73c2b306c74699381229a4af6d4687891b024f2189", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.6.11/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.6.11/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.6.11/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.6.11/bad_prng.sol#L4-L6", + "id": "bfdb804ad9a58c4a694182e0f4dff561ffe37a0680f850763136ac57af57cea6", "check": "weak-prng", "impact": "High", "confidence": "Medium" diff --git a/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json b/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json index 18a7add1c..3be19474d 100644 --- a/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json +++ b/tests/detectors/weak-prng/0.7.6/bad_prng.sol.0.7.6.BadPRNG.json @@ -4,19 +4,19 @@ "elements": [ { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 196, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -66,42 +66,42 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } }, { "type": "node", - "name": "i = block.timestamp % 10", + "name": "i = uint256(blockhash(uint256)(10000)) % 10", "source_mapping": { - "start": 77, - "length": 29, + "start": 228, + "length": 39, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 5 + 13 ], "starting_column": 7, - "ending_column": 36 + "ending_column": 46 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad0", + "name": "bad2", "source_mapping": { - "start": 45, - "length": 68, + "start": 196, + "length": 78, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 4, - 5, - 6 + 12, + 13, + 14 ], "starting_column": 5, "ending_column": 6 @@ -151,16 +151,16 @@ "ending_column": 2 } }, - "signature": "bad0()" + "signature": "bad2()" } } } } ], - "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#5)\" \n", - "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L5)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6", - "id": "1699e708ab01560cde36ac92caaf0abd7c3de733431340f4719b1dfd3544a6ef", + "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#13)\" \n", + "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L13)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14", + "id": "0afae786715bc7bc677a2525aec172999533a2bc1ee62d9b974c9f13a45755c6", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -169,9 +169,9 @@ "elements": [ { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 122, + "start": 45, "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -179,9 +179,9 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -231,14 +231,14 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } }, { "type": "node", "name": "i = block.timestamp % 10", "source_mapping": { - "start": 154, + "start": 77, "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -246,7 +246,7 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 9 + 5 ], "starting_column": 7, "ending_column": 36 @@ -254,9 +254,9 @@ "type_specific_fields": { "parent": { "type": "function", - "name": "bad1", + "name": "bad0", "source_mapping": { - "start": 122, + "start": 45, "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", @@ -264,9 +264,9 @@ "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 8, - 9, - 10 + 4, + 5, + 6 ], "starting_column": 5, "ending_column": 6 @@ -316,16 +316,16 @@ "ending_column": 2 } }, - "signature": "bad1()" + "signature": "bad0()" } } } } ], - "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#8-10) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#9)\" \n", - "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L9)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10", - "id": "e27e978d7016cb26d0d372e84c7f4e1bbd6e45af239e195823b3b138713430a6", + "description": "BadPRNG.bad0() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#4-6) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#5)\" \n", + "markdown": "[BadPRNG.bad0()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L5)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L4-L6", + "id": "1699e708ab01560cde36ac92caaf0abd7c3de733431340f4719b1dfd3544a6ef", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -334,19 +334,19 @@ "elements": [ { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 196, - "length": 78, + "start": 375, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -396,42 +396,42 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } }, { "type": "node", - "name": "i = uint256(blockhash(uint256)(10000)) % 10", + "name": "i = foo() % 10", "source_mapping": { - "start": 228, - "length": 39, + "start": 407, + "length": 19, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 13 + 21 ], "starting_column": 7, - "ending_column": 46 + "ending_column": 26 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad2", + "name": "bad3", "source_mapping": { - "start": 196, - "length": 78, + "start": 375, + "length": 58, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 12, - 13, - 14 + 20, + 21, + 22 ], "starting_column": 5, "ending_column": 6 @@ -481,16 +481,16 @@ "ending_column": 2 } }, - "signature": "bad2()" + "signature": "bad3()" } } } } ], - "description": "BadPRNG.bad2() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#12-14) uses a weak PRNG: \"i = uint256(blockhash(uint256)(10000)) % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#13)\" \n", - "markdown": "[BadPRNG.bad2()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14) uses a weak PRNG: \"[i = uint256(blockhash(uint256)(10000)) % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L13)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L12-L14", - "id": "0afae786715bc7bc677a2525aec172999533a2bc1ee62d9b974c9f13a45755c6", + "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#21)\" \n", + "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L21)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22", + "id": "b3e0dbd29c5e74eaae470dcfe1ff523c67da580b1ae0c07559c02ee67d9d4c86", "check": "weak-prng", "impact": "High", "confidence": "Medium" @@ -499,19 +499,19 @@ "elements": [ { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 375, - "length": 58, + "start": 122, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -561,42 +561,42 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } }, { "type": "node", - "name": "i = foo() % 10", + "name": "i = block.timestamp % 10", "source_mapping": { - "start": 407, - "length": 19, + "start": 154, + "length": 29, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 21 + 9 ], "starting_column": 7, - "ending_column": 26 + "ending_column": 36 }, "type_specific_fields": { "parent": { "type": "function", - "name": "bad3", + "name": "bad1", "source_mapping": { - "start": 375, - "length": 58, + "start": 122, + "length": 68, "filename_used": "/GENERIC_PATH", "filename_relative": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "filename_absolute": "/GENERIC_PATH", "filename_short": "tests/detectors/weak-prng/0.7.6/bad_prng.sol", "is_dependency": false, "lines": [ - 20, - 21, - 22 + 8, + 9, + 10 ], "starting_column": 5, "ending_column": 6 @@ -646,16 +646,16 @@ "ending_column": 2 } }, - "signature": "bad3()" + "signature": "bad1()" } } } } ], - "description": "BadPRNG.bad3() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#20-22) uses a weak PRNG: \"i = foo() % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#21)\" \n", - "markdown": "[BadPRNG.bad3()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22) uses a weak PRNG: \"[i = foo() % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L21)\" \n", - "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L20-L22", - "id": "b3e0dbd29c5e74eaae470dcfe1ff523c67da580b1ae0c07559c02ee67d9d4c86", + "description": "BadPRNG.bad1() (tests/detectors/weak-prng/0.7.6/bad_prng.sol#8-10) uses a weak PRNG: \"i = block.timestamp % 10 (tests/detectors/weak-prng/0.7.6/bad_prng.sol#9)\" \n", + "markdown": "[BadPRNG.bad1()](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10) uses a weak PRNG: \"[i = block.timestamp % 10](tests/detectors/weak-prng/0.7.6/bad_prng.sol#L9)\" \n", + "first_markdown_element": "tests/detectors/weak-prng/0.7.6/bad_prng.sol#L8-L10", + "id": "e27e978d7016cb26d0d372e84c7f4e1bbd6e45af239e195823b3b138713430a6", "check": "weak-prng", "impact": "High", "confidence": "Medium"