diff --git a/scripts/update_buggy_versions.py b/scripts/update_buggy_versions.py index 298a268b9..bbb230bf8 100644 --- a/scripts/update_buggy_versions.py +++ b/scripts/update_buggy_versions.py @@ -17,9 +17,11 @@ def organize_data(json_data): if __name__ == "__main__": - url = "https://raw.githubusercontent.com/ethereum/solidity/develop/docs/bugs_by_version.json" - json_data = retrieve_json(url) - version_bugs = organize_data(json_data) + bug_list_url = ( + "https://raw.githubusercontent.com/ethereum/solidity/develop/docs/bugs_by_version.json" + ) + data = retrieve_json(bug_list_url) + bugs_by_version = organize_data(data) - with open(Path.cwd() / Path("slither/utils/buggy_versions.py"), "w") as file: - file.write(f"bugs_by_version = {version_bugs}") + with open(Path.cwd() / Path("slither/utils/buggy_versions.py"), "w", encoding="utf-8") as file: + file.write(f"bugs_by_version = {bugs_by_version}") diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py index e500c51f2..56ff13315 100644 --- a/slither/detectors/attributes/incorrect_solc.py +++ b/slither/detectors/attributes/incorrect_solc.py @@ -60,7 +60,7 @@ class IncorrectSolc(AbstractDetector): LESS_THAN_TXT = "uses lesser than" BUGGY_VERSION_TXT = ( - "contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)" + "contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)" ) # Indicates the allowed versions. Must be formatted in increasing order. diff --git a/slither/utils/buggy_versions.py b/slither/utils/buggy_versions.py index a30dabf55..21a3f5a52 100644 --- a/slither/utils/buggy_versions.py +++ b/slither/utils/buggy_versions.py @@ -1583,6 +1583,7 @@ "0.8.22": ["VerbatimInvalidDeduplication"], "0.8.23": [], "0.8.24": [], + "0.8.25": [], "0.8.3": [ "FullInlinerNonExpressionSplitArgumentEvaluationOrder", "MissingSideEffectsOnSelectorAccess", diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_4_25_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_4_25_static_sol__0.txt index 37df4af20..0a37cfba0 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_4_25_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_4_25_static_sol__0.txt @@ -1,4 +1,6 @@ -Version constraint 0.4.25 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +solc-0.4.25 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. + +Version constraint 0.4.25 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - DirtyBytesArrayToStorage - ABIDecodeTwoDimensionalArrayMemory - KeccakCaching @@ -17,5 +19,3 @@ Version constraint 0.4.25 contain known severe issues (https://solidity.readthed It is used by: - tests/e2e/detectors/test_data/solc-version/0.4.25/static.sol#1 -solc-0.4.25 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. - diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_14_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_14_static_sol__0.txt index 622fd980e..7a65a5925 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_14_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_14_static_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint 0.5.14 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint 0.5.14 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - AbiReencodingHeadOverflowWithStaticArrayCleanup - DirtyBytesArrayToStorage - NestedCalldataArrayAbiReencodingSizeValidation diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_1_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_1_sol__0.txt index 56db78fcc..442355e38 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_1_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_1_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint ^0.5.15 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint ^0.5.15 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - AbiReencodingHeadOverflowWithStaticArrayCleanup - DirtyBytesArrayToStorage - NestedCalldataArrayAbiReencodingSizeValidation diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_2_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_2_sol__0.txt index 49a96b6b1..9cde284b5 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_2_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_dynamic_2_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint >=0.5.0<0.6.0 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint >=0.5.0<0.6.0 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - DirtyBytesArrayToStorage - ABIDecodeTwoDimensionalArrayMemory - KeccakCaching diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_static_sol__0.txt index b661db49b..15f233fe7 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_5_16_static_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint 0.5.16 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint 0.5.16 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - AbiReencodingHeadOverflowWithStaticArrayCleanup - DirtyBytesArrayToStorage - NestedCalldataArrayAbiReencodingSizeValidation diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_10_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_10_static_sol__0.txt index b6392c557..de4114627 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_10_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_10_static_sol__0.txt @@ -1,6 +1,6 @@ solc-0.6.10 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. -Version constraint 0.6.10 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint 0.6.10 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_1_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_1_sol__0.txt index 3ef69c4da..626683d0e 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_1_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_1_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint ^0.6.10 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint ^0.6.10 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_2_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_2_sol__0.txt index 244e807d6..2142313f2 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_2_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_dynamic_2_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint >=0.6.0<0.7.0 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint >=0.6.0<0.7.0 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - AbiReencodingHeadOverflowWithStaticArrayCleanup - DirtyBytesArrayToStorage - NestedCalldataArrayAbiReencodingSizeValidation diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_static_sol__0.txt index c44f975c3..ef330a1bb 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_6_11_static_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint 0.6.11 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint 0.6.11 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_4_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_4_static_sol__0.txt index 77f1c4097..052d8cb27 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_4_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_4_static_sol__0.txt @@ -1,4 +1,4 @@ -Version constraint 0.7.4 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint 0.7.4 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_dynamic_1_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_dynamic_1_sol__0.txt index 720dd2426..0a67e6f3e 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_dynamic_1_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_dynamic_1_sol__0.txt @@ -1,6 +1,6 @@ solc-0.7.6 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. -Version constraint ^0.7.4 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +Version constraint ^0.7.4 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup diff --git a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_static_sol__0.txt b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_static_sol__0.txt index 5c5bba56b..70bc412b7 100644 --- a/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_static_sol__0.txt +++ b/tests/e2e/detectors/snapshots/detectors__detector_IncorrectSolc_0_7_6_static_sol__0.txt @@ -1,4 +1,6 @@ -Version constraint 0.7.6 contain known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) +solc-0.7.6 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. + +Version constraint 0.7.6 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - FullInlinerNonExpressionSplitArgumentEvaluationOrder - MissingSideEffectsOnSelectorAccess - AbiReencodingHeadOverflowWithStaticArrayCleanup @@ -11,5 +13,3 @@ Version constraint 0.7.6 contain known severe issues (https://solidity.readthedo It is used by: - tests/e2e/detectors/test_data/solc-version/0.7.6/static.sol#1 -solc-0.7.6 is an outdated solc version. Use a more recent version (at least 0.8.0), if possible. -