From bdfef7acf25e3a72185ad6bdb43e6495290e2d31 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 16 Apr 2024 10:23:02 +0200 Subject: [PATCH 1/4] Exclude location for printer output This PR adds a new parameter to slither (--exlude-location) that exclude locations information from printer output. Closes #2222 --- slither/__main__.py | 7 +++ slither/detectors/abstract_detector.py | 1 + slither/slither.py | 2 + slither/utils/command_line.py | 1 + slither/utils/output.py | 54 +++++++++++-------- ...rage_ABIEncoderV2_array_sol_exclude__0.txt | 18 +++++++ ..._0_arbitrary_send_erc20_sol_exclude__0.txt | 6 +++ ...trary_send_erc20_permit_sol_exclude__0.txt | 8 +++ ...5_16_arbitrary_send_eth_sol_exclude__0.txt | 8 +++ ...array_length_assignment_sol_exclude__0.txt | 9 ++++ ...nline_assembly_contract_sol_exclude__0.txt | 3 ++ ...inline_assembly_library_sol_exclude__0.txt | 6 +++ ..._25_assert_state_change_sol_exclude__0.txt | 12 +++++ ...ackdoor_0_5_16_backdoor_sol_exclude__0.txt | 2 + ...BadPRNG_0_5_16_bad_prng_sol_exclude__0.txt | 8 +++ ...boolean_constant_misuse_sol_exclude__0.txt | 3 ++ ...adowing_builtin_symbols_sol_exclude__0.txt | 24 +++++++++ ...ionsAsm_0_5_16_constant_sol_exclude__0.txt | 0 ...onsState_0_7_6_constant_sol_exclude__0.txt | 0 ...agma_0_7_6_pragma_0_7_6_sol_exclude__0.txt | 6 +++ ...controlled_delegatecall_sol_exclude__0.txt | 6 +++ ...5_const_state_variables_sol_exclude__0.txt | 12 +++++ ...5_immut_state_variables_sol_exclude__0.txt | 0 ..._4_25_delegatecall_loop_sol_exclude__0.txt | 6 +++ ..._divide_before_multiply_sol_exclude__0.txt | 3 ++ ...permit_domain_collision_sol_exclude__0.txt | 2 + ...ain_state_var_collision_sol_exclude__0.txt | 2 + ...omain_wrong_return_type_sol_exclude__0.txt | 2 + ..._4_25_external_function_sol_exclude__0.txt | 0 ..._16_external_function_3_sol_exclude__0.txt | 20 +++++++ ...7_6_external_function_2_sol_exclude__0.txt | 0 ...on_init_state_variables_sol_exclude__0.txt | 15 ++++++ ...correct_erc20_interface_sol_exclude__0.txt | 12 +++++ ...ctSolc_0_5_16_dynamic_2_sol_exclude__0.txt | 21 ++++++++ ...orrectSolc_0_7_4_static_sol_exclude__0.txt | 15 ++++++ ...4_25_incorrect_equality_sol_exclude__0.txt | 36 +++++++++++++ ...nvalid_unary_expression_sol_exclude__0.txt | 8 +++ ...correctUsingForTopLevel_sol_exclude__0.txt | 24 +++++++++ ...her_0_4_25_locked_ether_sol_exclude__0.txt | 10 ++++ ..._0_5_16_MappingDeletion_sol_exclude__0.txt | 9 ++++ ...g_events_access_control_sol_exclude__0.txt | 9 ++++ ...ssing_events_arithmetic_sol_exclude__0.txt | 6 +++ ...unimplemented_interface_sol_exclude__0.txt | 2 + ...p_0_4_25_msg_value_loop_sol_exclude__0.txt | 6 +++ ..._multiple_calls_in_loop_sol_exclude__0.txt | 8 +++ ...0_7_6_naming_convention_sol_exclude__0.txt | 36 +++++++++++++ ...declaration_usage_local_sol_exclude__0.txt | 10 ++++ ...Variables_0_8_2_comment_sol_exclude__0.txt | 4 ++ ...16_redundant_statements_sol_exclude__0.txt | 12 +++++ ..._6_11_reentrancy_benign_sol_exclude__0.txt | 50 +++++++++++++++++ ..._25_reentrancy_indirect_sol_exclude__0.txt | 15 ++++++ ...ncyEth_0_7_6_reentrancy_sol_exclude__0.txt | 28 ++++++++++ ...o_reentrancy_staticcall_sol_exclude__0.txt | 0 ..._0_7_6_reentrancy_write_sol_exclude__0.txt | 25 +++++++++ ..._right_to_left_override_sol_exclude__0.txt | 3 ++ ...1_shift_parameter_mixup_sol_exclude__0.txt | 2 + ...hadowing_state_variable_sol_exclude__0.txt | 3 ++ ...hadowing_state_variable_sol_exclude__0.txt | 0 ...ge_signed_integer_array_sol_exclude__0.txt | 0 ...uicidal_0_6_11_suicidal_sol_exclude__0.txt | 2 + ...lCompare_0_8_20_compare_sol_exclude__0.txt | 3 ++ ..._0_5_16_too_many_digits_sol_exclude__0.txt | 15 ++++++ ...xOrigin_0_7_6_tx_origin_sol_exclude__0.txt | 4 ++ ..._6_type_based_tautology_sol_exclude__0.txt | 6 +++ ...5_16_unchecked_lowlevel_sol_exclude__0.txt | 2 + ...d_0_6_11_unchecked_send_sol_exclude__0.txt | 2 + ...unused_return_transfers_sol_exclude__0.txt | 4 ++ ...ion_0_7_6_unimplemented_sol_exclude__0.txt | 10 ++++ ...rs_0_6_11_erc20_indexed_sol_exclude__0.txt | 8 +++ ...unction_ptr_constructor_sol_exclude__0.txt | 12 +++++ ...tialized_local_variable_sol_exclude__0.txt | 2 + ...on_0_4_25_uninitialized_sol_exclude__0.txt | 12 +++++ ...ialized_storage_pointer_sol_exclude__0.txt | 2 + ...able_0_4_25_whitelisted_sol_exclude__0.txt | 0 ...pgradeable_0_6_11_Fixed_sol_exclude__0.txt | 0 ...pgradeable_0_8_15_Buggy_sol_exclude__0.txt | 1 + ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...evelUsedInContractTest3_sol_exclude__0.txt | 0 ...evelUsedInContractTest2_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...ctLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...7_6_var_read_using_this_sol_exclude__0.txt | 8 +++ ...tructor_0_5_16_void_cst_sol_exclude__0.txt | 3 ++ tests/e2e/detectors/test_detectors.py | 34 ++++++++++-- 86 files changed, 703 insertions(+), 27 deletions(-) create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_9_storage_ABIEncoderV2_array_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_7_6_arbitrary_send_erc20_permit_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_5_16_arbitrary_send_eth_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_5_16_array_length_assignment_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_contract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_library_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_4_25_assert_state_change_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_5_16_backdoor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_5_16_bad_prng_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_4_25_boolean_constant_misuse_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_5_16_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_7_6_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_7_6_pragma_0_7_6_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_4_25_controlled_delegatecall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_4_25_const_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_4_25_immut_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_4_25_delegatecall_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_6_11_divide_before_multiply_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_state_var_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_wrong_return_type_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_4_25_function_init_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_7_6_incorrect_erc20_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_4_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_4_25_incorrect_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUnaryExpressionDetection_0_4_25_invalid_unary_expression_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUsingFor_0_8_17_IncorrectUsingForTopLevel_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_4_25_locked_ether_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_5_16_MappingDeletion_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_6_11_missing_events_access_control_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_7_6_missing_events_arithmetic_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_7_6_unimplemented_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_4_25_msg_value_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_4_25_multiple_calls_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_naming_convention_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_PredeclarationUsageLocal_0_4_25_predeclaration_usage_local_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ProtectedVariables_0_8_2_comment_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_5_16_redundant_statements_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_6_11_reentrancy_benign_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_indirect_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_no_reentrancy_staticcall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_reentrancy_write_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_4_25_right_to_left_override_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_6_11_shift_parameter_mixup_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_4_25_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_6_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_10_storage_signed_integer_array_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_6_11_suicidal_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TautologicalCompare_0_8_20_compare_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_5_16_too_many_digits_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_7_6_tx_origin_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_7_6_type_based_tautology_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_5_16_unchecked_lowlevel_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_6_11_unchecked_send_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedTransfer_0_7_6_unused_return_transfers_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_4_25_uninitialized_function_ptr_constructor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_5_16_uninitialized_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_4_25_uninitialized_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_4_25_uninitialized_storage_pointer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_whitelisted_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Fixed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Buggy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomErrorTopLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_7_6_var_read_using_this_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_5_16_void_cst_sol_exclude__0.txt diff --git a/slither/__main__.py b/slither/__main__.py index caaef5730b..6286b36178 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -401,6 +401,13 @@ def parse_args( default=defaults_flag_in_config["exclude_high"], ) + group_detector.add_argument( + "--exclude-location", + help="Exclude location information from detector output", + action="store_true", + default=defaults_flag_in_config["exclude_location"], + ) + fail_on_group = group_detector.add_mutually_exclusive_group() fail_on_group.add_argument( "--fail-pedantic", diff --git a/slither/detectors/abstract_detector.py b/slither/detectors/abstract_detector.py index 8baf9bb3c7..78eb063ddb 100644 --- a/slither/detectors/abstract_detector.py +++ b/slither/detectors/abstract_detector.py @@ -277,6 +277,7 @@ def generate_result( additional_fields, standard_format=self.STANDARD_JSON, markdown_root=self.slither.markdown_root, + exclude_location=self.slither.exclude_location, ) output.data["check"] = self.ARGUMENT diff --git a/slither/slither.py b/slither/slither.py index 0f22185353..33bbcd4ef8 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -106,6 +106,7 @@ def __init__(self, target: Union[str, CryticCompile], **kwargs) -> None: generate_patches (bool): if true, patches are generated (json output only) change_line_prefix (str): Change the line prefix (default #) for the displayed source codes (i.e. file.sol#1). + exclude_location (bool): if true, exclude locations from detector output (default false) """ super().__init__() @@ -186,6 +187,7 @@ def __init__(self, target: Union[str, CryticCompile], **kwargs) -> None: self.add_path_to_include(p) self._exclude_dependencies = kwargs.get("exclude_dependencies", False) + self.exclude_location = kwargs.get("exclude_location", False) triage_mode = kwargs.get("triage_mode", False) triage_database = kwargs.get("triage_database", "slither.db.json") diff --git a/slither/utils/command_line.py b/slither/utils/command_line.py index f03ced8345..8e5ffcfac2 100644 --- a/slither/utils/command_line.py +++ b/slither/utils/command_line.py @@ -51,6 +51,7 @@ class FailOnLevel(enum.Enum): "exclude_dependencies": False, "exclude_informational": False, "exclude_optimization": False, + "exclude_location": False, "exclude_low": False, "exclude_medium": False, "exclude_high": False, diff --git a/slither/utils/output.py b/slither/utils/output.py index 176b250e3a..0bb1c8c56e 100644 --- a/slither/utils/output.py +++ b/slither/utils/output.py @@ -229,7 +229,7 @@ def output_to_zip(filename: str, error: Optional[str], results: Dict, zip_type: ################################################################################### -def _convert_to_description(d: str) -> str: +def _convert_to_description(d: Any, exclude_location: bool = False) -> str: if isinstance(d, str): return d @@ -237,38 +237,41 @@ def _convert_to_description(d: str) -> str: raise SlitherError(f"{d} does not inherit from SourceMapping, conversion impossible") if isinstance(d, Node): - if d.expression: - return f"{d.expression} ({d.source_mapping})" - return f"{str(d)} ({d.source_mapping})" - - if hasattr(d, "canonical_name"): - return f"{d.canonical_name} ({d.source_mapping})" + first_part = f"{d.expression}" if d.expression else f"{str(d)}" + elif hasattr(d, "canonical_name"): + first_part = f"{d.canonical_name}" + elif hasattr(d, "name"): + first_part = f"{d.name}" + else: + raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name") - if hasattr(d, "name"): - return f"{d.name} ({d.source_mapping})" + if exclude_location: + return first_part - raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name") + return f"{first_part} ({d.source_mapping})" -def _convert_to_markdown(d: str, markdown_root: str) -> str: +def _convert_to_markdown(d: str, markdown_root: str, exclude_location: bool = False) -> str: if isinstance(d, str): return d if not isinstance(d, SourceMapping): raise SlitherError(f"{d} does not inherit from SourceMapping, conversion impossible") + first_part: str if isinstance(d, Node): - if d.expression: - return f"[{d.expression}]({d.source_mapping.to_markdown(markdown_root)})" - return f"[{str(d)}]({d.source_mapping.to_markdown(markdown_root)})" - - if hasattr(d, "canonical_name"): - return f"[{d.canonical_name}]({d.source_mapping.to_markdown(markdown_root)})" + first_part = f"[{d.expression}]" if d.expression else f"[{str(d)}]" + elif hasattr(d, "canonical_name"): + first_part = f"[{d.canonical_name}]" + elif hasattr(d, "name"): + first_part = f"[{d.name}]" + else: + raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name") - if hasattr(d, "name"): - return f"[{d.name}]({d.source_mapping.to_markdown(markdown_root)})" + if exclude_location: + return first_part - raise SlitherError(f"{type(d)} cannot be converted (no name, or canonical_name") + return f"{first_part}({d.source_mapping.to_markdown(markdown_root)})" def _convert_to_id(d: str) -> str: @@ -386,12 +389,13 @@ def _create_parent_element( class Output: - def __init__( + def __init__( # pylint: disable=too-many-arguments self, info_: Union[str, List[Union[str, SupportedOutput]]], additional_fields: Optional[Dict] = None, markdown_root: str = "", standard_format: bool = True, + exclude_location: bool = False, ) -> None: if additional_fields is None: additional_fields = {} @@ -405,8 +409,12 @@ def __init__( self._data = OrderedDict() self._data["elements"] = [] - self._data["description"] = "".join(_convert_to_description(d) for d in info) - self._data["markdown"] = "".join(_convert_to_markdown(d, markdown_root) for d in info) + self._data["description"] = "".join( + _convert_to_description(d, exclude_location) for d in info + ) + self._data["markdown"] = "".join( + _convert_to_markdown(d, markdown_root, exclude_location) for d in info + ) self._data["first_markdown_element"] = "" self._markdown_root = markdown_root diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_9_storage_ABIEncoderV2_array_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_9_storage_ABIEncoderV2_array_sol_exclude__0.txt new file mode 100644 index 0000000000..8a21837526 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_9_storage_ABIEncoderV2_array_sol_exclude__0.txt @@ -0,0 +1,18 @@ +Function A.bad5() trigger an abi encoding bug: + - event2_bad(s) + +Function A.bad0() trigger an abi encoding bug: + - this.bad0_external(bad_arr) + +Function A.bad4() trigger an abi encoding bug: + - event1_bad(bad_arr) + +Function A.bad2() trigger an abi encoding bug: + - b = abi.encode(bad_arr) + +Function A.bad1(A.S[3]) trigger an abi encoding bug: + - this.bad1_external(s) + +Function A.bad3() trigger an abi encoding bug: + - b = abi.encode(s) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_sol_exclude__0.txt new file mode 100644 index 0000000000..377a22e1e2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad1(address,uint256) uses arbitrary from in transferFrom: erc20.transferFrom(notsend,to,am) + +C.bad3(address,address,uint256) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,to,amount) + +C.bad4(address,address,uint256) uses arbitrary from in transferFrom: SafeERC20.safeTransferFrom(erc20,from,to,amount) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_7_6_arbitrary_send_erc20_permit_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_7_6_arbitrary_send_erc20_permit_sol_exclude__0.txt new file mode 100644 index 0000000000..cadf80dcb3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_7_6_arbitrary_send_erc20_permit_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.int_transferFrom(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad1(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad4(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: SafeERC20.safeTransferFrom(erc20,from,to,value) + +C.bad3(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.safeTransferFrom(from,to,value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_5_16_arbitrary_send_eth_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_5_16_arbitrary_send_eth_sol_exclude__0.txt new file mode 100644 index 0000000000..6734b75c22 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_5_16_arbitrary_send_eth_sol_exclude__0.txt @@ -0,0 +1,8 @@ +Test.direct() sends eth to arbitrary user + Dangerous calls: + - msg.sender.send(address(this).balance) + +Test.indirect() sends eth to arbitrary user + Dangerous calls: + - destination.send(address(this).balance) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_5_16_array_length_assignment_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_5_16_array_length_assignment_sol_exclude__0.txt new file mode 100644 index 0000000000..aa8e559d4d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_5_16_array_length_assignment_sol_exclude__0.txt @@ -0,0 +1,9 @@ +ArrayLengthAssignment contract sets array length with a user-controlled value: + - b.subStruct.x.length = param + 1 + +ArrayLengthAssignment contract sets array length with a user-controlled value: + - a.x.length = param + +ArrayLengthAssignment contract sets array length with a user-controlled value: + - arr.length = param + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_contract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_contract_sol_exclude__0.txt new file mode 100644 index 0000000000..24f3e8331c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_contract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +GetCode.at(address) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_library_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_library_sol_exclude__0.txt new file mode 100644 index 0000000000..912ee2e426 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_library_sol_exclude__0.txt @@ -0,0 +1,6 @@ +VectorSum.sumAsm(uint256[]) uses assembly + - INLINE ASM + +VectorSum.sumPureAsm(uint256[]) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_4_25_assert_state_change_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_4_25_assert_state_change_sol_exclude__0.txt new file mode 100644 index 0000000000..1637b35068 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_4_25_assert_state_change_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.bad2() has an assert() call which possibly changes state. + -assert(bool)(bad2_callee()) +Consider using require() or change the invariant to not modify the state. + +A.bad0() has an assert() call which possibly changes state. + -assert(bool)((s_a += 1) > 10) +Consider using require() or change the invariant to not modify the state. + +A.bad1(uint256) has an assert() call which possibly changes state. + -assert(bool)((s_a += a) > 10) +Consider using require() or change the invariant to not modify the state. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_5_16_backdoor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_5_16_backdoor_sol_exclude__0.txt new file mode 100644 index 0000000000..1264e994d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_5_16_backdoor_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Backdoor function found in C.i_am_a_backdoor() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_5_16_bad_prng_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_5_16_bad_prng_sol_exclude__0.txt new file mode 100644 index 0000000000..9712050803 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_5_16_bad_prng_sol_exclude__0.txt @@ -0,0 +1,8 @@ +BadPRNG.bad1() uses a weak PRNG: "i = now % 10" + +BadPRNG.bad0() uses a weak PRNG: "i = block.timestamp % 10" + +BadPRNG.bad2() uses a weak PRNG: "i = uint256(blockhash(uint256)(10000)) % 10" + +BadPRNG.bad3() uses a weak PRNG: "i = foo() % 10" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_4_25_boolean_constant_misuse_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_4_25_boolean_constant_misuse_sol_exclude__0.txt new file mode 100644 index 0000000000..39ce86d4b6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_4_25_boolean_constant_misuse_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) uses a Boolean constant improperly: + -(b || true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol_exclude__0.txt new file mode 100644 index 0000000000..81e0dd500e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_5_16_shadowing_builtin_symbols_sol_exclude__0.txt @@ -0,0 +1,24 @@ +ExtendedContract.ecrecover (state variable) shadows built-in symbol" + +FurtherExtendedContract.require().keccak256 (local variable) shadows built-in symbol" + +FurtherExtendedContract.abi (state variable) shadows built-in symbol" + +BaseContract.blockhash (state variable) shadows built-in symbol" + +FurtherExtendedContract.this (state variable) shadows built-in symbol" + +BaseContract.now (state variable) shadows built-in symbol" + +ExtendedContract.assert(bool).msg (local variable) shadows built-in symbol" + +ExtendedContract.assert(bool) (function) shadows built-in symbol" + +BaseContract.revert(bool) (event) shadows built-in symbol" + +FurtherExtendedContract.require().sha3 (local variable) shadows built-in symbol" + +FurtherExtendedContract.blockhash (state variable) shadows built-in symbol" + +FurtherExtendedContract.require() (modifier) shadows built-in symbol" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_5_16_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_5_16_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_7_6_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_7_6_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_7_6_pragma_0_7_6_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_7_6_pragma_0_7_6_sol_exclude__0.txt new file mode 100644 index 0000000000..4c1a821a3d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_7_6_pragma_0_7_6_sol_exclude__0.txt @@ -0,0 +1,6 @@ +2 different versions of Solidity are used: + - Version constraint ^0.7.6 is used by: + - tests/e2e/detectors/test_data/pragma/0.7.6/pragma.0.7.6.sol#1 + - Version constraint ^0.7.5 is used by: + - tests/e2e/detectors/test_data/pragma/0.7.6/pragma.0.7.5.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_4_25_controlled_delegatecall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_4_25_controlled_delegatecall_sol_exclude__0.txt new file mode 100644 index 0000000000..8e8cb01456 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_4_25_controlled_delegatecall_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad_delegate_call2(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(abi.encode(func_id,data)) + +C.bad_delegate_call(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(data) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_4_25_const_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_4_25_const_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..febc2abeb9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_4_25_const_state_variables_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.text2 should be constant + +B.mySistersAddress should be constant + +A.myFriendsAddress should be constant + +MyConc.should_be_constant should be constant + +MyConc.should_be_constant_2 should be constant + +A.test should be constant + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_4_25_immut_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_4_25_immut_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_4_25_delegatecall_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_4_25_delegatecall_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..4ed317ffee --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_4_25_delegatecall_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad3(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad2_internal(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_6_11_divide_before_multiply_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_6_11_divide_before_multiply_sol_exclude__0.txt new file mode 100644 index 0000000000..f63c77f262 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_6_11_divide_before_multiply_sol_exclude__0.txt @@ -0,0 +1,3 @@ +A.f(uint256,uint256,uint256) performs a multiplication on the result of a division: + - (a / b) * c + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..03a63e26ed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_state_var_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_state_var_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..e68dc2134f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_state_var_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_wrong_return_type_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_wrong_return_type_sol_exclude__0.txt new file mode 100644 index 0000000000..ba552eeaa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_7_6_permit_domain_wrong_return_type_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.DOMAIN_SEPARATOR() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_3_sol_exclude__0.txt new file mode 100644 index 0000000000..1c322becd8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_3_sol_exclude__0.txt @@ -0,0 +1,20 @@ +bad4(string) should be declared external: + - Test.bad4(string) +Moreover, the following function parameters should change its data location: +x location should be calldata + +bad3(Test.testStruct) should be declared external: + - Test.bad3(Test.testStruct) +Moreover, the following function parameters should change its data location: +x location should be calldata + +bad2(uint256[]) should be declared external: + - Test.bad2(uint256[]) +Moreover, the following function parameters should change its data location: +x location should be calldata + +bad(bytes) should be declared external: + - Test.bad(bytes) +Moreover, the following function parameters should change its data location: +x location should be calldata + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_4_25_function_init_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_4_25_function_init_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe94692581 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_4_25_function_init_state_variables_sol_exclude__0.txt @@ -0,0 +1,15 @@ +StateVarInitFromFunction.v is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.z4 is set pre-construction with a non-constant function or state variable: + - z3 + 5 + +StateVarInitFromFunction.x is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.y1 is set pre-construction with a non-constant function or state variable: + - 5 + get() + +StateVarInitFromFunction.y2 is set pre-construction with a non-constant function or state variable: + - (10 + (5 + get())) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_7_6_incorrect_erc20_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_7_6_incorrect_erc20_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..9e58f85af0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_7_6_incorrect_erc20_interface_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Token has incorrect ERC20 function interface:Token.approve(address,uint256) + +Token has incorrect ERC20 function interface:Token.allowance(address,address) + +Token has incorrect ERC20 function interface:Token.balanceOf(address) + +Token has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC20 function interface:Token.totalSupply() + +Token has incorrect ERC20 function interface:Token.transfer(address,uint256) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_2_sol_exclude__0.txt new file mode 100644 index 0000000000..9cde284b52 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_2_sol_exclude__0.txt @@ -0,0 +1,21 @@ +Version constraint >=0.5.0<0.6.0 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - DirtyBytesArrayToStorage + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - privateCanBeOverridden + - SignedArrayStorageCopy + - ABIEncoderV2StorageArrayWithMultiSlotElement + - DynamicConstructorArgumentsClippedABIV2 + - UninitializedFunctionPointerInConstructor + - IncorrectEventSignatureInLibraries + - ABIEncoderV2PackedStorage. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.5.16/dynamic_2.sol#1 + +solc-0.5.16 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__exclude_location_IncorrectSolc_0_7_4_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_4_static_sol_exclude__0.txt new file mode 100644 index 0000000000..052d8cb271 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_4_static_sol_exclude__0.txt @@ -0,0 +1,15 @@ +Version constraint 0.7.4 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - FullInlinerNonExpressionSplitArgumentEvaluationOrder + - MissingSideEffectsOnSelectorAccess + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.7.4/static.sol#1 + +solc-0.7.4 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__exclude_location_IncorrectStrictEquality_0_4_25_incorrect_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_4_25_incorrect_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..961c809fa7 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_4_25_incorrect_equality_sol_exclude__0.txt @@ -0,0 +1,36 @@ +TestContractBalance.bad3() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(this).balance) + +TestContractBalance.bad1() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(address(this)).balance) + +ERC20TestBalance.bad1(ERC20Variable) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(msg.sender) == 10) + +TestSolidityKeyword.bad0() uses a dangerous strict equality: + - require(bool)(now == 0) + +TestContractBalance.bad4() uses a dangerous strict equality: + - balance == 10000000000000000000 + +ERC20TestBalance.bad0(ERC20Function) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(address(this)) == 10) + +TestSolidityKeyword.bad1() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad0() uses a dangerous strict equality: + - require(bool)(address(address(this)).balance == 10000000000000000000) + +TestContractBalance.bad5() uses a dangerous strict equality: + - 10000000000000000000 == balance + +TestContractBalance.bad6() uses a dangerous strict equality: + - balance == 10000000000000000000 + +TestSolidityKeyword.bad2() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad2() uses a dangerous strict equality: + - require(bool)(address(this).balance == 10000000000000000000) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUnaryExpressionDetection_0_4_25_invalid_unary_expression_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUnaryExpressionDetection_0_4_25_invalid_unary_expression_sol_exclude__0.txt new file mode 100644 index 0000000000..4e3076b76d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUnaryExpressionDetection_0_4_25_invalid_unary_expression_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.slitherConstructorVariables() uses an dangerous unary operator: c = (b = + 1) + +C.f() uses an dangerous unary operator: x = + 144444 + +C.c uses an dangerous unary operator: (b = + 1) + +C.f() uses an dangerous unary operator: x = (x = + 1) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUsingFor_0_8_17_IncorrectUsingForTopLevel_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUsingFor_0_8_17_IncorrectUsingForTopLevel_sol_exclude__0.txt new file mode 100644 index 0000000000..4a85bca5fc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectUsingFor_0_8_17_IncorrectUsingForTopLevel_sol_exclude__0.txt @@ -0,0 +1,24 @@ +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#84 is incorrect - no matching function for bytes17[] found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#85 is incorrect - no matching function for uint256 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#90 is incorrect - no matching function for mapping(int256 => uint128) found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#86 is incorrect - no matching function for int256 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#89 is incorrect - no matching function for E2 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#93 is incorrect - no matching function for bytes[][] found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#92 is incorrect - no matching function for string[][] found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#91 is incorrect - no matching function for mapping(int128 => uint256) found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#87 is incorrect - no matching function for bytes18 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#88 is incorrect - no matching function for S2 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#83 is incorrect - no matching function for C3 found in L. + +using-for statement at tests/e2e/detectors/test_data/incorrect-using-for/0.8.17/IncorrectUsingForTopLevel.sol#94 is incorrect - no matching function for custom_int found in L. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_4_25_locked_ether_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_4_25_locked_ether_sol_exclude__0.txt new file mode 100644 index 0000000000..bc4d3cf000 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_4_25_locked_ether_sol_exclude__0.txt @@ -0,0 +1,10 @@ +Contract locking ether found: + Contract OnlyLocked has payable functions: + - Locked.receive() + But does not have a function to withdraw the ether + +Contract locking ether found: + Contract UnlockedAssembly has payable functions: + - Locked.receive() + But does not have a function to withdraw the ether + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_5_16_MappingDeletion_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_5_16_MappingDeletion_sol_exclude__0.txt new file mode 100644 index 0000000000..8170e0af16 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_5_16_MappingDeletion_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Lib.deleteSt(Lib.MyStruct[1]) deletes Lib.MyStruct which contains a mapping: + -delete st[0] + +Balances.deleteBalance(uint256) deletes Balances.BalancesStruct which contains a mapping: + -delete stackBalance[idx] + +Balances.deleteNestedBalance() deletes Balances.BalancesStruct which contains a mapping: + -delete nestedStackBalance + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_6_11_missing_events_access_control_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_6_11_missing_events_access_control_sol_exclude__0.txt new file mode 100644 index 0000000000..ee05c7ca15 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_6_11_missing_events_access_control_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Bug.bad2(address) should emit an event for: + - owner = newOwner + +Bug.bad1(address) should emit an event for: + - owner = newOwner + +Bug.bad0() should emit an event for: + - owner = msg.sender + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_7_6_missing_events_arithmetic_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_7_6_missing_events_arithmetic_sol_exclude__0.txt new file mode 100644 index 0000000000..ab1fbc92fc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_7_6_missing_events_arithmetic_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Bug.bad1(int16) should emit an event for: + - iprice16 = _price + +Bug.bad0(uint8) should emit an event for: + - uprice8 = _price + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_7_6_unimplemented_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_7_6_unimplemented_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..254adc0b3a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_7_6_unimplemented_interface_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Something should inherit from ISomething + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_4_25_msg_value_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_4_25_msg_value_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..baa8f40164 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_4_25_msg_value_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad(address[]) use msg.value in a loop: balances[receivers[i]] += msg.value + +C.bad3(address[]) use msg.value in a loop: balances[receivers[j]] += msg.value + +C.bad2_internal(address) use msg.value in a loop: balances[a] += msg.value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_4_25_multiple_calls_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_4_25_multiple_calls_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..6afe637141 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_4_25_multiple_calls_in_loop_sol_exclude__0.txt @@ -0,0 +1,8 @@ +CallInLoop.bad() has external calls inside a loop: destinations[i].transfer(i) + +CallInLoop.bad2() has external calls inside a loop: destinations[i].transfer(i) + +CallInLoop.bad3_internal(address,uint256) has external calls inside a loop: a.transfer(i) + +CallInLoopBase.bad_base() has external calls inside a loop: destinations_base[i].transfer(i) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_naming_convention_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_naming_convention_sol_exclude__0.txt new file mode 100644 index 0000000000..10b925007a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_naming_convention_sol_exclude__0.txt @@ -0,0 +1,36 @@ +Variable T.s_myStateVar is not in mixedCase + +Struct naming.test is not in CapWords + +Variable T.I is not in mixedCase + +Variable T.I is single letter l, O, or I, which should not be used + +Variable T.O is not in mixedCase + +Variable naming.Var_One is not in mixedCase + +Constant naming.MY_other_CONSTANT is not in UPPER_CASE_WITH_UNDERSCORES + +Contract naming is not in CapWords + +Enum naming.numbers is not in CapWords + +Parameter T.test(uint256,uint256)._used is not in mixedCase + +Variable T._myPublicVar is not in mixedCase + +Variable T.O is single letter l, O, or I, which should not be used + +Event naming.event_(uint256) is not in CapWords + +Modifier naming.CantDo() is not in mixedCase + +Function naming.GetOne() is not in mixedCase + +Variable T.l is single letter l, O, or I, which should not be used + +Variable naming.i_myImutableVar is not in mixedCase + +Parameter naming.setInt(uint256,uint256).Number2 is not in mixedCase + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_PredeclarationUsageLocal_0_4_25_predeclaration_usage_local_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_PredeclarationUsageLocal_0_4_25_predeclaration_usage_local_sol_exclude__0.txt new file mode 100644 index 0000000000..5eb76fedd1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_PredeclarationUsageLocal_0_4_25_predeclaration_usage_local_sol_exclude__0.txt @@ -0,0 +1,10 @@ +Variable 'C.f(uint256).i' in C.f(uint256) potentially used before declaration: i -- + +Variable 'C.f(uint256).i' in C.f(uint256) potentially used before declaration: x += i + +Variable 'C.f(uint256).i' in C.f(uint256) potentially used before declaration: i > 0 + +Variable 'C.f(uint256).i' in C.f(uint256) potentially used before declaration: i = 10 + +Variable 'C.f(uint256).x' in C.f(uint256) potentially used before declaration: y = x + 9 + z + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ProtectedVariables_0_8_2_comment_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ProtectedVariables_0_8_2_comment_sol_exclude__0.txt new file mode 100644 index 0000000000..1726a31a64 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ProtectedVariables_0_8_2_comment_sol_exclude__0.txt @@ -0,0 +1,4 @@ +Internal.buggy() should have Internal.onlyOwner() to protect Internal.owner + +ReentrancyAndWrite.set_not_protected() should have ReentrancyAndWrite.onlyOwner() to protect ReentrancyAndWrite.external_contract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_5_16_redundant_statements_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_5_16_redundant_statements_sol_exclude__0.txt new file mode 100644 index 0000000000..1fcce60bd2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_5_16_redundant_statements_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Redundant expression "assert(bool)" inRedundantStatementsContract + +Redundant expression "bool" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "RedundantStatementsContract" inRedundantStatementsContract + +Redundant expression "test" inRedundantStatementsContract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_6_11_reentrancy_benign_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_6_11_reentrancy_benign_sol_exclude__0.txt new file mode 100644 index 0000000000..3ac58b7e53 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_6_11_reentrancy_benign_sol_exclude__0.txt @@ -0,0 +1,50 @@ +Reentrancy in ReentrancyBenign.bad2(address): + External calls: + - (success,None) = target.call() + - address(target).call.value(1000)() + External calls sending eth: + - address(target).call.value(1000)() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad4(address): + External calls: + - externalCaller(target) + - address(target).call() + - ethSender(address(0)) + - address(target).call.value(1)() + External calls sending eth: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad3(address): + External calls: + - externalCaller(target) + - address(target).call() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad5(address): + External calls: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad1(address): + External calls: + - (success,None) = target.call() + State variables written after the call(s): + - counter += 1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_indirect_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_indirect_sol_exclude__0.txt new file mode 100644 index 0000000000..29fd8ae26f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_indirect_sol_exclude__0.txt @@ -0,0 +1,15 @@ +Reentrancy in Reentrancy.withdraw(address): + External calls: + - require(bool)(Token(token).transfer(msg.sender,token_deposed[token][msg.sender])) + External calls sending eth: + - msg.sender.transfer(eth_deposed[token][msg.sender]) + State variables written after the call(s): + - eth_deposed[token][msg.sender] = 0 + Reentrancy.eth_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_eth(address) + - Reentrancy.withdraw(address) + - token_deposed[token][msg.sender] = 0 + Reentrancy.token_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_token(address,uint256) + - Reentrancy.withdraw(address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_sol_exclude__0.txt new file mode 100644 index 0000000000..f591426acb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_sol_exclude__0.txt @@ -0,0 +1,28 @@ +Reentrancy in Reentrancy.withdrawBalance_fixed_3(): + External calls: + - (ret,mem) = msg.sender.call{value: amount}() + State variables written after the call(s): + - userBalance[msg.sender] = amount + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + +Reentrancy in Reentrancy.withdrawBalance(): + External calls: + - (ret,mem) = msg.sender.call{value: userBalance[msg.sender]}() + State variables written after the call(s): + - userBalance[msg.sender] = 0 + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_no_reentrancy_staticcall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_no_reentrancy_staticcall_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_reentrancy_write_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_reentrancy_write_sol_exclude__0.txt new file mode 100644 index 0000000000..0ef9e6cd33 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_7_6_reentrancy_write_sol_exclude__0.txt @@ -0,0 +1,25 @@ +Reentrancy in ReentrancyWrite.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + +Reentrancy in ReentrancyWrite.bad1(address): + External calls: + - (success,None) = msg.sender.call() + - bad0() + - (success,None) = msg.sender.call() + State variables written after the call(s): + - bad0() + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_4_25_right_to_left_override_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_4_25_right_to_left_override_sol_exclude__0.txt new file mode 100644 index 0000000000..ac0099d48e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_4_25_right_to_left_override_sol_exclude__0.txt @@ -0,0 +1,3 @@ +tests/e2e/detectors/test_data/rtlo/0.4.25/right_to_left_override.sol contains a unicode right-to-left-override character at byte offset 96: + - b' test1(/*A\xe2\x80\xae/*B*/2 , 1/*\xe2\x80\xad' + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_6_11_shift_parameter_mixup_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_6_11_shift_parameter_mixup_sol_exclude__0.txt new file mode 100644 index 0000000000..922db089e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_6_11_shift_parameter_mixup_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.f() contains an incorrect shift operation: a = 8 >> a + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_4_25_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_4_25_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..f7eb3ef79e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_4_25_shadowing_state_variable_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.owner shadows: + - BaseContract.owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_6_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_6_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_10_storage_signed_integer_array_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_10_storage_signed_integer_array_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_6_11_suicidal_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_6_11_suicidal_sol_exclude__0.txt new file mode 100644 index 0000000000..d0e5d9897d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_6_11_suicidal_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.i_am_a_backdoor() allows anyone to destruct the contract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TautologicalCompare_0_8_20_compare_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TautologicalCompare_0_8_20_compare_sol_exclude__0.txt new file mode 100644 index 0000000000..9317341dff --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TautologicalCompare_0_8_20_compare_sol_exclude__0.txt @@ -0,0 +1,3 @@ +A.check(uint256) compares a variable to itself: + (a >= a) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_5_16_too_many_digits_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_5_16_too_many_digits_sol_exclude__0.txt new file mode 100644 index 0000000000..37cf851c4b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_5_16_too_many_digits_sol_exclude__0.txt @@ -0,0 +1,15 @@ +C.f() uses literals with too many digits: + - x2 = 0x0000000000001 + +C.h() uses literals with too many digits: + - x2 = 100000 + +C.f() uses literals with too many digits: + - x3 = 1000000000000000000 + +C.f() uses literals with too many digits: + - x1 = 0x000001 + +C.f() uses literals with too many digits: + - x4 = 100000 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_7_6_tx_origin_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_7_6_tx_origin_sol_exclude__0.txt new file mode 100644 index 0000000000..298d0f73ea --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_7_6_tx_origin_sol_exclude__0.txt @@ -0,0 +1,4 @@ +TxOrigin.bug2() uses tx.origin for authorization: tx.origin != owner + +TxOrigin.bug0() uses tx.origin for authorization: require(bool)(tx.origin == owner) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_7_6_type_based_tautology_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_7_6_type_based_tautology_sol_exclude__0.txt new file mode 100644 index 0000000000..5d27e13339 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_7_6_type_based_tautology_sol_exclude__0.txt @@ -0,0 +1,6 @@ +A.g(uint8) contains a tautology or contradiction: + - (y < 512) + +A.f(uint256) contains a tautology or contradiction: + - x >= 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_5_16_unchecked_lowlevel_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_5_16_unchecked_lowlevel_sol_exclude__0.txt new file mode 100644 index 0000000000..dae680b17f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_5_16_unchecked_lowlevel_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.call.value(msg.value)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_6_11_unchecked_send_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_6_11_unchecked_send_sol_exclude__0.txt new file mode 100644 index 0000000000..9c295db0b1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_6_11_unchecked_send_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedTransfer_0_7_6_unused_return_transfers_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedTransfer_0_7_6_unused_return_transfers_sol_exclude__0.txt new file mode 100644 index 0000000000..f500365b27 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedTransfer_0_7_6_unused_return_transfers_sol_exclude__0.txt @@ -0,0 +1,4 @@ +C.bad0() ignores return value by t.transfer(address(0),1000000000000000000) + +C.bad1() ignores return value by t.transferFrom(address(this),address(0),1000000000000000000) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_sol_exclude__0.txt new file mode 100644 index 0000000000..909405735a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_sol_exclude__0.txt @@ -0,0 +1,10 @@ +DerivedContract_bad2 does not implement functions: + - BaseInterface3.get(uint256) + +DerivedContract_bad0 does not implement functions: + - BaseInterface.f2() + - BaseInterface2.f3() + +AbstractContract_bad1 does not implement functions: + - AbstractContract_bad1.f1() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol_exclude__0.txt new file mode 100644 index 0000000000..cbaf36a648 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_6_11_erc20_indexed_sol_exclude__0.txt @@ -0,0 +1,8 @@ +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter owner + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter from + +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter spender + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter to + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_4_25_uninitialized_function_ptr_constructor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_4_25_uninitialized_function_ptr_constructor_sol_exclude__0.txt new file mode 100644 index 0000000000..aa36fbedbd --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_4_25_uninitialized_function_ptr_constructor_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Contract bad2 + s.a(10) is an unintialized function pointer call in a constructor + +Contract bad0 + a(10) is an unintialized function pointer call in a constructor + +Contract bad3 + a(10) is an unintialized function pointer call in a constructor + +Contract bad1 + b(10) is an unintialized function pointer call in a constructor + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_5_16_uninitialized_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_5_16_uninitialized_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..d70021d97c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_5_16_uninitialized_local_variable_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.func().uint_not_init is a local variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_4_25_uninitialized_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_4_25_uninitialized_sol_exclude__0.txt new file mode 100644 index 0000000000..e55e651f96 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_4_25_uninitialized_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Test2.st is never initialized. It is used in: + - Test2.use() + +Test.balances is never initialized. It is used in: + - Test.use() + +Test2.v is never initialized. It is used in: + - Test2.init() + +Uninitialized.destination is never initialized. It is used in: + - Uninitialized.transfer() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_4_25_uninitialized_storage_pointer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_4_25_uninitialized_storage_pointer_sol_exclude__0.txt new file mode 100644 index 0000000000..92c0b3fe52 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_4_25_uninitialized_storage_pointer_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.func().st_bug is a storage variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_whitelisted_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_whitelisted_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Fixed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Fixed_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Buggy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Buggy_sol_exclude__0.txt new file mode 100644 index 0000000000..f00fbefdf5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Buggy_sol_exclude__0.txt @@ -0,0 +1 @@ +Buggy is an upgradeable contract that does not protect its initialize functions: Buggy.initialize(). Anyone can delete the contract with: Buggy.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomErrorTopLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomErrorTopLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest3_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_7_6_var_read_using_this_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_7_6_var_read_using_this_sol_exclude__0.txt new file mode 100644 index 0000000000..f4396ae7ac --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_7_6_var_read_using_this_sol_exclude__0.txt @@ -0,0 +1,8 @@ +The function VarReadUsingThis.bad2() reads this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad4() reads local = this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad1(uint256) reads this.myMap(x) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad3() reads this.erc20() == address(0) with `this` which adds an extra STATICCALL. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_5_16_void_cst_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_5_16_void_cst_sol_exclude__0.txt new file mode 100644 index 0000000000..75822fc632 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_5_16_void_cst_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Void constructor called in D.constructor(): + - C() + diff --git a/tests/e2e/detectors/test_detectors.py b/tests/e2e/detectors/test_detectors.py index 5604b57dd6..d383329d58 100644 --- a/tests/e2e/detectors/test_detectors.py +++ b/tests/e2e/detectors/test_detectors.py @@ -1875,9 +1875,8 @@ def id_test(test_item: Test): TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" -# pylint: disable=too-many-locals -@pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test) -def test_detector(test_item: Test, snapshot): + +def load_from_crytic(test_item: Test): test_dir_path = Path( TEST_DATA_DIR, test_item.detector.ARGUMENT, @@ -1886,7 +1885,13 @@ def test_detector(test_item: Test, snapshot): test_file_path = Path(test_dir_path, test_item.test_file).as_posix() zip_artifact_path = Path(f"{test_file_path}-{test_item.solc_ver}.zip").as_posix() - crytic_compile = load_from_zip(zip_artifact_path)[0] + return load_from_zip(zip_artifact_path).pop() + + +# pylint: disable=too-many-locals +@pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test) +def test_detector(test_item: Test, snapshot): + crytic_compile = load_from_crytic(test_item) sl = Slither(crytic_compile) sl.register_detector(test_item.detector) @@ -1900,6 +1905,27 @@ def test_detector(test_item: Test, snapshot): assert snapshot() == actual_output +def id_test_exclude_location(test_item: Test): + return f"{test_item.detector.__name__}-{test_item.solc_ver}-{test_item.test_file}-exclude" + + +# Let no rerun every test, but only a subset of them +@pytest.mark.parametrize("test_item", ALL_TESTS[::5], ids=id_test_exclude_location) +def test_exclude_location(test_item, snapshot): + crytic_compile = load_from_crytic(test_item) + + sl = Slither(crytic_compile, exclude_location=True) + sl.register_detector(test_item.detector) + results = sl.run_detectors() + + actual_output = "" + for detector_result in results: + for result in detector_result: + actual_output += result["description"] + actual_output += "\n" + assert snapshot() == actual_output + + def _generate_compile(test_item: Test, skip_existing=False): test_dir_path = Path( TEST_DATA_DIR, From 69e45f41ad9ac6961d0b59eb5d29b1a1a0dd9c52 Mon Sep 17 00:00:00 2001 From: Alexis Date: Wed, 5 Jun 2024 16:56:53 +0200 Subject: [PATCH 2/4] Fix type info --- slither/utils/output.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/slither/utils/output.py b/slither/utils/output.py index 0bb1c8c56e..f534d86c19 100644 --- a/slither/utils/output.py +++ b/slither/utils/output.py @@ -5,7 +5,7 @@ import zipfile from collections import OrderedDict from importlib import metadata -from typing import Tuple, Optional, Dict, List, Union, Any, TYPE_CHECKING, Type +from typing import Tuple, Optional, Dict, List, Union, Any, TYPE_CHECKING, Type, TypeVar from zipfile import ZipFile @@ -229,7 +229,10 @@ def output_to_zip(filename: str, error: Optional[str], results: Dict, zip_type: ################################################################################### -def _convert_to_description(d: Any, exclude_location: bool = False) -> str: +SourceMappingT = TypeVar("SourceMappingT", bound=SourceMapping) + + +def _convert_to_description(d: Union[str, SourceMappingT], exclude_location: bool = False) -> str: if isinstance(d, str): return d From 95d5609d34d1049547d0e4a3aa6a20bf0e327d23 Mon Sep 17 00:00:00 2001 From: Alexis Date: Wed, 5 Jun 2024 17:19:43 +0200 Subject: [PATCH 3/4] Update tests to run them on every detectors. --- ...rage_ABIEncoderV2_array_sol_exclude__0.txt | 18 ++ ...rage_ABIEncoderV2_array_sol_exclude__0.txt | 0 ...25_arbitrary_send_erc20_sol_exclude__0.txt | 6 + ...16_arbitrary_send_erc20_sol_exclude__0.txt | 6 + ...11_arbitrary_send_erc20_sol_exclude__0.txt | 6 + ..._6_arbitrary_send_erc20_sol_exclude__0.txt | 6 + ..._send_erc20_inheritance_sol_exclude__0.txt | 2 + ...trary_send_erc20_permit_sol_exclude__0.txt | 8 + ...trary_send_erc20_permit_sol_exclude__0.txt | 8 + ...trary_send_erc20_permit_sol_exclude__0.txt | 8 + ...trary_send_erc20_permit_sol_exclude__0.txt | 8 + ...4_25_arbitrary_send_eth_sol_exclude__0.txt | 8 + ...6_11_arbitrary_send_eth_sol_exclude__0.txt | 8 + ..._7_6_arbitrary_send_eth_sol_exclude__0.txt | 8 + ...4_25_array_by_reference_sol_exclude__0.txt | 14 ++ ...5_16_array_by_reference_sol_exclude__0.txt | 14 ++ ...6_11_array_by_reference_sol_exclude__0.txt | 14 ++ ..._7_6_array_by_reference_sol_exclude__0.txt | 14 ++ ...array_length_assignment_sol_exclude__0.txt | 9 + ...nline_assembly_contract_sol_exclude__0.txt | 3 + ...inline_assembly_library_sol_exclude__0.txt | 6 + ...inline_assembly_library_sol_exclude__0.txt | 6 + ...nline_assembly_contract_sol_exclude__0.txt | 3 + ...inline_assembly_library_sol_exclude__0.txt | 6 + ...nline_assembly_contract_sol_exclude__0.txt | 3 + ..._16_assert_state_change_sol_exclude__0.txt | 12 ++ ..._11_assert_state_change_sol_exclude__0.txt | 12 ++ ...7_6_assert_state_change_sol_exclude__0.txt | 12 ++ ...ackdoor_0_4_25_backdoor_sol_exclude__0.txt | 2 + ...ackdoor_0_6_11_backdoor_sol_exclude__0.txt | 2 + ...Backdoor_0_7_6_backdoor_sol_exclude__0.txt | 2 + ...BadPRNG_0_4_25_bad_prng_sol_exclude__0.txt | 8 + ...BadPRNG_0_6_11_bad_prng_sol_exclude__0.txt | 8 + ..._BadPRNG_0_7_6_bad_prng_sol_exclude__0.txt | 8 + ...boolean_constant_misuse_sol_exclude__0.txt | 3 + ...boolean_constant_misuse_sol_exclude__0.txt | 3 + ...boolean_constant_misuse_sol_exclude__0.txt | 3 + ...olean_constant_equality_sol_exclude__0.txt | 3 + ...olean_constant_equality_sol_exclude__0.txt | 3 + ...olean_constant_equality_sol_exclude__0.txt | 3 + ...olean_constant_equality_sol_exclude__0.txt | 3 + ...adowing_builtin_symbols_sol_exclude__0.txt | 26 +++ ...0_8_17_CacheArrayLength_sol_exclude__0.txt | 20 ++ ...ionsAsm_0_4_25_constant_sol_exclude__0.txt | 2 + ...ionsAsm_0_6_11_constant_sol_exclude__0.txt | 0 ...tionsAsm_0_7_6_constant_sol_exclude__0.txt | 0 ...nsState_0_4_25_constant_sol_exclude__0.txt | 6 + ...nsState_0_5_16_constant_sol_exclude__0.txt | 0 ...nsState_0_6_11_constant_sol_exclude__0.txt | 0 ...ma_0_4_25_pragma_0_4_25_sol_exclude__0.txt | 6 + ...ma_0_5_16_pragma_0_5_16_sol_exclude__0.txt | 6 + ...ma_0_6_11_pragma_0_6_11_sol_exclude__0.txt | 6 + ...controlled_delegatecall_sol_exclude__0.txt | 6 + ...controlled_delegatecall_sol_exclude__0.txt | 6 + ...controlled_delegatecall_sol_exclude__0.txt | 6 + ...stly_operations_in_loop_sol_exclude__0.txt | 12 ++ ...stly_operations_in_loop_sol_exclude__0.txt | 12 ++ ...stly_operations_in_loop_sol_exclude__0.txt | 12 ++ ...stly_operations_in_loop_sol_exclude__0.txt | 12 ++ ...6_const_state_variables_sol_exclude__0.txt | 14 ++ ...1_const_state_variables_sol_exclude__0.txt | 14 ++ ...6_const_state_variables_sol_exclude__0.txt | 14 ++ ...0_const_state_variables_sol_exclude__0.txt | 14 ++ ...6_immut_state_variables_sol_exclude__0.txt | 0 ...1_immut_state_variables_sol_exclude__0.txt | 10 + ...6_immut_state_variables_sol_exclude__0.txt | 10 + ...0_immut_state_variables_sol_exclude__0.txt | 8 + ...ighCyclomaticComplexity_sol_exclude__0.txt | 2 + ...LowCyclomaticComplexity_sol_exclude__0.txt | 0 ...eadCode_0_8_0_dead_code_sol_exclude__0.txt | 6 + ..._5_16_delegatecall_loop_sol_exclude__0.txt | 6 + ..._6_11_delegatecall_loop_sol_exclude__0.txt | 6 + ...0_7_6_delegatecall_loop_sol_exclude__0.txt | 6 + ...0_8_0_delegatecall_loop_sol_exclude__0.txt | 6 + ...0_4_25_deprecated_calls_sol_exclude__0.txt | 6 + ..._divide_before_multiply_sol_exclude__0.txt | 3 + ..._divide_before_multiply_sol_exclude__0.txt | 3 + ..._divide_before_multiply_sol_exclude__0.txt | 3 + ...permit_domain_collision_sol_exclude__0.txt | 2 + ...ain_state_var_collision_sol_exclude__0.txt | 2 + ...omain_wrong_return_type_sol_exclude__0.txt | 2 + ...permit_domain_collision_sol_exclude__0.txt | 2 + ...ain_state_var_collision_sol_exclude__0.txt | 2 + ...omain_wrong_return_type_sol_exclude__0.txt | 2 + ...permit_domain_collision_sol_exclude__0.txt | 2 + ...ain_state_var_collision_sol_exclude__0.txt | 2 + ...omain_wrong_return_type_sol_exclude__0.txt | 2 + ...permit_domain_collision_sol_exclude__0.txt | 2 + ...ain_state_var_collision_sol_exclude__0.txt | 2 + ...omain_wrong_return_type_sol_exclude__0.txt | 2 + ...encode_packed_collision_sol_exclude__0.txt | 15 ++ ..._25_external_function_2_sol_exclude__0.txt | 0 ..._25_external_function_3_sol_exclude__0.txt | 9 + ..._16_external_function_2_sol_exclude__0.txt | 0 ..._5_16_external_function_sol_exclude__0.txt | 0 ..._11_external_function_2_sol_exclude__0.txt | 0 ..._11_external_function_3_sol_exclude__0.txt | 0 ..._6_11_external_function_sol_exclude__0.txt | 0 ...7_6_external_function_3_sol_exclude__0.txt | 0 ...0_7_6_external_function_sol_exclude__0.txt | 0 ...on_init_state_variables_sol_exclude__0.txt | 15 ++ ...on_init_state_variables_sol_exclude__0.txt | 15 ++ ...on_init_state_variables_sol_exclude__0.txt | 15 ++ ...correct_erc20_interface_sol_exclude__0.txt | 12 ++ ...correct_erc20_interface_sol_exclude__0.txt | 12 ++ ...correct_erc20_interface_sol_exclude__0.txt | 12 ++ ...orrect_erc721_interface_sol_exclude__0.txt | 20 ++ ...orrect_erc721_interface_sol_exclude__0.txt | 20 ++ ...orrect_erc721_interface_sol_exclude__0.txt | 20 ++ ...orrect_erc721_interface_sol_exclude__0.txt | 20 ++ ...ion_0_7_6_incorrect_exp_sol_exclude__0.txt | 9 + ...0_8_10_incorrect_return_sol_exclude__0.txt | 4 + ...rrectSolc_0_4_25_static_sol_exclude__0.txt | 21 +++ ...rrectSolc_0_5_14_static_sol_exclude__0.txt | 20 ++ ...ctSolc_0_5_16_dynamic_1_sol_exclude__0.txt | 19 ++ ...rrectSolc_0_5_16_static_sol_exclude__0.txt | 18 ++ ...rrectSolc_0_6_10_static_sol_exclude__0.txt | 17 ++ ...ctSolc_0_6_11_dynamic_1_sol_exclude__0.txt | 17 ++ ...ctSolc_0_6_11_dynamic_2_sol_exclude__0.txt | 19 ++ ...rrectSolc_0_6_11_static_sol_exclude__0.txt | 17 ++ ...ectSolc_0_7_6_dynamic_1_sol_exclude__0.txt | 15 ++ ...ectSolc_0_7_6_dynamic_2_sol_exclude__0.txt | 6 + ...orrectSolc_0_7_6_static_sol_exclude__0.txt | 15 ++ ...5_16_incorrect_equality_sol_exclude__0.txt | 36 ++++ ...6_11_incorrect_equality_sol_exclude__0.txt | 36 ++++ ..._7_6_incorrect_equality_sol_exclude__0.txt | 36 ++++ ...hadowing_local_variable_sol_exclude__0.txt | 20 ++ ...hadowing_local_variable_sol_exclude__0.txt | 23 +++ ...hadowing_local_variable_sol_exclude__0.txt | 21 +++ ...hadowing_local_variable_sol_exclude__0.txt | 21 +++ ...her_0_5_16_locked_ether_sol_exclude__0.txt | 10 + ...her_0_6_11_locked_ether_sol_exclude__0.txt | 5 + ...ther_0_7_6_locked_ether_sol_exclude__0.txt | 5 + ..._0_4_25_low_level_calls_sol_exclude__0.txt | 3 + ..._0_5_16_low_level_calls_sol_exclude__0.txt | 3 + ..._0_6_11_low_level_calls_sol_exclude__0.txt | 3 + ...s_0_7_6_low_level_calls_sol_exclude__0.txt | 3 + ..._0_4_25_MappingDeletion_sol_exclude__0.txt | 9 + ..._0_6_11_MappingDeletion_sol_exclude__0.txt | 9 + ...n_0_7_6_MappingDeletion_sol_exclude__0.txt | 9 + ...g_events_access_control_sol_exclude__0.txt | 9 + ...g_events_access_control_sol_exclude__0.txt | 9 + ...g_events_access_control_sol_exclude__0.txt | 9 + ...ssing_events_arithmetic_sol_exclude__0.txt | 6 + ...ssing_events_arithmetic_sol_exclude__0.txt | 6 + ...ssing_events_arithmetic_sol_exclude__0.txt | 6 + ...unimplemented_interface_sol_exclude__0.txt | 2 + ...unimplemented_interface_sol_exclude__0.txt | 2 + ...unimplemented_interface_sol_exclude__0.txt | 2 + ...zero_address_validation_sol_exclude__0.txt | 16 ++ ...zero_address_validation_sol_exclude__0.txt | 16 ++ ...zero_address_validation_sol_exclude__0.txt | 16 ++ ...zero_address_validation_sol_exclude__0.txt | 16 ++ ...0_4_25_modifier_default_sol_exclude__0.txt | 6 + ...0_5_16_modifier_default_sol_exclude__0.txt | 6 + ...0_6_11_modifier_default_sol_exclude__0.txt | 6 + ..._0_7_6_modifier_default_sol_exclude__0.txt | 6 + ...p_0_5_16_msg_value_loop_sol_exclude__0.txt | 6 + ...p_0_6_11_msg_value_loop_sol_exclude__0.txt | 6 + ...op_0_7_6_msg_value_loop_sol_exclude__0.txt | 6 + ...op_0_8_0_msg_value_loop_sol_exclude__0.txt | 6 + ..._multiple_calls_in_loop_sol_exclude__0.txt | 8 + ..._multiple_calls_in_loop_sol_exclude__0.txt | 8 + ..._multiple_calls_in_loop_sol_exclude__0.txt | 8 + ...ple_constructor_schemes_sol_exclude__0.txt | 4 + ..._4_25_naming_convention_sol_exclude__0.txt | 34 ++++ ...ng_for_public_constants_sol_exclude__0.txt | 0 ..._5_16_naming_convention_sol_exclude__0.txt | 34 ++++ ...ng_for_public_constants_sol_exclude__0.txt | 0 ..._6_11_naming_convention_sol_exclude__0.txt | 36 ++++ ...ng_for_public_constants_sol_exclude__0.txt | 0 ...ng_for_public_constants_sol_exclude__0.txt | 0 ..._out_of_order_retryable_sol_exclude__0.txt | 16 ++ ..._public_mappings_nested_sol_exclude__0.txt | 2 + ...25_redundant_statements_sol_exclude__0.txt | 12 ++ ...11_redundant_statements_sol_exclude__0.txt | 12 ++ ..._6_redundant_statements_sol_exclude__0.txt | 12 ++ ..._4_25_reentrancy_benign_sol_exclude__0.txt | 50 +++++ ..._5_16_reentrancy_benign_sol_exclude__0.txt | 50 +++++ ...0_7_6_reentrancy_benign_sol_exclude__0.txt | 50 +++++ ...eentrancyEth_0_4_25_DAO_sol_exclude__0.txt | 72 ++++++++ ...cyEth_0_4_25_reentrancy_sol_exclude__0.txt | 32 ++++ ..._16_reentrancy_indirect_sol_exclude__0.txt | 15 ++ ...cyEth_0_5_16_reentrancy_sol_exclude__0.txt | 28 +++ ..._11_reentrancy_indirect_sol_exclude__0.txt | 15 ++ ...cyEth_0_6_11_reentrancy_sol_exclude__0.txt | 28 +++ ...7_6_reentrancy_indirect_sol_exclude__0.txt | 15 ++ ...rancy_filtered_comments_sol_exclude__0.txt | 9 + ...ancy_with_non_reentrant_sol_exclude__0.txt | 32 ++++ ..._5_16_reentrancy_events_sol_exclude__0.txt | 6 + ..._6_11_reentrancy_events_sol_exclude__0.txt | 6 + ...0_7_6_reentrancy_events_sol_exclude__0.txt | 6 + ...eforeWritten_0_4_25_DAO_sol_exclude__0.txt | 171 ++++++++++++++++++ ...0_4_25_reentrancy_write_sol_exclude__0.txt | 25 +++ ...o_reentrancy_staticcall_sol_exclude__0.txt | 0 ...0_5_16_reentrancy_write_sol_exclude__0.txt | 25 +++ ...o_reentrancy_staticcall_sol_exclude__0.txt | 0 ...0_6_11_reentrancy_write_sol_exclude__0.txt | 25 +++ ...reWritten_0_8_2_comment_sol_exclude__0.txt | 0 ...Bomb_0_8_20_return_bomb_sol_exclude__0.txt | 5 + ...0_8_10_incorrect_return_sol_exclude__0.txt | 2 + ...reused_base_constructor_sol_exclude__0.txt | 24 +++ ...reused_base_constructor_sol_exclude__0.txt | 35 ++++ ..._right_to_left_override_sol_exclude__0.txt | 3 + ..._right_to_left_override_sol_exclude__0.txt | 3 + ...code_direction_override_sol_exclude__0.txt | 9 + ...4_25_shadowing_abstract_sol_exclude__0.txt | 3 + ...5_16_shadowing_abstract_sol_exclude__0.txt | 3 + ...7_5_public_gap_variable_sol_exclude__0.txt | 3 + ...hadowing_state_variable_sol_exclude__0.txt | 0 ...5_shift_parameter_mixup_sol_exclude__0.txt | 0 ...6_shift_parameter_mixup_sol_exclude__0.txt | 0 ...6_shift_parameter_mixup_sol_exclude__0.txt | 2 + ...hadowing_state_variable_sol_exclude__0.txt | 3 + ...hadowing_state_variable_sol_exclude__0.txt | 0 ...7_5_public_gap_variable_sol_exclude__0.txt | 3 + ...hadowing_state_variable_sol_exclude__0.txt | 0 ...ge_signed_integer_array_sol_exclude__0.txt | 0 ...uicidal_0_4_25_suicidal_sol_exclude__0.txt | 2 + ...uicidal_0_5_16_suicidal_sol_exclude__0.txt | 2 + ...Suicidal_0_7_6_suicidal_sol_exclude__0.txt | 4 + ...estamp_0_4_25_timestamp_sol_exclude__0.txt | 12 ++ ...estamp_0_5_16_timestamp_sol_exclude__0.txt | 12 ++ ...estamp_0_6_11_timestamp_sol_exclude__0.txt | 12 ++ ...mestamp_0_7_6_timestamp_sol_exclude__0.txt | 12 ++ ..._0_4_25_too_many_digits_sol_exclude__0.txt | 15 ++ ..._0_6_11_too_many_digits_sol_exclude__0.txt | 15 ++ ...s_0_7_6_too_many_digits_sol_exclude__0.txt | 15 ++ ...Origin_0_4_25_tx_origin_sol_exclude__0.txt | 4 + ...Origin_0_5_16_tx_origin_sol_exclude__0.txt | 4 + ...Origin_0_6_11_tx_origin_sol_exclude__0.txt | 4 + ...25_type_based_tautology_sol_exclude__0.txt | 6 + ...16_type_based_tautology_sol_exclude__0.txt | 6 + ...11_type_based_tautology_sol_exclude__0.txt | 6 + ...4_25_unchecked_lowlevel_sol_exclude__0.txt | 2 + ...6_11_unchecked_lowlevel_sol_exclude__0.txt | 2 + ..._7_6_unchecked_lowlevel_sol_exclude__0.txt | 2 + ...d_0_4_25_unchecked_send_sol_exclude__0.txt | 2 + ...d_0_5_16_unchecked_send_sol_exclude__0.txt | 2 + ...nd_0_7_6_unchecked_send_sol_exclude__0.txt | 2 + ...on_0_4_25_unimplemented_sol_exclude__0.txt | 13 ++ ...nimplemented_interfaces_sol_exclude__0.txt | 0 ...on_0_5_16_unimplemented_sol_exclude__0.txt | 7 + ...nimplemented_interfaces_sol_exclude__0.txt | 0 ...on_0_6_11_unimplemented_sol_exclude__0.txt | 10 + ...nimplemented_interfaces_sol_exclude__0.txt | 0 ...rs_0_4_25_erc20_indexed_sol_exclude__0.txt | 8 + ...rs_0_5_16_erc20_indexed_sol_exclude__0.txt | 8 + ...ers_0_7_6_erc20_indexed_sol_exclude__0.txt | 8 + ...unction_ptr_constructor_sol_exclude__0.txt | 0 ...unction_ptr_constructor_sol_exclude__0.txt | 12 ++ ...tialized_local_variable_sol_exclude__0.txt | 2 + ...tialized_local_variable_sol_exclude__0.txt | 2 + ...tialized_local_variable_sol_exclude__0.txt | 2 + ...on_0_5_16_uninitialized_sol_exclude__0.txt | 12 ++ ...on_0_6_11_uninitialized_sol_exclude__0.txt | 12 ++ ...ion_0_7_6_uninitialized_sol_exclude__0.txt | 12 ++ ...ialized_storage_pointer_sol_exclude__0.txt | 2 + ...e_0_4_25_AnyInitializer_sol_exclude__0.txt | 1 + ...pgradeable_0_4_25_Buggy_sol_exclude__0.txt | 1 + ...pgradeable_0_4_25_Fixed_sol_exclude__0.txt | 0 ...le_0_4_25_Reinitializer_sol_exclude__0.txt | 1 + ...e_0_5_16_AnyInitializer_sol_exclude__0.txt | 1 + ...pgradeable_0_5_16_Buggy_sol_exclude__0.txt | 1 + ...pgradeable_0_5_16_Fixed_sol_exclude__0.txt | 0 ...le_0_5_16_Reinitializer_sol_exclude__0.txt | 1 + ...able_0_5_16_whitelisted_sol_exclude__0.txt | 0 ...e_0_6_11_AnyInitializer_sol_exclude__0.txt | 1 + ...pgradeable_0_6_11_Buggy_sol_exclude__0.txt | 1 + ...le_0_6_11_Reinitializer_sol_exclude__0.txt | 1 + ...able_0_6_11_whitelisted_sol_exclude__0.txt | 0 ...le_0_7_6_AnyInitializer_sol_exclude__0.txt | 1 + ...Upgradeable_0_7_6_Buggy_sol_exclude__0.txt | 1 + ...Upgradeable_0_7_6_Fixed_sol_exclude__0.txt | 0 ...ble_0_7_6_Reinitializer_sol_exclude__0.txt | 1 + ...eable_0_7_6_whitelisted_sol_exclude__0.txt | 0 ...e_0_8_15_AnyInitializer_sol_exclude__0.txt | 1 + ...pgradeable_0_8_15_Fixed_sol_exclude__0.txt | 0 ...le_0_8_15_Reinitializer_sol_exclude__0.txt | 1 + ...able_0_8_15_whitelisted_sol_exclude__0.txt | 0 ...n_UnusedImport_0_8_16_C_sol_exclude__0.txt | 6 + ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...ctLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...opLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...ractUsedInContractTest1_sol_exclude__0.txt | 0 ...ractUsedInContractTest2_sol_exclude__0.txt | 0 ...ontractUsedTopLevelTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...ctLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...evelUsedInContractTest1_sol_exclude__0.txt | 0 ...evelUsedInContractTest2_sol_exclude__0.txt | 0 ...evelUsedInContractTest4_sol_exclude__0.txt | 0 ...tLevelUsedTopLevelTest1_sol_exclude__0.txt | 0 ...tLevelUsedTopLevelTest2_sol_exclude__0.txt | 0 ...evelUsedInContractTest1_sol_exclude__0.txt | 0 ...evelUsedInContractTest3_sol_exclude__0.txt | 0 ...evelUsedInContractTest4_sol_exclude__0.txt | 0 ...pLevelUsedTopLevelTest1_sol_exclude__0.txt | 0 ...pLevelUsedTopLevelTest2_sol_exclude__0.txt | 0 ...ctLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...opLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...opLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...braryUsedInContractTest_sol_exclude__0.txt | 0 ...LibraryUsedTopLevelTest_sol_exclude__0.txt | 0 ...ctLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...LevelUsedInContractTest_sol_exclude__0.txt | 0 ...opLevelUsedTopLevelTest_sol_exclude__0.txt | 0 ...es_0_4_25_unused_return_sol_exclude__0.txt | 8 + ...es_0_5_16_unused_return_sol_exclude__0.txt | 8 + ...es_0_6_11_unused_return_sol_exclude__0.txt | 8 + ...ues_0_7_6_unused_return_sol_exclude__0.txt | 8 + ...ars_0_4_25_unused_state_sol_exclude__0.txt | 8 + ...ars_0_5_16_unused_state_sol_exclude__0.txt | 8 + ...ars_0_6_11_unused_state_sol_exclude__0.txt | 8 + ...Vars_0_7_6_unused_state_sol_exclude__0.txt | 12 ++ ..._25_var_read_using_this_sol_exclude__0.txt | 0 ..._16_var_read_using_this_sol_exclude__0.txt | 8 + ..._11_var_read_using_this_sol_exclude__0.txt | 8 + ..._15_var_read_using_this_sol_exclude__0.txt | 8 + ...tructor_0_4_25_void_cst_sol_exclude__0.txt | 3 + ...tructor_0_6_11_void_cst_sol_exclude__0.txt | 3 + ...structor_0_7_6_void_cst_sol_exclude__0.txt | 3 + ...0_8_0_write_after_write_sol_exclude__0.txt | 12 ++ tests/e2e/detectors/test_detectors.py | 4 +- 327 files changed, 2701 insertions(+), 2 deletions(-) create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_4_25_storage_ABIEncoderV2_array_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_10_storage_ABIEncoderV2_array_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_4_25_arbitrary_send_erc20_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_5_16_arbitrary_send_erc20_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_6_11_arbitrary_send_erc20_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_7_6_arbitrary_send_erc20_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_inheritance_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_4_25_arbitrary_send_erc20_permit_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_5_16_arbitrary_send_erc20_permit_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_6_11_arbitrary_send_erc20_permit_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_8_0_arbitrary_send_erc20_permit_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_4_25_arbitrary_send_eth_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_6_11_arbitrary_send_eth_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_7_6_arbitrary_send_eth_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_4_25_array_by_reference_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_5_16_array_by_reference_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_6_11_array_by_reference_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_7_6_array_by_reference_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_4_25_array_length_assignment_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_contract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_library_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_library_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_contract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_library_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_contract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_5_16_assert_state_change_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_6_11_assert_state_change_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_7_6_assert_state_change_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_4_25_backdoor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_6_11_backdoor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_7_6_backdoor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_4_25_bad_prng_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_6_11_bad_prng_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_7_6_bad_prng_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_5_16_boolean_constant_misuse_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_6_11_boolean_constant_misuse_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_7_6_boolean_constant_misuse_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_4_25_boolean_constant_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_5_16_boolean_constant_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_6_11_boolean_constant_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_7_6_boolean_constant_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CacheArrayLength_0_8_17_CacheArrayLength_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_4_25_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_6_11_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_7_6_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_4_25_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_5_16_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_6_11_constant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_4_25_pragma_0_4_25_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_5_16_pragma_0_5_16_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_6_11_pragma_0_6_11_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_5_16_controlled_delegatecall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_6_11_controlled_delegatecall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_7_6_controlled_delegatecall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_4_25_multiple_costly_operations_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_5_16_multiple_costly_operations_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_6_11_multiple_costly_operations_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_7_6_multiple_costly_operations_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_5_16_const_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_6_11_const_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_7_6_const_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_8_0_const_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_5_16_immut_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_6_11_immut_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_7_6_immut_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_8_0_immut_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_HighCyclomaticComplexity_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_LowCyclomaticComplexity_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DeadCode_0_8_0_dead_code_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_5_16_delegatecall_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_6_11_delegatecall_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_7_6_delegatecall_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_8_0_delegatecall_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DeprecatedStandards_0_4_25_deprecated_calls_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_4_25_divide_before_multiply_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_5_16_divide_before_multiply_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_7_6_divide_before_multiply_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_state_var_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_wrong_return_type_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_state_var_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_wrong_return_type_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_state_var_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_wrong_return_type_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_state_var_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_wrong_return_type_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_EncodePackedCollision_0_7_6_encode_packed_collision_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_5_16_function_init_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_6_11_function_init_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_7_6_function_init_state_variables_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_4_25_incorrect_erc20_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_5_16_incorrect_erc20_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_6_11_incorrect_erc20_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_4_25_incorrect_erc721_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_5_16_incorrect_erc721_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_6_11_incorrect_erc721_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_7_6_incorrect_erc721_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectReturn_0_8_10_incorrect_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_4_25_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_14_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_10_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_static_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_5_16_incorrect_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_6_11_incorrect_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_7_6_incorrect_equality_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_4_25_shadowing_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_5_16_shadowing_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_6_11_shadowing_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_7_6_shadowing_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_5_16_locked_ether_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_6_11_locked_ether_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_7_6_locked_ether_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_4_25_low_level_calls_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_5_16_low_level_calls_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_6_11_low_level_calls_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_7_6_low_level_calls_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_4_25_MappingDeletion_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_6_11_MappingDeletion_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_7_6_MappingDeletion_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_4_25_missing_events_access_control_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_5_16_missing_events_access_control_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_7_6_missing_events_access_control_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_4_25_missing_events_arithmetic_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_5_16_missing_events_arithmetic_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_6_11_missing_events_arithmetic_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_4_25_unimplemented_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_5_16_unimplemented_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_6_11_unimplemented_interface_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_4_25_missing_zero_address_validation_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_5_16_missing_zero_address_validation_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_6_11_missing_zero_address_validation_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_7_6_missing_zero_address_validation_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_4_25_modifier_default_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_5_16_modifier_default_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_6_11_modifier_default_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_7_6_modifier_default_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_5_16_msg_value_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_6_11_msg_value_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_7_6_msg_value_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_8_0_msg_value_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_5_16_multiple_calls_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_6_11_multiple_calls_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_7_6_multiple_calls_in_loop_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleConstructorSchemes_0_4_22_multiple_constructor_schemes_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_naming_convention_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_no_warning_for_public_constants_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_naming_convention_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_no_warning_for_public_constants_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_naming_convention_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_no_warning_for_public_constants_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_no_warning_for_public_constants_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_OutOfOrderRetryable_0_8_20_out_of_order_retryable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_PublicMappingNested_0_4_25_public_mappings_nested_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_4_25_redundant_statements_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_6_11_redundant_statements_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_7_6_redundant_statements_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_4_25_reentrancy_benign_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_5_16_reentrancy_benign_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_7_6_reentrancy_benign_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_DAO_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_indirect_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_indirect_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_indirect_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_filtered_comments_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_with_non_reentrant_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_5_16_reentrancy_events_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_6_11_reentrancy_events_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_7_6_reentrancy_events_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_DAO_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_reentrancy_write_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_no_reentrancy_staticcall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_reentrancy_write_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_no_reentrancy_staticcall_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_reentrancy_write_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_8_2_comment_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnBomb_0_8_20_return_bomb_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_21_reused_base_constructor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_25_reused_base_constructor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_5_16_right_to_left_override_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_6_11_right_to_left_override_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_8_0_unicode_direction_override_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_4_25_shadowing_abstract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_5_16_shadowing_abstract_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_public_gap_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_4_25_shift_parameter_mixup_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_5_16_shift_parameter_mixup_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_7_6_shift_parameter_mixup_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_5_16_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_6_11_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_public_gap_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_shadowing_state_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_16_storage_signed_integer_array_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_4_25_suicidal_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_5_16_suicidal_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_7_6_suicidal_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_4_25_timestamp_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_5_16_timestamp_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_6_11_timestamp_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_7_6_timestamp_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_4_25_too_many_digits_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_6_11_too_many_digits_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_7_6_too_many_digits_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_4_25_tx_origin_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_5_16_tx_origin_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_6_11_tx_origin_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_4_25_type_based_tautology_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_5_16_type_based_tautology_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_6_11_type_based_tautology_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_4_25_unchecked_lowlevel_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_6_11_unchecked_lowlevel_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_7_6_unchecked_lowlevel_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_4_25_unchecked_send_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_5_16_unchecked_send_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_7_6_unchecked_send_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_4_25_unimplemented_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_interfaces_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_interfaces_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_interfaces_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_16_uninitialized_function_ptr_constructor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_8_uninitialized_function_ptr_constructor_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_4_25_uninitialized_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_5_16_uninitialized_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_6_11_uninitialized_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_7_6_uninitialized_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_8_19_uninitialized_storage_pointer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_AnyInitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Buggy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Fixed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Reinitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_AnyInitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Buggy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Fixed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Reinitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_whitelisted_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_AnyInitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Buggy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Reinitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_whitelisted_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_AnyInitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Buggy_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Fixed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Reinitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_whitelisted_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_AnyInitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Fixed_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Reinitializer_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_whitelisted_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_C_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest4_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest3_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest4_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest1_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest2_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedInContractTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedTopLevelTest_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_4_25_unused_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_5_16_unused_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_6_11_unused_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_7_6_unused_return_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_4_25_unused_state_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_5_16_unused_state_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_6_11_unused_state_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_7_6_unused_state_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_4_25_var_read_using_this_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_5_16_var_read_using_this_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_6_11_var_read_using_this_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_8_15_var_read_using_this_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_4_25_void_cst_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_6_11_void_cst_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_7_6_void_cst_sol_exclude__0.txt create mode 100644 tests/e2e/detectors/snapshots/detectors__exclude_location_WriteAfterWrite_0_8_0_write_after_write_sol_exclude__0.txt diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_4_25_storage_ABIEncoderV2_array_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_4_25_storage_ABIEncoderV2_array_sol_exclude__0.txt new file mode 100644 index 0000000000..d362ecb704 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_4_25_storage_ABIEncoderV2_array_sol_exclude__0.txt @@ -0,0 +1,18 @@ +Function A.bad3() trigger an abi encoding bug: + - b = abi.encode(s) + +Function A.bad0() trigger an abi encoding bug: + - this.bad0_external(bad_arr) + +Function A.bad4() trigger an abi encoding bug: + - event1_bad(bad_arr) + +Function A.bad2() trigger an abi encoding bug: + - b = abi.encode(bad_arr) + +Function A.bad1(A.S[3]) trigger an abi encoding bug: + - this.bad1_external(s) + +Function A.bad5() trigger an abi encoding bug: + - event2_bad(s) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_10_storage_ABIEncoderV2_array_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ABIEncoderV2Array_0_5_10_storage_ABIEncoderV2_array_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_4_25_arbitrary_send_erc20_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_4_25_arbitrary_send_erc20_sol_exclude__0.txt new file mode 100644 index 0000000000..b5632b9660 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_4_25_arbitrary_send_erc20_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad4(address,address,uint256) uses arbitrary from in transferFrom: SafeERC20.safeTransferFrom(erc20,from,to,amount) + +C.bad1(address,uint256) uses arbitrary from in transferFrom: erc20.transferFrom(notsend,to,am) + +C.bad3(address,address,uint256) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,to,amount) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_5_16_arbitrary_send_erc20_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_5_16_arbitrary_send_erc20_sol_exclude__0.txt new file mode 100644 index 0000000000..5ca09af509 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_5_16_arbitrary_send_erc20_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad4(address,address,uint256) uses arbitrary from in transferFrom: SafeERC20.safeTransferFrom(erc20,from,to,amount) + +C.bad3(address,address,uint256) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,to,amount) + +C.bad1(address,uint256) uses arbitrary from in transferFrom: erc20.transferFrom(notsend,to,am) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_6_11_arbitrary_send_erc20_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_6_11_arbitrary_send_erc20_sol_exclude__0.txt new file mode 100644 index 0000000000..377a22e1e2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_6_11_arbitrary_send_erc20_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad1(address,uint256) uses arbitrary from in transferFrom: erc20.transferFrom(notsend,to,am) + +C.bad3(address,address,uint256) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,to,amount) + +C.bad4(address,address,uint256) uses arbitrary from in transferFrom: SafeERC20.safeTransferFrom(erc20,from,to,amount) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_7_6_arbitrary_send_erc20_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_7_6_arbitrary_send_erc20_sol_exclude__0.txt new file mode 100644 index 0000000000..5ca09af509 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_7_6_arbitrary_send_erc20_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad4(address,address,uint256) uses arbitrary from in transferFrom: SafeERC20.safeTransferFrom(erc20,from,to,amount) + +C.bad3(address,address,uint256) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,to,amount) + +C.bad1(address,uint256) uses arbitrary from in transferFrom: erc20.transferFrom(notsend,to,am) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_inheritance_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_inheritance_sol_exclude__0.txt new file mode 100644 index 0000000000..4fb16f4c3d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20NoPermit_0_8_0_arbitrary_send_erc20_inheritance_sol_exclude__0.txt @@ -0,0 +1,2 @@ +T.bad(address) uses arbitrary from in transferFrom: erc20.safeTransferFrom(from,address(0x1),90) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_4_25_arbitrary_send_erc20_permit_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_4_25_arbitrary_send_erc20_permit_sol_exclude__0.txt new file mode 100644 index 0000000000..8e80225229 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_4_25_arbitrary_send_erc20_permit_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.int_transferFrom(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad3(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.safeTransferFrom(from,to,value) + +C.bad4(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: SafeERC20.safeTransferFrom(erc20,from,to,value) + +C.bad1(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_5_16_arbitrary_send_erc20_permit_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_5_16_arbitrary_send_erc20_permit_sol_exclude__0.txt new file mode 100644 index 0000000000..0f6b6de8d2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_5_16_arbitrary_send_erc20_permit_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.int_transferFrom(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad4(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: SafeERC20.safeTransferFrom(erc20,from,to,value) + +C.bad3(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.safeTransferFrom(from,to,value) + +C.bad1(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_6_11_arbitrary_send_erc20_permit_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_6_11_arbitrary_send_erc20_permit_sol_exclude__0.txt new file mode 100644 index 0000000000..5f8294264e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_6_11_arbitrary_send_erc20_permit_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.bad3(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.safeTransferFrom(from,to,value) + +C.bad4(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: SafeERC20.safeTransferFrom(erc20,from,to,value) + +C.int_transferFrom(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad1(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_8_0_arbitrary_send_erc20_permit_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_8_0_arbitrary_send_erc20_permit_sol_exclude__0.txt new file mode 100644 index 0000000000..5f8294264e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendErc20Permit_0_8_0_arbitrary_send_erc20_permit_sol_exclude__0.txt @@ -0,0 +1,8 @@ +C.bad3(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.safeTransferFrom(from,to,value) + +C.bad4(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: SafeERC20.safeTransferFrom(erc20,from,to,value) + +C.int_transferFrom(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + +C.bad1(address,uint256,uint256,uint8,bytes32,bytes32,address) uses arbitrary from in transferFrom in combination with permit: erc20.transferFrom(from,to,value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_4_25_arbitrary_send_eth_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_4_25_arbitrary_send_eth_sol_exclude__0.txt new file mode 100644 index 0000000000..f818afbb03 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_4_25_arbitrary_send_eth_sol_exclude__0.txt @@ -0,0 +1,8 @@ +Test.indirect() sends eth to arbitrary user + Dangerous calls: + - destination.send(address(this).balance) + +Test.direct() sends eth to arbitrary user + Dangerous calls: + - msg.sender.send(address(this).balance) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_6_11_arbitrary_send_eth_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_6_11_arbitrary_send_eth_sol_exclude__0.txt new file mode 100644 index 0000000000..f818afbb03 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_6_11_arbitrary_send_eth_sol_exclude__0.txt @@ -0,0 +1,8 @@ +Test.indirect() sends eth to arbitrary user + Dangerous calls: + - destination.send(address(this).balance) + +Test.direct() sends eth to arbitrary user + Dangerous calls: + - msg.sender.send(address(this).balance) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_7_6_arbitrary_send_eth_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_7_6_arbitrary_send_eth_sol_exclude__0.txt new file mode 100644 index 0000000000..6734b75c22 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArbitrarySendEth_0_7_6_arbitrary_send_eth_sol_exclude__0.txt @@ -0,0 +1,8 @@ +Test.direct() sends eth to arbitrary user + Dangerous calls: + - msg.sender.send(address(this).balance) + +Test.indirect() sends eth to arbitrary user + Dangerous calls: + - destination.send(address(this).balance) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_4_25_array_by_reference_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_4_25_array_by_reference_sol_exclude__0.txt new file mode 100644 index 0000000000..a1012e1c06 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_4_25_array_by_reference_sol_exclude__0.txt @@ -0,0 +1,14 @@ +D.f() passes array D.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +D.f() passes array D.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValue(uint256[1]) which only takes arrays by value + +E.f() passes array E.x by reference to E.setByValue(uint256[1],uint256[1]) which only takes arrays by value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_5_16_array_by_reference_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_5_16_array_by_reference_sol_exclude__0.txt new file mode 100644 index 0000000000..a1012e1c06 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_5_16_array_by_reference_sol_exclude__0.txt @@ -0,0 +1,14 @@ +D.f() passes array D.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +D.f() passes array D.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValue(uint256[1]) which only takes arrays by value + +E.f() passes array E.x by reference to E.setByValue(uint256[1],uint256[1]) which only takes arrays by value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_6_11_array_by_reference_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_6_11_array_by_reference_sol_exclude__0.txt new file mode 100644 index 0000000000..a1012e1c06 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_6_11_array_by_reference_sol_exclude__0.txt @@ -0,0 +1,14 @@ +D.f() passes array D.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +D.f() passes array D.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValue(uint256[1]) which only takes arrays by value + +E.f() passes array E.x by reference to E.setByValue(uint256[1],uint256[1]) which only takes arrays by value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_7_6_array_by_reference_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_7_6_array_by_reference_sol_exclude__0.txt new file mode 100644 index 0000000000..a1012e1c06 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayByReference_0_7_6_array_by_reference_sol_exclude__0.txt @@ -0,0 +1,14 @@ +D.f() passes array D.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.f() passes array C.x by reference to C.setByValue(uint256[1]) which only takes arrays by value + +D.f() passes array D.x by reference to C.setByValueAndReturn(uint256[1]) which only takes arrays by value + +C.g() passes array C.g().y by reference to C.setByValue(uint256[1]) which only takes arrays by value + +E.f() passes array E.x by reference to E.setByValue(uint256[1],uint256[1]) which only takes arrays by value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_4_25_array_length_assignment_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_4_25_array_length_assignment_sol_exclude__0.txt new file mode 100644 index 0000000000..aa8e559d4d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ArrayLengthAssignment_0_4_25_array_length_assignment_sol_exclude__0.txt @@ -0,0 +1,9 @@ +ArrayLengthAssignment contract sets array length with a user-controlled value: + - b.subStruct.x.length = param + 1 + +ArrayLengthAssignment contract sets array length with a user-controlled value: + - a.x.length = param + +ArrayLengthAssignment contract sets array length with a user-controlled value: + - arr.length = param + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_contract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_contract_sol_exclude__0.txt new file mode 100644 index 0000000000..24f3e8331c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_contract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +GetCode.at(address) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_library_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_library_sol_exclude__0.txt new file mode 100644 index 0000000000..02661a385b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_4_25_inline_assembly_library_sol_exclude__0.txt @@ -0,0 +1,6 @@ +VectorSum.sumPureAsm(uint256[]) uses assembly + - INLINE ASM + +VectorSum.sumAsm(uint256[]) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_library_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_library_sol_exclude__0.txt new file mode 100644 index 0000000000..912ee2e426 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_5_16_inline_assembly_library_sol_exclude__0.txt @@ -0,0 +1,6 @@ +VectorSum.sumAsm(uint256[]) uses assembly + - INLINE ASM + +VectorSum.sumPureAsm(uint256[]) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_contract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_contract_sol_exclude__0.txt new file mode 100644 index 0000000000..24f3e8331c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_contract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +GetCode.at(address) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_library_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_library_sol_exclude__0.txt new file mode 100644 index 0000000000..912ee2e426 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_6_11_inline_assembly_library_sol_exclude__0.txt @@ -0,0 +1,6 @@ +VectorSum.sumAsm(uint256[]) uses assembly + - INLINE ASM + +VectorSum.sumPureAsm(uint256[]) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_contract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_contract_sol_exclude__0.txt new file mode 100644 index 0000000000..24f3e8331c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Assembly_0_7_6_inline_assembly_contract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +GetCode.at(address) uses assembly + - INLINE ASM + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_5_16_assert_state_change_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_5_16_assert_state_change_sol_exclude__0.txt new file mode 100644 index 0000000000..3385d8c71b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_5_16_assert_state_change_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.bad1(uint256) has an assert() call which possibly changes state. + -assert(bool)((s_a += a) > 10) +Consider using require() or change the invariant to not modify the state. + +A.bad2() has an assert() call which possibly changes state. + -assert(bool)(bad2_callee()) +Consider using require() or change the invariant to not modify the state. + +A.bad0() has an assert() call which possibly changes state. + -assert(bool)((s_a += 1) > 10) +Consider using require() or change the invariant to not modify the state. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_6_11_assert_state_change_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_6_11_assert_state_change_sol_exclude__0.txt new file mode 100644 index 0000000000..dfe95d10ea --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_6_11_assert_state_change_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.bad0() has an assert() call which possibly changes state. + -assert(bool)((s_a += 1) > 10) +Consider using require() or change the invariant to not modify the state. + +A.bad1(uint256) has an assert() call which possibly changes state. + -assert(bool)((s_a += a) > 10) +Consider using require() or change the invariant to not modify the state. + +A.bad2() has an assert() call which possibly changes state. + -assert(bool)(bad2_callee()) +Consider using require() or change the invariant to not modify the state. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_7_6_assert_state_change_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_7_6_assert_state_change_sol_exclude__0.txt new file mode 100644 index 0000000000..335a3d09ba --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_AssertStateChange_0_7_6_assert_state_change_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.bad2() has an assert() call which possibly changes state. + -assert(bool)(bad2_callee()) +Consider using require() or change the invariant to not modify the state. + +A.bad1(uint256) has an assert() call which possibly changes state. + -assert(bool)((s_a += a) > 10) +Consider using require() or change the invariant to not modify the state. + +A.bad0() has an assert() call which possibly changes state. + -assert(bool)((s_a += 1) > 10) +Consider using require() or change the invariant to not modify the state. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_4_25_backdoor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_4_25_backdoor_sol_exclude__0.txt new file mode 100644 index 0000000000..1264e994d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_4_25_backdoor_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Backdoor function found in C.i_am_a_backdoor() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_6_11_backdoor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_6_11_backdoor_sol_exclude__0.txt new file mode 100644 index 0000000000..1264e994d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_6_11_backdoor_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Backdoor function found in C.i_am_a_backdoor() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_7_6_backdoor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_7_6_backdoor_sol_exclude__0.txt new file mode 100644 index 0000000000..1264e994d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Backdoor_0_7_6_backdoor_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Backdoor function found in C.i_am_a_backdoor() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_4_25_bad_prng_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_4_25_bad_prng_sol_exclude__0.txt new file mode 100644 index 0000000000..92582678f0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_4_25_bad_prng_sol_exclude__0.txt @@ -0,0 +1,8 @@ +BadPRNG.bad1() uses a weak PRNG: "i = now % 10" + +BadPRNG.bad2() uses a weak PRNG: "i = uint256(blockhash(uint256)(10000)) % 10" + +BadPRNG.bad3() uses a weak PRNG: "i = foo() % 10" + +BadPRNG.bad0() uses a weak PRNG: "i = block.timestamp % 10" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_6_11_bad_prng_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_6_11_bad_prng_sol_exclude__0.txt new file mode 100644 index 0000000000..9712050803 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_6_11_bad_prng_sol_exclude__0.txt @@ -0,0 +1,8 @@ +BadPRNG.bad1() uses a weak PRNG: "i = now % 10" + +BadPRNG.bad0() uses a weak PRNG: "i = block.timestamp % 10" + +BadPRNG.bad2() uses a weak PRNG: "i = uint256(blockhash(uint256)(10000)) % 10" + +BadPRNG.bad3() uses a weak PRNG: "i = foo() % 10" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_7_6_bad_prng_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_7_6_bad_prng_sol_exclude__0.txt new file mode 100644 index 0000000000..1cea540cd4 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BadPRNG_0_7_6_bad_prng_sol_exclude__0.txt @@ -0,0 +1,8 @@ +BadPRNG.bad3() uses a weak PRNG: "i = foo() % 10" + +BadPRNG.bad2() uses a weak PRNG: "i = uint256(blockhash(uint256)(10000)) % 10" + +BadPRNG.bad1() uses a weak PRNG: "i = block.timestamp % 10" + +BadPRNG.bad0() uses a weak PRNG: "i = block.timestamp % 10" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_5_16_boolean_constant_misuse_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_5_16_boolean_constant_misuse_sol_exclude__0.txt new file mode 100644 index 0000000000..39ce86d4b6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_5_16_boolean_constant_misuse_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) uses a Boolean constant improperly: + -(b || true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_6_11_boolean_constant_misuse_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_6_11_boolean_constant_misuse_sol_exclude__0.txt new file mode 100644 index 0000000000..39ce86d4b6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_6_11_boolean_constant_misuse_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) uses a Boolean constant improperly: + -(b || true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_7_6_boolean_constant_misuse_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_7_6_boolean_constant_misuse_sol_exclude__0.txt new file mode 100644 index 0000000000..39ce86d4b6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanConstantMisuse_0_7_6_boolean_constant_misuse_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) uses a Boolean constant improperly: + -(b || true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_4_25_boolean_constant_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_4_25_boolean_constant_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..d1551769bf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_4_25_boolean_constant_equality_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) compares to a boolean constant: + -(b == true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_5_16_boolean_constant_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_5_16_boolean_constant_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..d1551769bf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_5_16_boolean_constant_equality_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) compares to a boolean constant: + -(b == true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_6_11_boolean_constant_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_6_11_boolean_constant_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..d1551769bf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_6_11_boolean_constant_equality_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) compares to a boolean constant: + -(b == true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_7_6_boolean_constant_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_7_6_boolean_constant_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..d1551769bf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BooleanEquality_0_7_6_boolean_constant_equality_sol_exclude__0.txt @@ -0,0 +1,3 @@ +MyConc.bad1(bool) compares to a boolean constant: + -(b == true) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol_exclude__0.txt new file mode 100644 index 0000000000..00e4679de7 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_BuiltinSymbolShadowing_0_4_25_shadowing_builtin_symbols_sol_exclude__0.txt @@ -0,0 +1,26 @@ +Reserved.mutable (state variable) shadows built-in symbol" + +ExtendedContract.ecrecover (state variable) shadows built-in symbol" + +FurtherExtendedContract.require().keccak256 (local variable) shadows built-in symbol" + +FurtherExtendedContract.abi (state variable) shadows built-in symbol" + +BaseContract.blockhash (state variable) shadows built-in symbol" + +FurtherExtendedContract.this (state variable) shadows built-in symbol" + +BaseContract.now (state variable) shadows built-in symbol" + +ExtendedContract.assert(bool).msg (local variable) shadows built-in symbol" + +ExtendedContract.assert(bool) (function) shadows built-in symbol" + +BaseContract.revert(bool) (event) shadows built-in symbol" + +FurtherExtendedContract.require().sha3 (local variable) shadows built-in symbol" + +FurtherExtendedContract.blockhash (state variable) shadows built-in symbol" + +FurtherExtendedContract.require() (modifier) shadows built-in symbol" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CacheArrayLength_0_8_17_CacheArrayLength_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CacheArrayLength_0_8_17_CacheArrayLength_sol_exclude__0.txt new file mode 100644 index 0000000000..f9647c9629 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CacheArrayLength_0_8_17_CacheArrayLength_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Loop condition k_scope_17 < array2.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_23 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition j_scope_11 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_4 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_22 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition k_scope_9 < array2.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_6 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition j_scope_15 < array.length should use cached array length instead of referencing `length` member of the storage array. + +Loop condition i_scope_21 < array.length should use cached array length instead of referencing `length` member of the storage array. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_4_25_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_4_25_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..40df44c023 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_4_25_constant_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Constant.test_assembly_bug() is declared view but contains assembly code + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_6_11_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_6_11_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_7_6_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsAsm_0_7_6_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_4_25_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_4_25_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..1f52f58ceb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_4_25_constant_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Constant.test_constant_bug() is declared view but changes state variables: + - Constant.a + +Constant.test_view_bug() is declared view but changes state variables: + - Constant.a + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_5_16_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_5_16_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_6_11_constant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantFunctionsState_0_6_11_constant_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_4_25_pragma_0_4_25_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_4_25_pragma_0_4_25_sol_exclude__0.txt new file mode 100644 index 0000000000..717ca87499 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_4_25_pragma_0_4_25_sol_exclude__0.txt @@ -0,0 +1,6 @@ +2 different versions of Solidity are used: + - Version constraint ^0.4.25 is used by: + - tests/e2e/detectors/test_data/pragma/0.4.25/pragma.0.4.25.sol#1 + - Version constraint ^0.4.24 is used by: + - tests/e2e/detectors/test_data/pragma/0.4.25/pragma.0.4.24.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_5_16_pragma_0_5_16_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_5_16_pragma_0_5_16_sol_exclude__0.txt new file mode 100644 index 0000000000..ae5543f3d5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_5_16_pragma_0_5_16_sol_exclude__0.txt @@ -0,0 +1,6 @@ +2 different versions of Solidity are used: + - Version constraint ^0.5.16 is used by: + - tests/e2e/detectors/test_data/pragma/0.5.16/pragma.0.5.16.sol#1 + - Version constraint ^0.5.15 is used by: + - tests/e2e/detectors/test_data/pragma/0.5.16/pragma.0.5.15.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_6_11_pragma_0_6_11_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_6_11_pragma_0_6_11_sol_exclude__0.txt new file mode 100644 index 0000000000..f8ccb74bb9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ConstantPragma_0_6_11_pragma_0_6_11_sol_exclude__0.txt @@ -0,0 +1,6 @@ +2 different versions of Solidity are used: + - Version constraint ^0.6.11 is used by: + - tests/e2e/detectors/test_data/pragma/0.6.11/pragma.0.6.11.sol#1 + - Version constraint ^0.6.10 is used by: + - tests/e2e/detectors/test_data/pragma/0.6.11/pragma.0.6.10.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_5_16_controlled_delegatecall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_5_16_controlled_delegatecall_sol_exclude__0.txt new file mode 100644 index 0000000000..8e8cb01456 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_5_16_controlled_delegatecall_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad_delegate_call2(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(abi.encode(func_id,data)) + +C.bad_delegate_call(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(data) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_6_11_controlled_delegatecall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_6_11_controlled_delegatecall_sol_exclude__0.txt new file mode 100644 index 0000000000..8e8cb01456 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_6_11_controlled_delegatecall_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad_delegate_call2(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(abi.encode(func_id,data)) + +C.bad_delegate_call(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(data) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_7_6_controlled_delegatecall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_7_6_controlled_delegatecall_sol_exclude__0.txt new file mode 100644 index 0000000000..8e8cb01456 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ControlledDelegateCall_0_7_6_controlled_delegatecall_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad_delegate_call2(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(abi.encode(func_id,data)) + +C.bad_delegate_call(bytes) uses delegatecall to a input-controlled function id + - addr_bad.delegatecall(data) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_4_25_multiple_costly_operations_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_4_25_multiple_costly_operations_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..a34557a241 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_4_25_multiple_costly_operations_in_loop_sol_exclude__0.txt @@ -0,0 +1,12 @@ +CostlyOperationsInLoopBase.bad_base() has costly operations inside a loop: + - state_variable_base ++ + +CostlyOperationsInLoop.bad3_internal() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad2() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad() has costly operations inside a loop: + - state_variable ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_5_16_multiple_costly_operations_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_5_16_multiple_costly_operations_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..954c0999b0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_5_16_multiple_costly_operations_in_loop_sol_exclude__0.txt @@ -0,0 +1,12 @@ +CostlyOperationsInLoopBase.bad_base() has costly operations inside a loop: + - state_variable_base ++ + +CostlyOperationsInLoop.bad2() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad3_internal() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad() has costly operations inside a loop: + - state_variable ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_6_11_multiple_costly_operations_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_6_11_multiple_costly_operations_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..dcc7072ee1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_6_11_multiple_costly_operations_in_loop_sol_exclude__0.txt @@ -0,0 +1,12 @@ +CostlyOperationsInLoop.bad() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad2() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad3_internal() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoopBase.bad_base() has costly operations inside a loop: + - state_variable_base ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_7_6_multiple_costly_operations_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_7_6_multiple_costly_operations_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..e5e34ce49c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CostlyOperationsInLoop_0_7_6_multiple_costly_operations_in_loop_sol_exclude__0.txt @@ -0,0 +1,12 @@ +CostlyOperationsInLoop.bad3_internal() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoopBase.bad_base() has costly operations inside a loop: + - state_variable_base ++ + +CostlyOperationsInLoop.bad2() has costly operations inside a loop: + - state_variable ++ + +CostlyOperationsInLoop.bad() has costly operations inside a loop: + - state_variable ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_5_16_const_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_5_16_const_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..774aad622e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_5_16_const_state_variables_sol_exclude__0.txt @@ -0,0 +1,14 @@ +MyConc.should_be_constant_3 should be constant + +A.text2 should be constant + +B.mySistersAddress should be constant + +A.myFriendsAddress should be constant + +MyConc.should_be_constant should be constant + +MyConc.should_be_constant_2 should be constant + +A.test should be constant + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_6_11_const_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_6_11_const_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..5c28fa962e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_6_11_const_state_variables_sol_exclude__0.txt @@ -0,0 +1,14 @@ +A.text2 should be constant + +Bad.should_be_constant_2 should be constant + +B.mySistersAddress should be constant + +A.myFriendsAddress should be constant + +Bad.should_be_constant should be constant + +Bad.should_be_constant_3 should be constant + +A.test should be constant + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_7_6_const_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_7_6_const_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..5c28fa962e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_7_6_const_state_variables_sol_exclude__0.txt @@ -0,0 +1,14 @@ +A.text2 should be constant + +Bad.should_be_constant_2 should be constant + +B.mySistersAddress should be constant + +A.myFriendsAddress should be constant + +Bad.should_be_constant should be constant + +Bad.should_be_constant_3 should be constant + +A.test should be constant + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_8_0_const_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_8_0_const_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..5c28fa962e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeConstant_0_8_0_const_state_variables_sol_exclude__0.txt @@ -0,0 +1,14 @@ +A.text2 should be constant + +Bad.should_be_constant_2 should be constant + +B.mySistersAddress should be constant + +A.myFriendsAddress should be constant + +Bad.should_be_constant should be constant + +Bad.should_be_constant_3 should be constant + +A.test should be constant + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_5_16_immut_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_5_16_immut_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_6_11_immut_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_6_11_immut_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe395a46b2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_6_11_immut_state_variables_sol_exclude__0.txt @@ -0,0 +1,10 @@ +Bad.should_be_immutable_5 should be immutable + +Bad.should_be_immutable_2 should be immutable + +Bad.should_be_immutable_4 should be immutable + +Bad.should_be_immutable should be immutable + +Bad.should_be_immutable_3 should be immutable + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_7_6_immut_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_7_6_immut_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe395a46b2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_7_6_immut_state_variables_sol_exclude__0.txt @@ -0,0 +1,10 @@ +Bad.should_be_immutable_5 should be immutable + +Bad.should_be_immutable_2 should be immutable + +Bad.should_be_immutable_4 should be immutable + +Bad.should_be_immutable should be immutable + +Bad.should_be_immutable_3 should be immutable + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_8_0_immut_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_8_0_immut_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fc92547fbb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CouldBeImmutable_0_8_0_immut_state_variables_sol_exclude__0.txt @@ -0,0 +1,8 @@ +Bad.should_be_immutable_5 should be immutable + +Bad.should_be_immutable_2 should be immutable + +Bad.should_be_immutable should be immutable + +Bad.should_be_immutable_3 should be immutable + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_HighCyclomaticComplexity_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_HighCyclomaticComplexity_sol_exclude__0.txt new file mode 100644 index 0000000000..6a0b75a4a0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_HighCyclomaticComplexity_sol_exclude__0.txt @@ -0,0 +1,2 @@ +HighCyclomaticComplexity.highCC() has a high cyclomatic complexity (12). + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_LowCyclomaticComplexity_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_CyclomaticComplexity_0_8_16_LowCyclomaticComplexity_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DeadCode_0_8_0_dead_code_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DeadCode_0_8_0_dead_code_sol_exclude__0.txt new file mode 100644 index 0000000000..67bf09bf11 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DeadCode_0_8_0_dead_code_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Test4.unused_but_shadowed() is never used and should be removed + +Test.unused() is never used and should be removed + +Test2.unused_but_shadowed() is never used and should be removed + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_5_16_delegatecall_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_5_16_delegatecall_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..35180115f8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_5_16_delegatecall_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad3(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad2_internal(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_6_11_delegatecall_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_6_11_delegatecall_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..32c32014d4 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_6_11_delegatecall_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad2_internal(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad3(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_7_6_delegatecall_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_7_6_delegatecall_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..f560769d71 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_7_6_delegatecall_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad3(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad2_internal(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_8_0_delegatecall_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_8_0_delegatecall_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..32c32014d4 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DelegatecallInLoop_0_8_0_delegatecall_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad2_internal(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + +C.bad3(address[]) has delegatecall inside a loop in a payable function: address(this).delegatecall(abi.encodeWithSignature(addBalance(address),receivers[i])) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DeprecatedStandards_0_4_25_deprecated_calls_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DeprecatedStandards_0_4_25_deprecated_calls_sol_exclude__0.txt new file mode 100644 index 0000000000..530fc1cb22 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DeprecatedStandards_0_4_25_deprecated_calls_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Deprecated standard detected THROW: + - Usage of "throw" should be replaced with "revert()" + +Deprecated standard detected msg.gas == msg.value: + - Usage of "msg.gas" should be replaced with "gasleft()" + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_4_25_divide_before_multiply_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_4_25_divide_before_multiply_sol_exclude__0.txt new file mode 100644 index 0000000000..f63c77f262 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_4_25_divide_before_multiply_sol_exclude__0.txt @@ -0,0 +1,3 @@ +A.f(uint256,uint256,uint256) performs a multiplication on the result of a division: + - (a / b) * c + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_5_16_divide_before_multiply_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_5_16_divide_before_multiply_sol_exclude__0.txt new file mode 100644 index 0000000000..f63c77f262 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_5_16_divide_before_multiply_sol_exclude__0.txt @@ -0,0 +1,3 @@ +A.f(uint256,uint256,uint256) performs a multiplication on the result of a division: + - (a / b) * c + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_7_6_divide_before_multiply_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_7_6_divide_before_multiply_sol_exclude__0.txt new file mode 100644 index 0000000000..f63c77f262 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DivideBeforeMultiply_0_7_6_divide_before_multiply_sol_exclude__0.txt @@ -0,0 +1,3 @@ +A.f(uint256,uint256,uint256) performs a multiplication on the result of a division: + - (a / b) * c + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..03a63e26ed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_state_var_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_state_var_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..e68dc2134f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_state_var_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_wrong_return_type_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_wrong_return_type_sol_exclude__0.txt new file mode 100644 index 0000000000..ba552eeaa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_4_25_permit_domain_wrong_return_type_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.DOMAIN_SEPARATOR() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..03a63e26ed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_state_var_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_state_var_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..e68dc2134f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_state_var_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_wrong_return_type_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_wrong_return_type_sol_exclude__0.txt new file mode 100644 index 0000000000..ba552eeaa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_5_16_permit_domain_wrong_return_type_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.DOMAIN_SEPARATOR() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..03a63e26ed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_state_var_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_state_var_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..e68dc2134f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_state_var_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_wrong_return_type_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_wrong_return_type_sol_exclude__0.txt new file mode 100644 index 0000000000..ba552eeaa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_6_11_permit_domain_wrong_return_type_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.DOMAIN_SEPARATOR() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..03a63e26ed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_state_var_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_state_var_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..e68dc2134f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_state_var_collision_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.fopwCDKKK collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_wrong_return_type_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_wrong_return_type_sol_exclude__0.txt new file mode 100644 index 0000000000..ba552eeaa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_DomainSeparatorCollision_0_8_0_permit_domain_wrong_return_type_sol_exclude__0.txt @@ -0,0 +1,2 @@ +The function signature of ERC20.DOMAIN_SEPARATOR() collides with DOMAIN_SEPARATOR and should be renamed or removed. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_EncodePackedCollision_0_7_6_encode_packed_collision_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_EncodePackedCollision_0_7_6_encode_packed_collision_sol_exclude__0.txt new file mode 100644 index 0000000000..3598f72d1a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_EncodePackedCollision_0_7_6_encode_packed_collision_sol_exclude__0.txt @@ -0,0 +1,15 @@ +EncodePackedCollision.bad4(bytes,bytes) calls abi.encodePacked() with multiple dynamic arguments: + - packed = abi.encodePacked(a,a2,a3,a) + +EncodePackedCollision.bad2(string,uint256[]) calls abi.encodePacked() with multiple dynamic arguments: + - packed = abi.encodePacked(stra,arra) + +EncodePackedCollision.bad3_get_hash_for_signature(string,string) calls abi.encodePacked() with multiple dynamic arguments: + - keccak256(bytes)(abi.encodePacked(name,doc)) + +EncodePackedCollision.bad0(string,string) calls abi.encodePacked() with multiple dynamic arguments: + - packed = abi.encodePacked(stra,strb) + +EncodePackedCollision.bad1(string,bytes) calls abi.encodePacked() with multiple dynamic arguments: + - packed = abi.encodePacked(stra,bytesa) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_3_sol_exclude__0.txt new file mode 100644 index 0000000000..a38a899e48 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_4_25_external_function_3_sol_exclude__0.txt @@ -0,0 +1,9 @@ +bad2(uint256[]) should be declared external: + - Test.bad2(uint256[]) + +bad(bytes) should be declared external: + - Test.bad(bytes) + +bad3(string) should be declared external: + - Test.bad3(string) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_5_16_external_function_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_3_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_6_11_external_function_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_3_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ExternalFunction_0_7_6_external_function_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_5_16_function_init_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_5_16_function_init_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe94692581 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_5_16_function_init_state_variables_sol_exclude__0.txt @@ -0,0 +1,15 @@ +StateVarInitFromFunction.v is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.z4 is set pre-construction with a non-constant function or state variable: + - z3 + 5 + +StateVarInitFromFunction.x is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.y1 is set pre-construction with a non-constant function or state variable: + - 5 + get() + +StateVarInitFromFunction.y2 is set pre-construction with a non-constant function or state variable: + - (10 + (5 + get())) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_6_11_function_init_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_6_11_function_init_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe94692581 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_6_11_function_init_state_variables_sol_exclude__0.txt @@ -0,0 +1,15 @@ +StateVarInitFromFunction.v is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.z4 is set pre-construction with a non-constant function or state variable: + - z3 + 5 + +StateVarInitFromFunction.x is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.y1 is set pre-construction with a non-constant function or state variable: + - 5 + get() + +StateVarInitFromFunction.y2 is set pre-construction with a non-constant function or state variable: + - (10 + (5 + get())) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_7_6_function_init_state_variables_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_7_6_function_init_state_variables_sol_exclude__0.txt new file mode 100644 index 0000000000..fe94692581 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_FunctionInitializedState_0_7_6_function_init_state_variables_sol_exclude__0.txt @@ -0,0 +1,15 @@ +StateVarInitFromFunction.v is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.z4 is set pre-construction with a non-constant function or state variable: + - z3 + 5 + +StateVarInitFromFunction.x is set pre-construction with a non-constant function or state variable: + - set() + +StateVarInitFromFunction.y1 is set pre-construction with a non-constant function or state variable: + - 5 + get() + +StateVarInitFromFunction.y2 is set pre-construction with a non-constant function or state variable: + - (10 + (5 + get())) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_4_25_incorrect_erc20_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_4_25_incorrect_erc20_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..9e58f85af0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_4_25_incorrect_erc20_interface_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Token has incorrect ERC20 function interface:Token.approve(address,uint256) + +Token has incorrect ERC20 function interface:Token.allowance(address,address) + +Token has incorrect ERC20 function interface:Token.balanceOf(address) + +Token has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC20 function interface:Token.totalSupply() + +Token has incorrect ERC20 function interface:Token.transfer(address,uint256) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_5_16_incorrect_erc20_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_5_16_incorrect_erc20_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..9e58f85af0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_5_16_incorrect_erc20_interface_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Token has incorrect ERC20 function interface:Token.approve(address,uint256) + +Token has incorrect ERC20 function interface:Token.allowance(address,address) + +Token has incorrect ERC20 function interface:Token.balanceOf(address) + +Token has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC20 function interface:Token.totalSupply() + +Token has incorrect ERC20 function interface:Token.transfer(address,uint256) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_6_11_incorrect_erc20_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_6_11_incorrect_erc20_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..9e58f85af0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC20InterfaceDetection_0_6_11_incorrect_erc20_interface_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Token has incorrect ERC20 function interface:Token.approve(address,uint256) + +Token has incorrect ERC20 function interface:Token.allowance(address,address) + +Token has incorrect ERC20 function interface:Token.balanceOf(address) + +Token has incorrect ERC20 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC20 function interface:Token.totalSupply() + +Token has incorrect ERC20 function interface:Token.transfer(address,uint256) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_4_25_incorrect_erc721_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_4_25_incorrect_erc721_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..42abfd5ca5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_4_25_incorrect_erc721_interface_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Token has incorrect ERC721 function interface:Token.getApproved(uint256) + +Token has incorrect ERC721 function interface:Token.approve(address,uint256) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:Token.balanceOf(address) + +Token has incorrect ERC721 function interface:Token.ownerOf(uint256) + +Token has incorrect ERC721 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) + +Token has incorrect ERC721 function interface:Token.setApprovalForAll(address,bool) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) + +Token has incorrect ERC721 function interface:Token.isApprovedForAll(address,address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_5_16_incorrect_erc721_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_5_16_incorrect_erc721_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..42abfd5ca5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_5_16_incorrect_erc721_interface_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Token has incorrect ERC721 function interface:Token.getApproved(uint256) + +Token has incorrect ERC721 function interface:Token.approve(address,uint256) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:Token.balanceOf(address) + +Token has incorrect ERC721 function interface:Token.ownerOf(uint256) + +Token has incorrect ERC721 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) + +Token has incorrect ERC721 function interface:Token.setApprovalForAll(address,bool) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) + +Token has incorrect ERC721 function interface:Token.isApprovedForAll(address,address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_6_11_incorrect_erc721_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_6_11_incorrect_erc721_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..42abfd5ca5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_6_11_incorrect_erc721_interface_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Token has incorrect ERC721 function interface:Token.getApproved(uint256) + +Token has incorrect ERC721 function interface:Token.approve(address,uint256) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:Token.balanceOf(address) + +Token has incorrect ERC721 function interface:Token.ownerOf(uint256) + +Token has incorrect ERC721 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) + +Token has incorrect ERC721 function interface:Token.setApprovalForAll(address,bool) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) + +Token has incorrect ERC721 function interface:Token.isApprovedForAll(address,address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_7_6_incorrect_erc721_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_7_6_incorrect_erc721_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..42abfd5ca5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectERC721InterfaceDetection_0_7_6_incorrect_erc721_interface_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Token has incorrect ERC721 function interface:Token.getApproved(uint256) + +Token has incorrect ERC721 function interface:Token.approve(address,uint256) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:Token.balanceOf(address) + +Token has incorrect ERC721 function interface:Token.ownerOf(uint256) + +Token has incorrect ERC721 function interface:Token.transferFrom(address,address,uint256) + +Token has incorrect ERC721 function interface:IERC165.supportsInterface(bytes4) + +Token has incorrect ERC721 function interface:Token.setApprovalForAll(address,bool) + +Token has incorrect ERC721 function interface:Token.safeTransferFrom(address,address,uint256,bytes) + +Token has incorrect ERC721 function interface:Token.isApprovedForAll(address,address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol_exclude__0.txt new file mode 100644 index 0000000000..459fe168ef --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectOperatorExponentiation_0_7_6_incorrect_exp_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Test.bad1() has bitwise-xor operator ^ instead of the exponentiation operator **: + - UINT_MAX = 2 ^ 256 - 1 + +Test.bad0(uint256) has bitwise-xor operator ^ instead of the exponentiation operator **: + - a ^ 2 + +Derived.slitherConstructorVariables() has bitwise-xor operator ^ instead of the exponentiation operator **: + - my_var = 2 ^ 256 - 1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectReturn_0_8_10_incorrect_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectReturn_0_8_10_incorrect_return_sol_exclude__0.txt new file mode 100644 index 0000000000..00d50e6ae2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectReturn_0_8_10_incorrect_return_sol_exclude__0.txt @@ -0,0 +1,4 @@ +C.bad1() calls C.indirect() which halt the execution return(uint256,uint256)(5,6) + +C.bad0() calls C.internal_return() which halt the execution return(uint256,uint256)(5,6) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_4_25_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_4_25_static_sol_exclude__0.txt new file mode 100644 index 0000000000..0a37cfba03 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_4_25_static_sol_exclude__0.txt @@ -0,0 +1,21 @@ +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 + - EmptyByteArrayCopy + - DynamicArrayCleanup + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - privateCanBeOverridden + - SignedArrayStorageCopy + - ABIEncoderV2StorageArrayWithMultiSlotElement + - DynamicConstructorArgumentsClippedABIV2 + - UninitializedFunctionPointerInConstructor_0.4.x + - IncorrectEventSignatureInLibraries_0.4.x + - ABIEncoderV2PackedStorage_0.4.x. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.4.25/static.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_14_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_14_static_sol_exclude__0.txt new file mode 100644 index 0000000000..7a65a5925d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_14_static_sol_exclude__0.txt @@ -0,0 +1,20 @@ +Version constraint 0.5.14 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - NestedCalldataArrayAbiReencodingSizeValidation + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup + - MissingEscapingInFormatting + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - privateCanBeOverridden + - YulOptimizerRedundantAssignmentBreakContinue0.5 + - ABIEncoderV2LoopYulOptimizer. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.5.14/static.sol#1 + +solc-0.5.14 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__exclude_location_IncorrectSolc_0_5_16_dynamic_1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_1_sol_exclude__0.txt new file mode 100644 index 0000000000..442355e38c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_dynamic_1_sol_exclude__0.txt @@ -0,0 +1,19 @@ +Version constraint ^0.5.15 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - NestedCalldataArrayAbiReencodingSizeValidation + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup + - MissingEscapingInFormatting + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - privateCanBeOverridden + - YulOptimizerRedundantAssignmentBreakContinue0.5. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.5.16/dynamic_1.sol#1 + +solc-0.5.16 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__exclude_location_IncorrectSolc_0_5_16_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_static_sol_exclude__0.txt new file mode 100644 index 0000000000..15f233fe73 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_5_16_static_sol_exclude__0.txt @@ -0,0 +1,18 @@ +Version constraint 0.5.16 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - NestedCalldataArrayAbiReencodingSizeValidation + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup + - MissingEscapingInFormatting + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - privateCanBeOverridden. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.5.16/static.sol#1 + +solc-0.5.16 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__exclude_location_IncorrectSolc_0_6_10_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_10_static_sol_exclude__0.txt new file mode 100644 index 0000000000..de41146274 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_10_static_sol_exclude__0.txt @@ -0,0 +1,17 @@ +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 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - FullInlinerNonExpressionSplitArgumentEvaluationOrder + - MissingSideEffectsOnSelectorAccess + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.6.10/static.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_1_sol_exclude__0.txt new file mode 100644 index 0000000000..626683d0ee --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_1_sol_exclude__0.txt @@ -0,0 +1,17 @@ +Version constraint ^0.6.10 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - FullInlinerNonExpressionSplitArgumentEvaluationOrder + - MissingSideEffectsOnSelectorAccess + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.6.11/dynamic_1.sol#1 + +solc-0.6.11 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__exclude_location_IncorrectSolc_0_6_11_dynamic_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_2_sol_exclude__0.txt new file mode 100644 index 0000000000..2142313f28 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_dynamic_2_sol_exclude__0.txt @@ -0,0 +1,19 @@ +Version constraint >=0.6.0<0.7.0 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - NestedCalldataArrayAbiReencodingSizeValidation + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup + - MissingEscapingInFormatting + - ArraySliceDynamicallyEncodedBaseType + - ImplicitConstructorCallvalueCheck + - TupleAssignmentMultiStackSlotComponents + - MemoryArrayCreationOverflow + - YulOptimizerRedundantAssignmentBreakContinue. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.6.11/dynamic_2.sol#1 + +solc-0.6.11 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__exclude_location_IncorrectSolc_0_6_11_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_static_sol_exclude__0.txt new file mode 100644 index 0000000000..ef330a1bbb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_6_11_static_sol_exclude__0.txt @@ -0,0 +1,17 @@ +Version constraint 0.6.11 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - FullInlinerNonExpressionSplitArgumentEvaluationOrder + - MissingSideEffectsOnSelectorAccess + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching + - EmptyByteArrayCopy + - DynamicArrayCleanup. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.6.11/static.sol#1 + +solc-0.6.11 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__exclude_location_IncorrectSolc_0_7_6_dynamic_1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_1_sol_exclude__0.txt new file mode 100644 index 0000000000..0a67e6f3ea --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_1_sol_exclude__0.txt @@ -0,0 +1,15 @@ +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 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) + - FullInlinerNonExpressionSplitArgumentEvaluationOrder + - MissingSideEffectsOnSelectorAccess + - AbiReencodingHeadOverflowWithStaticArrayCleanup + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.7.6/dynamic_1.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_2_sol_exclude__0.txt new file mode 100644 index 0000000000..ae3793886c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_dynamic_2_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Version constraint >=0.7.0<=0.7.6 is too complex. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.7.6/dynamic_2.sol#1 + +solc-0.7.6 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__exclude_location_IncorrectSolc_0_7_6_static_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_static_sol_exclude__0.txt new file mode 100644 index 0000000000..70bc412b75 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectSolc_0_7_6_static_sol_exclude__0.txt @@ -0,0 +1,15 @@ +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 + - DirtyBytesArrayToStorage + - DataLocationChangeInInternalOverride + - NestedCalldataArrayAbiReencodingSizeValidation + - SignedImmutables + - ABIDecodeTwoDimensionalArrayMemory + - KeccakCaching. + It is used by: + - tests/e2e/detectors/test_data/solc-version/0.7.6/static.sol#1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_5_16_incorrect_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_5_16_incorrect_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..8374fdb8fd --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_5_16_incorrect_equality_sol_exclude__0.txt @@ -0,0 +1,36 @@ +TestContractBalance.bad3() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(this).balance) + +TestContractBalance.bad0() uses a dangerous strict equality: + - require(bool)(address(address(this)).balance == 10000000000000000000) + +TestContractBalance.bad1() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(address(this)).balance) + +TestContractBalance.bad6() uses a dangerous strict equality: + - balance == 10000000000000000000 + +ERC20TestBalance.bad1(ERC20Variable) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(msg.sender) == 10) + +TestContractBalance.bad5() uses a dangerous strict equality: + - 10000000000000000000 == balance + +TestContractBalance.bad4() uses a dangerous strict equality: + - balance == 10000000000000000000 + +TestSolidityKeyword.bad1() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad2() uses a dangerous strict equality: + - require(bool)(address(this).balance == 10000000000000000000) + +ERC20TestBalance.bad0(ERC20Function) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(address(this)) == 10) + +TestSolidityKeyword.bad0() uses a dangerous strict equality: + - require(bool)(now == 0) + +TestSolidityKeyword.bad2() uses a dangerous strict equality: + - require(bool)(block.number == 0) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_6_11_incorrect_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_6_11_incorrect_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..e059925af9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_6_11_incorrect_equality_sol_exclude__0.txt @@ -0,0 +1,36 @@ +TestContractBalance.bad5() uses a dangerous strict equality: + - 10000000000000000000 == balance + +ERC20TestBalance.bad0(ERC20Function) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(address(this)) == 10) + +TestContractBalance.bad3() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(this).balance) + +TestContractBalance.bad6() uses a dangerous strict equality: + - balance == 10000000000000000000 + +TestSolidityKeyword.bad0() uses a dangerous strict equality: + - require(bool)(now == 0) + +TestContractBalance.bad2() uses a dangerous strict equality: + - require(bool)(address(this).balance == 10000000000000000000) + +ERC20TestBalance.bad1(ERC20Variable) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(msg.sender) == 10) + +TestSolidityKeyword.bad1() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad4() uses a dangerous strict equality: + - balance == 10000000000000000000 + +TestContractBalance.bad1() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(address(this)).balance) + +TestSolidityKeyword.bad2() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad0() uses a dangerous strict equality: + - require(bool)(address(address(this)).balance == 10000000000000000000) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_7_6_incorrect_equality_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_7_6_incorrect_equality_sol_exclude__0.txt new file mode 100644 index 0000000000..e6550585d5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_IncorrectStrictEquality_0_7_6_incorrect_equality_sol_exclude__0.txt @@ -0,0 +1,36 @@ +ERC20TestBalance.bad1(ERC20Variable) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(msg.sender) == 10) + +TestContractBalance.bad6() uses a dangerous strict equality: + - balance == 10000000000000000000 + +ERC20TestBalance.bad0(ERC20Function) uses a dangerous strict equality: + - require(bool)(erc.balanceOf(address(this)) == 10) + +TestContractBalance.bad1() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(address(this)).balance) + +TestSolidityKeyword.bad0() uses a dangerous strict equality: + - require(bool)(block.timestamp == 0) + +TestContractBalance.bad3() uses a dangerous strict equality: + - require(bool)(10000000000000000000 == address(this).balance) + +TestContractBalance.bad4() uses a dangerous strict equality: + - balance == 10000000000000000000 + +TestContractBalance.bad0() uses a dangerous strict equality: + - require(bool)(address(address(this)).balance == 10000000000000000000) + +TestSolidityKeyword.bad2() uses a dangerous strict equality: + - require(bool)(block.number == 0) + +TestContractBalance.bad5() uses a dangerous strict equality: + - 10000000000000000000 == balance + +TestContractBalance.bad2() uses a dangerous strict equality: + - require(bool)(address(this).balance == 10000000000000000000) + +TestSolidityKeyword.bad1() uses a dangerous strict equality: + - require(bool)(block.number == 0) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_4_25_shadowing_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_4_25_shadowing_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..bb6c9e5b7f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_4_25_shadowing_local_variable_sol_exclude__0.txt @@ -0,0 +1,20 @@ +FurtherExtendedContract.shadowingParent(uint256).x shadows: + - FurtherExtendedContract.x (state variable) + - ExtendedContract.x (state variable) + - BaseContract.x (state variable) + +LocalReturnVariables.shadowedState().state shadows: + - LocalReturnVariables.state (state variable) + +FurtherExtendedContract.shadowingParent(uint256).y shadows: + - BaseContract.y (state variable) + +FurtherExtendedContract.shadowingParent(uint256).v shadows: + - ExtendedContract.v() (event) + +FurtherExtendedContract.shadowingParent(uint256).w shadows: + - FurtherExtendedContract.w() (modifier) + +FurtherExtendedContract.shadowingParent(uint256).z shadows: + - ExtendedContract.z() (function) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_5_16_shadowing_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_5_16_shadowing_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..34657dbba1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_5_16_shadowing_local_variable_sol_exclude__0.txt @@ -0,0 +1,23 @@ +FurtherExtendedContract.shadowingParent(uint256).x shadows: + - FurtherExtendedContract.x (state variable) + - ExtendedContract.x (state variable) + - BaseContract.x (state variable) + +LocalReturnVariables.shadowedState().state shadows: + - LocalReturnVariables.state (state variable) + +FurtherExtendedContract.shadowingParent(uint256).y shadows: + - BaseContract.y (state variable) + +FurtherExtendedContract.shadowingParent(uint256).v shadows: + - ExtendedContract.v() (event) + +FurtherExtendedContract.shadowingParent(uint256).w shadows: + - FurtherExtendedContract.w() (modifier) + +LocalReturnVariables.shadowedReturn().local_scope_0 shadows: + - LocalReturnVariables.shadowedReturn().local (return variable) + +FurtherExtendedContract.shadowingParent(uint256).z shadows: + - ExtendedContract.z() (function) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_6_11_shadowing_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_6_11_shadowing_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..1b52b720ba --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_6_11_shadowing_local_variable_sol_exclude__0.txt @@ -0,0 +1,21 @@ +LocalReturnVariables.shadowedState().state shadows: + - LocalReturnVariables.state (state variable) + +FurtherExtendedContract.shadowingParent(uint256).y shadows: + - BaseContract.y (state variable) + +FurtherExtendedContract.shadowingParent(uint256).v shadows: + - ExtendedContract.v() (event) + +FurtherExtendedContract.shadowingParent(uint256).w shadows: + - FurtherExtendedContract.w() (modifier) + +FurtherExtendedContract.shadowingParent(uint256).__x shadows: + - FurtherExtendedContract.__x (state variable) + +LocalReturnVariables.shadowedReturn().local_scope_0 shadows: + - LocalReturnVariables.shadowedReturn().local (return variable) + +FurtherExtendedContract.shadowingParent(uint256).z shadows: + - ExtendedContract.z() (function) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_7_6_shadowing_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_7_6_shadowing_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..1b52b720ba --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LocalShadowing_0_7_6_shadowing_local_variable_sol_exclude__0.txt @@ -0,0 +1,21 @@ +LocalReturnVariables.shadowedState().state shadows: + - LocalReturnVariables.state (state variable) + +FurtherExtendedContract.shadowingParent(uint256).y shadows: + - BaseContract.y (state variable) + +FurtherExtendedContract.shadowingParent(uint256).v shadows: + - ExtendedContract.v() (event) + +FurtherExtendedContract.shadowingParent(uint256).w shadows: + - FurtherExtendedContract.w() (modifier) + +FurtherExtendedContract.shadowingParent(uint256).__x shadows: + - FurtherExtendedContract.__x (state variable) + +LocalReturnVariables.shadowedReturn().local_scope_0 shadows: + - LocalReturnVariables.shadowedReturn().local (return variable) + +FurtherExtendedContract.shadowingParent(uint256).z shadows: + - ExtendedContract.z() (function) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_5_16_locked_ether_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_5_16_locked_ether_sol_exclude__0.txt new file mode 100644 index 0000000000..bc4d3cf000 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_5_16_locked_ether_sol_exclude__0.txt @@ -0,0 +1,10 @@ +Contract locking ether found: + Contract OnlyLocked has payable functions: + - Locked.receive() + But does not have a function to withdraw the ether + +Contract locking ether found: + Contract UnlockedAssembly has payable functions: + - Locked.receive() + But does not have a function to withdraw the ether + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_6_11_locked_ether_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_6_11_locked_ether_sol_exclude__0.txt new file mode 100644 index 0000000000..0e5ed0985a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_6_11_locked_ether_sol_exclude__0.txt @@ -0,0 +1,5 @@ +Contract locking ether found: + Contract OnlyLocked has payable functions: + - Locked.receive_eth() + But does not have a function to withdraw the ether + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_7_6_locked_ether_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_7_6_locked_ether_sol_exclude__0.txt new file mode 100644 index 0000000000..0e5ed0985a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LockedEther_0_7_6_locked_ether_sol_exclude__0.txt @@ -0,0 +1,5 @@ +Contract locking ether found: + Contract OnlyLocked has payable functions: + - Locked.receive_eth() + But does not have a function to withdraw the ether + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_4_25_low_level_calls_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_4_25_low_level_calls_sol_exclude__0.txt new file mode 100644 index 0000000000..13cecf19eb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_4_25_low_level_calls_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Low level call in Sender.send(address): + - _receiver.call.value(msg.value).gas(7777)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_5_16_low_level_calls_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_5_16_low_level_calls_sol_exclude__0.txt new file mode 100644 index 0000000000..13cecf19eb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_5_16_low_level_calls_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Low level call in Sender.send(address): + - _receiver.call.value(msg.value).gas(7777)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_6_11_low_level_calls_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_6_11_low_level_calls_sol_exclude__0.txt new file mode 100644 index 0000000000..13cecf19eb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_6_11_low_level_calls_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Low level call in Sender.send(address): + - _receiver.call.value(msg.value).gas(7777)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_7_6_low_level_calls_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_7_6_low_level_calls_sol_exclude__0.txt new file mode 100644 index 0000000000..528d56dcd9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_LowLevelCalls_0_7_6_low_level_calls_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Low level call in Sender.send(address): + - _receiver.call{gas: 7777,value: msg.value}() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_4_25_MappingDeletion_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_4_25_MappingDeletion_sol_exclude__0.txt new file mode 100644 index 0000000000..2fe179b3f3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_4_25_MappingDeletion_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Balances.deleteNestedBalance() deletes Balances.BalancesStruct which contains a mapping: + -delete nestedStackBalance + +Lib.deleteSt(Lib.MyStruct[1]) deletes Lib.MyStruct which contains a mapping: + -delete st[0] + +Balances.deleteBalance(uint256) deletes Balances.BalancesStruct which contains a mapping: + -delete stackBalance[idx] + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_6_11_MappingDeletion_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_6_11_MappingDeletion_sol_exclude__0.txt new file mode 100644 index 0000000000..2fe179b3f3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_6_11_MappingDeletion_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Balances.deleteNestedBalance() deletes Balances.BalancesStruct which contains a mapping: + -delete nestedStackBalance + +Lib.deleteSt(Lib.MyStruct[1]) deletes Lib.MyStruct which contains a mapping: + -delete st[0] + +Balances.deleteBalance(uint256) deletes Balances.BalancesStruct which contains a mapping: + -delete stackBalance[idx] + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_7_6_MappingDeletion_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_7_6_MappingDeletion_sol_exclude__0.txt new file mode 100644 index 0000000000..0efe72edf9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MappingDeletionDetection_0_7_6_MappingDeletion_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Balances.deleteNestedBalance() deletes Balances.BalancesStruct which contains a mapping: + -delete nestedStackBalance + +Balances.deleteBalance(uint256) deletes Balances.BalancesStruct which contains a mapping: + -delete stackBalance[idx] + +Lib.deleteSt(Lib.MyStruct[1]) deletes Lib.MyStruct which contains a mapping: + -delete st[0] + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_4_25_missing_events_access_control_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_4_25_missing_events_access_control_sol_exclude__0.txt new file mode 100644 index 0000000000..4669830aa8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_4_25_missing_events_access_control_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Bug.bad2(address) should emit an event for: + - owner = newOwner + +Bug.bad0() should emit an event for: + - owner = msg.sender + +Bug.bad1(address) should emit an event for: + - owner = newOwner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_5_16_missing_events_access_control_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_5_16_missing_events_access_control_sol_exclude__0.txt new file mode 100644 index 0000000000..a5e033b428 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_5_16_missing_events_access_control_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Bug.bad1(address) should emit an event for: + - owner = newOwner + +Bug.bad0() should emit an event for: + - owner = msg.sender + +Bug.bad2(address) should emit an event for: + - owner = newOwner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_7_6_missing_events_access_control_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_7_6_missing_events_access_control_sol_exclude__0.txt new file mode 100644 index 0000000000..a5e033b428 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsAccessControl_0_7_6_missing_events_access_control_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Bug.bad1(address) should emit an event for: + - owner = newOwner + +Bug.bad0() should emit an event for: + - owner = msg.sender + +Bug.bad2(address) should emit an event for: + - owner = newOwner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_4_25_missing_events_arithmetic_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_4_25_missing_events_arithmetic_sol_exclude__0.txt new file mode 100644 index 0000000000..ab1fbc92fc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_4_25_missing_events_arithmetic_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Bug.bad1(int16) should emit an event for: + - iprice16 = _price + +Bug.bad0(uint8) should emit an event for: + - uprice8 = _price + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_5_16_missing_events_arithmetic_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_5_16_missing_events_arithmetic_sol_exclude__0.txt new file mode 100644 index 0000000000..ab1fbc92fc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_5_16_missing_events_arithmetic_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Bug.bad1(int16) should emit an event for: + - iprice16 = _price + +Bug.bad0(uint8) should emit an event for: + - uprice8 = _price + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_6_11_missing_events_arithmetic_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_6_11_missing_events_arithmetic_sol_exclude__0.txt new file mode 100644 index 0000000000..3b291a0019 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingEventsArithmetic_0_6_11_missing_events_arithmetic_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Bug.bad0(uint8) should emit an event for: + - uprice8 = _price + +Bug.bad1(int16) should emit an event for: + - iprice16 = _price + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_4_25_unimplemented_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_4_25_unimplemented_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..254adc0b3a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_4_25_unimplemented_interface_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Something should inherit from ISomething + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_5_16_unimplemented_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_5_16_unimplemented_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..254adc0b3a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_5_16_unimplemented_interface_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Something should inherit from ISomething + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_6_11_unimplemented_interface_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_6_11_unimplemented_interface_sol_exclude__0.txt new file mode 100644 index 0000000000..254adc0b3a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingInheritance_0_6_11_unimplemented_interface_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Something should inherit from ISomething + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_4_25_missing_zero_address_validation_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_4_25_missing_zero_address_validation_sol_exclude__0.txt new file mode 100644 index 0000000000..21e7e44d74 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_4_25_missing_zero_address_validation_sol_exclude__0.txt @@ -0,0 +1,16 @@ +C.bad4_call(address).addr lacks a zero-check on : + - addr.call.value(msg.value)() + +C.bad3_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad2_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad0_set_owner(address).new_owner lacks a zero-check on : + - owner = new_owner + +C.bad1_send(address).addr lacks a zero-check on : + - addr.send(msg.value) + - addr.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_5_16_missing_zero_address_validation_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_5_16_missing_zero_address_validation_sol_exclude__0.txt new file mode 100644 index 0000000000..74762c4282 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_5_16_missing_zero_address_validation_sol_exclude__0.txt @@ -0,0 +1,16 @@ +C.bad2_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad4_call(address).addr lacks a zero-check on : + - addr.call.value(msg.value)() + +C.bad0_set_owner(address).new_owner lacks a zero-check on : + - owner = new_owner + +C.bad3_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad1_send(address).addr lacks a zero-check on : + - addr.send(msg.value) + - addr.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_6_11_missing_zero_address_validation_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_6_11_missing_zero_address_validation_sol_exclude__0.txt new file mode 100644 index 0000000000..0700e46a5e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_6_11_missing_zero_address_validation_sol_exclude__0.txt @@ -0,0 +1,16 @@ +C.bad2_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad0_set_owner(address).new_owner lacks a zero-check on : + - owner = new_owner + +C.bad1_send(address).addr lacks a zero-check on : + - addr.send(msg.value) + - addr.send(msg.value) + +C.bad4_call(address).addr lacks a zero-check on : + - addr.call.value(msg.value)() + +C.bad3_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_7_6_missing_zero_address_validation_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_7_6_missing_zero_address_validation_sol_exclude__0.txt new file mode 100644 index 0000000000..7541c459f4 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MissingZeroAddressValidation_0_7_6_missing_zero_address_validation_sol_exclude__0.txt @@ -0,0 +1,16 @@ +C.bad1_send(address).addr lacks a zero-check on : + - addr.send(msg.value) + - addr.send(msg.value) + +C.bad3_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad4_call(address).addr lacks a zero-check on : + - addr.call{value: msg.value}() + +C.bad2_transfer(address).addr lacks a zero-check on : + - addr.transfer(msg.value) + +C.bad0_set_owner(address).new_owner lacks a zero-check on : + - owner = new_owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_4_25_modifier_default_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_4_25_modifier_default_sol_exclude__0.txt new file mode 100644 index 0000000000..9784a41fb3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_4_25_modifier_default_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Modifier Test.loopsNoResult() does not always execute _; or revert + +Modifier Test.requireAssertNoResult() does not always execute _; or revert + +Modifier Test.noResult() does not always execute _; or revert + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_5_16_modifier_default_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_5_16_modifier_default_sol_exclude__0.txt new file mode 100644 index 0000000000..9784a41fb3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_5_16_modifier_default_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Modifier Test.loopsNoResult() does not always execute _; or revert + +Modifier Test.requireAssertNoResult() does not always execute _; or revert + +Modifier Test.noResult() does not always execute _; or revert + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_6_11_modifier_default_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_6_11_modifier_default_sol_exclude__0.txt new file mode 100644 index 0000000000..9784a41fb3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_6_11_modifier_default_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Modifier Test.loopsNoResult() does not always execute _; or revert + +Modifier Test.requireAssertNoResult() does not always execute _; or revert + +Modifier Test.noResult() does not always execute _; or revert + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_7_6_modifier_default_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_7_6_modifier_default_sol_exclude__0.txt new file mode 100644 index 0000000000..9784a41fb3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ModifierDefaultDetection_0_7_6_modifier_default_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Modifier Test.loopsNoResult() does not always execute _; or revert + +Modifier Test.requireAssertNoResult() does not always execute _; or revert + +Modifier Test.noResult() does not always execute _; or revert + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_5_16_msg_value_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_5_16_msg_value_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..a107bd9bd2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_5_16_msg_value_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad3(address[]) use msg.value in a loop: balances[receivers[j]] += msg.value + +C.bad2_internal(address) use msg.value in a loop: balances[a] += msg.value + +C.bad(address[]) use msg.value in a loop: balances[receivers[i]] += msg.value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_6_11_msg_value_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_6_11_msg_value_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..f3cf28aa67 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_6_11_msg_value_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad2_internal(address) use msg.value in a loop: balances[a] += msg.value + +C.bad(address[]) use msg.value in a loop: balances[receivers[i]] += msg.value + +C.bad3(address[]) use msg.value in a loop: balances[receivers[j]] += msg.value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_7_6_msg_value_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_7_6_msg_value_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..2ab61f5b3b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_7_6_msg_value_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad2_internal(address) use msg.value in a loop: balances[a] += msg.value + +C.bad3(address[]) use msg.value in a loop: balances[receivers[j]] += msg.value + +C.bad(address[]) use msg.value in a loop: balances[receivers[i]] += msg.value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_8_0_msg_value_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_8_0_msg_value_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..2ab61f5b3b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MsgValueInLoop_0_8_0_msg_value_loop_sol_exclude__0.txt @@ -0,0 +1,6 @@ +C.bad2_internal(address) use msg.value in a loop: balances[a] += msg.value + +C.bad3(address[]) use msg.value in a loop: balances[receivers[j]] += msg.value + +C.bad(address[]) use msg.value in a loop: balances[receivers[i]] += msg.value + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_5_16_multiple_calls_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_5_16_multiple_calls_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..1bc0e7fd28 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_5_16_multiple_calls_in_loop_sol_exclude__0.txt @@ -0,0 +1,8 @@ +CallInLoop.bad3_internal(address,uint256) has external calls inside a loop: address(uint160(a)).transfer(i) + +CallInLoop.bad() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + +CallInLoop.bad2() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + +CallInLoopBase.bad_base() has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_6_11_multiple_calls_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_6_11_multiple_calls_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..0ff2718e16 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_6_11_multiple_calls_in_loop_sol_exclude__0.txt @@ -0,0 +1,8 @@ +CallInLoop.bad3_internal(address,uint256) has external calls inside a loop: address(uint160(a)).transfer(i) + +CallInLoopBase.bad_base() has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) + +CallInLoop.bad() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + +CallInLoop.bad2() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_7_6_multiple_calls_in_loop_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_7_6_multiple_calls_in_loop_sol_exclude__0.txt new file mode 100644 index 0000000000..000dadbb3c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleCallsInLoop_0_7_6_multiple_calls_in_loop_sol_exclude__0.txt @@ -0,0 +1,8 @@ +CallInLoop.bad() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + +CallInLoop.bad3_internal(address,uint256) has external calls inside a loop: address(uint160(a)).transfer(i) + +CallInLoopBase.bad_base() has external calls inside a loop: address(uint160(destinations_base[i])).transfer(i) + +CallInLoop.bad2() has external calls inside a loop: address(uint160(destinations[i])).transfer(i) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleConstructorSchemes_0_4_22_multiple_constructor_schemes_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleConstructorSchemes_0_4_22_multiple_constructor_schemes_sol_exclude__0.txt new file mode 100644 index 0000000000..ed7c485afc --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_MultipleConstructorSchemes_0_4_22_multiple_constructor_schemes_sol_exclude__0.txt @@ -0,0 +1,4 @@ +A contains multiple constructors in the same contract: + - A.constructor() + - A.A() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_naming_convention_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_naming_convention_sol_exclude__0.txt new file mode 100644 index 0000000000..ab671e400c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_naming_convention_sol_exclude__0.txt @@ -0,0 +1,34 @@ +Variable T.s_myStateVar is not in mixedCase + +Struct naming.test is not in CapWords + +Variable T.I is not in mixedCase + +Variable T.I is single letter l, O, or I, which should not be used + +Variable T.O is not in mixedCase + +Variable naming.Var_One is not in mixedCase + +Constant naming.MY_other_CONSTANT is not in UPPER_CASE_WITH_UNDERSCORES + +Contract naming is not in CapWords + +Enum naming.numbers is not in CapWords + +Parameter T.test(uint256,uint256)._used is not in mixedCase + +Variable T._myPublicVar is not in mixedCase + +Variable T.O is single letter l, O, or I, which should not be used + +Event naming.event_(uint256) is not in CapWords + +Modifier naming.CantDo() is not in mixedCase + +Function naming.GetOne() is not in mixedCase + +Variable T.l is single letter l, O, or I, which should not be used + +Parameter naming.setInt(uint256,uint256).Number2 is not in mixedCase + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_no_warning_for_public_constants_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_4_25_no_warning_for_public_constants_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_naming_convention_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_naming_convention_sol_exclude__0.txt new file mode 100644 index 0000000000..ab671e400c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_naming_convention_sol_exclude__0.txt @@ -0,0 +1,34 @@ +Variable T.s_myStateVar is not in mixedCase + +Struct naming.test is not in CapWords + +Variable T.I is not in mixedCase + +Variable T.I is single letter l, O, or I, which should not be used + +Variable T.O is not in mixedCase + +Variable naming.Var_One is not in mixedCase + +Constant naming.MY_other_CONSTANT is not in UPPER_CASE_WITH_UNDERSCORES + +Contract naming is not in CapWords + +Enum naming.numbers is not in CapWords + +Parameter T.test(uint256,uint256)._used is not in mixedCase + +Variable T._myPublicVar is not in mixedCase + +Variable T.O is single letter l, O, or I, which should not be used + +Event naming.event_(uint256) is not in CapWords + +Modifier naming.CantDo() is not in mixedCase + +Function naming.GetOne() is not in mixedCase + +Variable T.l is single letter l, O, or I, which should not be used + +Parameter naming.setInt(uint256,uint256).Number2 is not in mixedCase + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_no_warning_for_public_constants_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_5_16_no_warning_for_public_constants_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_naming_convention_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_naming_convention_sol_exclude__0.txt new file mode 100644 index 0000000000..10b925007a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_naming_convention_sol_exclude__0.txt @@ -0,0 +1,36 @@ +Variable T.s_myStateVar is not in mixedCase + +Struct naming.test is not in CapWords + +Variable T.I is not in mixedCase + +Variable T.I is single letter l, O, or I, which should not be used + +Variable T.O is not in mixedCase + +Variable naming.Var_One is not in mixedCase + +Constant naming.MY_other_CONSTANT is not in UPPER_CASE_WITH_UNDERSCORES + +Contract naming is not in CapWords + +Enum naming.numbers is not in CapWords + +Parameter T.test(uint256,uint256)._used is not in mixedCase + +Variable T._myPublicVar is not in mixedCase + +Variable T.O is single letter l, O, or I, which should not be used + +Event naming.event_(uint256) is not in CapWords + +Modifier naming.CantDo() is not in mixedCase + +Function naming.GetOne() is not in mixedCase + +Variable T.l is single letter l, O, or I, which should not be used + +Variable naming.i_myImutableVar is not in mixedCase + +Parameter naming.setInt(uint256,uint256).Number2 is not in mixedCase + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_no_warning_for_public_constants_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_6_11_no_warning_for_public_constants_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_no_warning_for_public_constants_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_NamingConvention_0_7_6_no_warning_for_public_constants_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_OutOfOrderRetryable_0_8_20_out_of_order_retryable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_OutOfOrderRetryable_0_8_20_out_of_order_retryable_sol_exclude__0.txt new file mode 100644 index 0000000000..1428c567c0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_OutOfOrderRetryable_0_8_20_out_of_order_retryable_sol_exclude__0.txt @@ -0,0 +1,16 @@ +Multiple retryable tickets created in the same function: + -Y(msg.sender).createRetryableTicket(address(1),0,0,address(0),address(0),0,0,) + -Y(msg.sender).createRetryableTicket(address(2),0,0,address(0),address(0),0,0,) + +Multiple retryable tickets created in the same function: + -good2() + -good2() + +Multiple retryable tickets created in the same function: + -Y(msg.sender).createRetryableTicket(address(1),0,0,address(0),address(0),0,0,) + -Y(msg.sender).createRetryableTicket(address(2),0,0,address(0),address(0),0,0,) + +Multiple retryable tickets created in the same function: + -Y(msg.sender).createRetryableTicket(address(1),0,0,address(0),address(0),0,0,) + -good2() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_PublicMappingNested_0_4_25_public_mappings_nested_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_PublicMappingNested_0_4_25_public_mappings_nested_sol_exclude__0.txt new file mode 100644 index 0000000000..d253f28b40 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_PublicMappingNested_0_4_25_public_mappings_nested_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Bug.testMapping is a public mapping with nested variables + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_4_25_redundant_statements_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_4_25_redundant_statements_sol_exclude__0.txt new file mode 100644 index 0000000000..d807ab7a0f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_4_25_redundant_statements_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Redundant expression "bool" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "test" inRedundantStatementsContract + +Redundant expression "RedundantStatementsContract" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "assert(bool)" inRedundantStatementsContract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_6_11_redundant_statements_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_6_11_redundant_statements_sol_exclude__0.txt new file mode 100644 index 0000000000..e889ab66bf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_6_11_redundant_statements_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "bool" inRedundantStatementsContract + +Redundant expression "RedundantStatementsContract" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "test" inRedundantStatementsContract + +Redundant expression "assert(bool)" inRedundantStatementsContract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_7_6_redundant_statements_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_7_6_redundant_statements_sol_exclude__0.txt new file mode 100644 index 0000000000..3cbb4302d4 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RedundantStatements_0_7_6_redundant_statements_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Redundant expression "uint256" inRedundantStatementsContract + +Redundant expression "test" inRedundantStatementsContract + +Redundant expression "assert(bool)" inRedundantStatementsContract + +Redundant expression "RedundantStatementsContract" inRedundantStatementsContract + +Redundant expression "bool" inRedundantStatementsContract + +Redundant expression "uint256" inRedundantStatementsContract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_4_25_reentrancy_benign_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_4_25_reentrancy_benign_sol_exclude__0.txt new file mode 100644 index 0000000000..d33dfb53d9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_4_25_reentrancy_benign_sol_exclude__0.txt @@ -0,0 +1,50 @@ +Reentrancy in ReentrancyBenign.bad1(address): + External calls: + - success = target.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad0(): + External calls: + - ! (msg.sender.call()) + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad4(address): + External calls: + - externalCaller(target) + - address(target).call() + - ethSender(address(0)) + - address(target).call.value(1)() + External calls sending eth: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad3(address): + External calls: + - externalCaller(target) + - address(target).call() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad2(address): + External calls: + - success = target.call() + - address(target).call.value(1000)() + External calls sending eth: + - address(target).call.value(1000)() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad5(address): + External calls: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_5_16_reentrancy_benign_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_5_16_reentrancy_benign_sol_exclude__0.txt new file mode 100644 index 0000000000..3f3e2717da --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_5_16_reentrancy_benign_sol_exclude__0.txt @@ -0,0 +1,50 @@ +Reentrancy in ReentrancyBenign.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad3(address): + External calls: + - externalCaller(target) + - address(target).call() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad1(address): + External calls: + - (success,None) = target.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad5(address): + External calls: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad4(address): + External calls: + - externalCaller(target) + - address(target).call() + - ethSender(address(0)) + - address(target).call.value(1)() + External calls sending eth: + - ethSender(address(0)) + - address(target).call.value(1)() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad2(address): + External calls: + - (success,None) = target.call() + - address(target).call.value(1000)() + External calls sending eth: + - address(target).call.value(1000)() + State variables written after the call(s): + - counter += 1 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_7_6_reentrancy_benign_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_7_6_reentrancy_benign_sol_exclude__0.txt new file mode 100644 index 0000000000..82f2ac27ac --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyBenign_0_7_6_reentrancy_benign_sol_exclude__0.txt @@ -0,0 +1,50 @@ +Reentrancy in ReentrancyBenign.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad2(address): + External calls: + - (success,None) = target.call() + - address(target).call{value: 1000}() + External calls sending eth: + - address(target).call{value: 1000}() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad3(address): + External calls: + - externalCaller(target) + - address(target).call() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad5(address): + External calls: + - ethSender(address(0)) + - address(target).call{value: 1}() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + +Reentrancy in ReentrancyBenign.bad1(address): + External calls: + - (success,None) = target.call() + State variables written after the call(s): + - counter += 1 + +Reentrancy in ReentrancyBenign.bad4(address): + External calls: + - externalCaller(target) + - address(target).call() + - ethSender(address(0)) + - address(target).call{value: 1}() + External calls sending eth: + - ethSender(address(0)) + - address(target).call{value: 1}() + State variables written after the call(s): + - varChanger() + - anotherVariableToChange ++ + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_DAO_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_DAO_sol_exclude__0.txt new file mode 100644 index 0000000000..e331df7bdf --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_DAO_sol_exclude__0.txt @@ -0,0 +1,72 @@ +Reentrancy in TokenCreation.refund(): + External calls: + - extraBalance.balance >= extraBalance.accumulatedInput() + - extraBalance.payOut(address(this),extraBalance.accumulatedInput()) + - msg.sender.call.value(weiGiven[msg.sender])() + External calls sending eth: + - msg.sender.call.value(weiGiven[msg.sender])() + State variables written after the call(s): + - weiGiven[msg.sender] = 0 + TokenCreationInterface.weiGiven can be used in cross function reentrancies: + - TokenCreation.createTokenProxy(address) + - TokenCreation.refund() + +Reentrancy in DAO.executeProposal(uint256,bytes): + External calls: + - ! isRecipientAllowed(p.recipient) + - allowedRecipients[_recipient] || (_recipient == address(extraBalance) && totalRewardToken > extraBalance.accumulatedInput()) + - ! p.recipient.call.value(p.amount)(_transactionData) + External calls sending eth: + - ! p.creator.send(p.proposalDeposit) + - ! p.recipient.call.value(p.amount)(_transactionData) + State variables written after the call(s): + - p.proposalPassed = true + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + - closeProposal(_proposalID) + - p.open = false + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + - rewardToken[address(this)] += p.amount + DAOInterface.rewardToken can be used in cross function reentrancies: + - DAO.changeProposalDeposit(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.minQuorum(uint256) + - DAO.newContract(address) + - DAO.retrieveDAOReward(bool) + - DAOInterface.rewardToken + - DAO.splitDAO(uint256,address) + - closeProposal(_proposalID) + - sumOfProposalDeposits -= p.proposalDeposit + DAOInterface.sumOfProposalDeposits can be used in cross function reentrancies: + - DAO.actualBalance() + - DAO.closeProposal(uint256) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.splitDAO(uint256,address) + - totalRewardToken += p.amount + DAOInterface.totalRewardToken can be used in cross function reentrancies: + - DAO.executeProposal(uint256,bytes) + - DAO.isRecipientAllowed(address) + - DAO.retrieveDAOReward(bool) + - DAOInterface.totalRewardToken + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_sol_exclude__0.txt new file mode 100644 index 0000000000..80261ec008 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_4_25_reentrancy_sol_exclude__0.txt @@ -0,0 +1,32 @@ +Reentrancy in Reentrancy.withdrawBalance_nested(): + External calls: + - msg.sender.call.value(amount / 2)() + State variables written after the call(s): + - userBalance[msg.sender] = 0 + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + - Reentrancy.withdrawBalance_fixed_4() + - Reentrancy.withdrawBalance_nested() + +Reentrancy in Reentrancy.withdrawBalance(): + External calls: + - ! (msg.sender.call.value(userBalance[msg.sender])()) + State variables written after the call(s): + - userBalance[msg.sender] = 0 + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + - Reentrancy.withdrawBalance_fixed_4() + - Reentrancy.withdrawBalance_nested() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_indirect_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_indirect_sol_exclude__0.txt new file mode 100644 index 0000000000..29fd8ae26f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_indirect_sol_exclude__0.txt @@ -0,0 +1,15 @@ +Reentrancy in Reentrancy.withdraw(address): + External calls: + - require(bool)(Token(token).transfer(msg.sender,token_deposed[token][msg.sender])) + External calls sending eth: + - msg.sender.transfer(eth_deposed[token][msg.sender]) + State variables written after the call(s): + - eth_deposed[token][msg.sender] = 0 + Reentrancy.eth_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_eth(address) + - Reentrancy.withdraw(address) + - token_deposed[token][msg.sender] = 0 + Reentrancy.token_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_token(address,uint256) + - Reentrancy.withdraw(address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_sol_exclude__0.txt new file mode 100644 index 0000000000..691f167ace --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_5_16_reentrancy_sol_exclude__0.txt @@ -0,0 +1,28 @@ +Reentrancy in Reentrancy.withdrawBalance(): + External calls: + - (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() + State variables written after the call(s): + - userBalance[msg.sender] = 0 + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + +Reentrancy in Reentrancy.withdrawBalance_fixed_3(): + External calls: + - (ret,mem) = msg.sender.call.value(amount)() + State variables written after the call(s): + - userBalance[msg.sender] = amount + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_indirect_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_indirect_sol_exclude__0.txt new file mode 100644 index 0000000000..29fd8ae26f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_indirect_sol_exclude__0.txt @@ -0,0 +1,15 @@ +Reentrancy in Reentrancy.withdraw(address): + External calls: + - require(bool)(Token(token).transfer(msg.sender,token_deposed[token][msg.sender])) + External calls sending eth: + - msg.sender.transfer(eth_deposed[token][msg.sender]) + State variables written after the call(s): + - eth_deposed[token][msg.sender] = 0 + Reentrancy.eth_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_eth(address) + - Reentrancy.withdraw(address) + - token_deposed[token][msg.sender] = 0 + Reentrancy.token_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_token(address,uint256) + - Reentrancy.withdraw(address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_sol_exclude__0.txt new file mode 100644 index 0000000000..c3e0fff508 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_6_11_reentrancy_sol_exclude__0.txt @@ -0,0 +1,28 @@ +Reentrancy in Reentrancy.withdrawBalance_fixed_3(): + External calls: + - (ret,mem) = msg.sender.call.value(amount)() + State variables written after the call(s): + - userBalance[msg.sender] = amount + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + +Reentrancy in Reentrancy.withdrawBalance(): + External calls: + - (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() + State variables written after the call(s): + - userBalance[msg.sender] = 0 + Reentrancy.userBalance can be used in cross function reentrancies: + - Reentrancy.addToBalance() + - Reentrancy.constructor() + - Reentrancy.getBalance(address) + - Reentrancy.withdrawBalance() + - Reentrancy.withdrawBalance_fixed() + - Reentrancy.withdrawBalance_fixed_2() + - Reentrancy.withdrawBalance_fixed_3() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_indirect_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_indirect_sol_exclude__0.txt new file mode 100644 index 0000000000..29fd8ae26f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_7_6_reentrancy_indirect_sol_exclude__0.txt @@ -0,0 +1,15 @@ +Reentrancy in Reentrancy.withdraw(address): + External calls: + - require(bool)(Token(token).transfer(msg.sender,token_deposed[token][msg.sender])) + External calls sending eth: + - msg.sender.transfer(eth_deposed[token][msg.sender]) + State variables written after the call(s): + - eth_deposed[token][msg.sender] = 0 + Reentrancy.eth_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_eth(address) + - Reentrancy.withdraw(address) + - token_deposed[token][msg.sender] = 0 + Reentrancy.token_deposed can be used in cross function reentrancies: + - Reentrancy.deposit_token(address,uint256) + - Reentrancy.withdraw(address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_filtered_comments_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_filtered_comments_sol_exclude__0.txt new file mode 100644 index 0000000000..f61276dd17 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_filtered_comments_sol_exclude__0.txt @@ -0,0 +1,9 @@ +Reentrancy in TestWithBug.withdraw(uint256): + External calls: + - Receiver(msg.sender).send_funds{value: amount}() + State variables written after the call(s): + - balances[msg.sender] -= amount + TestWithBug.balances can be used in cross function reentrancies: + - TestWithBug.withdraw(uint256) + - TestWithBug.withdrawFiltered(uint256) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_with_non_reentrant_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_with_non_reentrant_sol_exclude__0.txt new file mode 100644 index 0000000000..c414ddcf7b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEth_0_8_10_reentrancy_with_non_reentrant_sol_exclude__0.txt @@ -0,0 +1,32 @@ +Reentrancy in TestWithBugInternal.withdraw_internal(uint256): + External calls: + - Receiver(msg.sender).send_funds{value: amount}() + State variables written after the call(s): + - balances[msg.sender] -= amount + TestWithBugInternal.balances can be used in cross function reentrancies: + - TestWithBugInternal.withdraw_all_internal() + +Reentrancy in TestWithBug.withdraw(uint256): + External calls: + - Receiver(msg.sender).send_funds{value: amount}() + State variables written after the call(s): + - balances[msg.sender] -= amount + TestWithBug.balances can be used in cross function reentrancies: + - TestWithBug.withdraw_all() + +Reentrancy in TestBugWithPublicVariable.withdraw_internal(uint256): + External calls: + - Receiver(msg.sender).send_funds{value: amount}() + State variables written after the call(s): + - balances[msg.sender] -= amount + TestBugWithPublicVariable.balances can be used in cross function reentrancies: + - TestBugWithPublicVariable.balances + +Reentrancy in TestWithBugNonReentrantRead.withdraw(uint256): + External calls: + - Receiver(msg.sender).send_funds{value: amount}() + State variables written after the call(s): + - balances[msg.sender] -= amount + TestWithBugNonReentrantRead.balances can be used in cross function reentrancies: + - TestWithBugNonReentrantRead.read() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_5_16_reentrancy_events_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_5_16_reentrancy_events_sol_exclude__0.txt new file mode 100644 index 0000000000..d6f5b407e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_5_16_reentrancy_events_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Reentrancy in Test.bug(C): + External calls: + - c.f() + Event emitted after the call(s): + - E() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_6_11_reentrancy_events_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_6_11_reentrancy_events_sol_exclude__0.txt new file mode 100644 index 0000000000..d6f5b407e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_6_11_reentrancy_events_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Reentrancy in Test.bug(C): + External calls: + - c.f() + Event emitted after the call(s): + - E() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_7_6_reentrancy_events_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_7_6_reentrancy_events_sol_exclude__0.txt new file mode 100644 index 0000000000..d6f5b407e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyEvent_0_7_6_reentrancy_events_sol_exclude__0.txt @@ -0,0 +1,6 @@ +Reentrancy in Test.bug(C): + External calls: + - c.f() + Event emitted after the call(s): + - E() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_DAO_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_DAO_sol_exclude__0.txt new file mode 100644 index 0000000000..13ed6f698f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_DAO_sol_exclude__0.txt @@ -0,0 +1,171 @@ +Reentrancy in DAO.retrieveDAOReward(bool): + External calls: + - reward = (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) / totalRewardToken - DAOpaidOut[msg.sender] + - ! DAOrewardAccount.payOut(dao.rewardAccount(),reward) + - ! DAOrewardAccount.payOut(dao,reward) + State variables written after the call(s): + - DAOpaidOut[msg.sender] += reward + DAOInterface.DAOpaidOut can be used in cross function reentrancies: + - DAOInterface.DAOpaidOut + - DAO.newContract(address) + - DAO.retrieveDAOReward(bool) + - DAO.splitDAO(uint256,address) + +Reentrancy in DAO.withdrawRewardFor(address): + External calls: + - reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] + - ! rewardAccount.payOut(_account,reward) + State variables written after the call(s): + - paidOut[_account] += reward + DAOInterface.paidOut can be used in cross function reentrancies: + - DAOInterface.paidOut + - DAO.splitDAO(uint256,address) + - DAO.transferPaidOut(address,address,uint256) + - DAO.withdrawRewardFor(address) + +Reentrancy in DAO.splitDAO(uint256,address): + External calls: + - p.splitData[0].newDAO = createNewDAO(_newCurator) + - daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) + - withdrawRewardFor(msg.sender) + - (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] + - reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] + - ! rewardAccount.payOut(_account,reward) + State variables written after the call(s): + - balances[msg.sender] = 0 + TokenInterface.balances can be used in cross function reentrancies: + - Token.balanceOf(address) + - TokenCreation.createTokenProxy(address) + - TokenCreation.refund() + - DAO.splitDAO(uint256,address) + - Token.transfer(address,uint256) + - Token.transferFrom(address,address,uint256) + - DAO.vote(uint256,bool) + - paidOut[msg.sender] = 0 + DAOInterface.paidOut can be used in cross function reentrancies: + - DAOInterface.paidOut + - DAO.splitDAO(uint256,address) + - DAO.transferPaidOut(address,address,uint256) + - DAO.withdrawRewardFor(address) + - totalSupply -= balances[msg.sender] + TokenInterface.totalSupply can be used in cross function reentrancies: + - TokenCreation.createTokenProxy(address) + - DAO.executeProposal(uint256,bytes) + - DAO.minQuorum(uint256) + - TokenCreation.refund() + - DAO.splitDAO(uint256,address) + - TokenInterface.totalSupply + - DAO.withdrawRewardFor(address) + +Reentrancy in DAO.splitDAO(uint256,address): + External calls: + - p.splitData[0].newDAO = createNewDAO(_newCurator) + - daoCreator.createDAO(_newCurator,0,0,now + splitExecutionPeriod) + State variables written after the call(s): + - p.splitData[0].splitBalance = actualBalance() + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + - p.splitData[0].rewardToken = rewardToken[address(this)] + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + - p.splitData[0].totalSupply = totalSupply + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + - p.proposalPassed = true + DAOInterface.proposals can be used in cross function reentrancies: + - DAO.DAO(address,DAO_Creator,uint256,uint256,uint256,address) + - DAO.checkProposalCode(uint256,address,uint256,bytes) + - DAO.closeProposal(uint256) + - DAO.executeProposal(uint256,bytes) + - DAO.getNewDAOAddress(uint256) + - DAO.isBlocked(address) + - DAO.newProposal(address,uint256,string,bytes,uint256,bool) + - DAO.numberOfProposals() + - DAOInterface.proposals + - DAO.splitDAO(uint256,address) + - DAO.vote(uint256,bool) + +Reentrancy in DAO.transferFromWithoutReward(address,address,uint256): + External calls: + - ! withdrawRewardFor(_from) + - (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] + - reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] + - ! rewardAccount.payOut(_account,reward) + State variables written after the call(s): + - transferFrom(_from,_to,_value) + - balances[_to] += _amount + - balances[_from] -= _amount + TokenInterface.balances can be used in cross function reentrancies: + - Token.balanceOf(address) + - TokenCreation.createTokenProxy(address) + - TokenCreation.refund() + - DAO.splitDAO(uint256,address) + - Token.transfer(address,uint256) + - Token.transferFrom(address,address,uint256) + - DAO.vote(uint256,bool) + - transferFrom(_from,_to,_value) + - paidOut[_from] -= transferPaidOut + - paidOut[_to] += transferPaidOut + DAOInterface.paidOut can be used in cross function reentrancies: + - DAOInterface.paidOut + - DAO.splitDAO(uint256,address) + - DAO.transferPaidOut(address,address,uint256) + - DAO.withdrawRewardFor(address) + +Reentrancy in DAO.transferWithoutReward(address,uint256): + External calls: + - ! getMyReward() + - (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account] + - reward = (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account] + - ! rewardAccount.payOut(_account,reward) + State variables written after the call(s): + - transfer(_to,_value) + - balances[msg.sender] -= _amount + - balances[_to] += _amount + TokenInterface.balances can be used in cross function reentrancies: + - Token.balanceOf(address) + - TokenCreation.createTokenProxy(address) + - TokenCreation.refund() + - DAO.splitDAO(uint256,address) + - Token.transfer(address,uint256) + - Token.transferFrom(address,address,uint256) + - DAO.vote(uint256,bool) + - transfer(_to,_value) + - paidOut[_from] -= transferPaidOut + - paidOut[_to] += transferPaidOut + DAOInterface.paidOut can be used in cross function reentrancies: + - DAOInterface.paidOut + - DAO.splitDAO(uint256,address) + - DAO.transferPaidOut(address,address,uint256) + - DAO.withdrawRewardFor(address) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_reentrancy_write_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_reentrancy_write_sol_exclude__0.txt new file mode 100644 index 0000000000..193f2f770b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_4_25_reentrancy_write_sol_exclude__0.txt @@ -0,0 +1,25 @@ +Reentrancy in ReentrancyWrite.bad0(): + External calls: + - ! (msg.sender.call()) + State variables written after the call(s): + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + +Reentrancy in ReentrancyWrite.bad1(address): + External calls: + - success = msg.sender.call() + - bad0() + - ! (msg.sender.call()) + State variables written after the call(s): + - bad0() + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_no_reentrancy_staticcall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_no_reentrancy_staticcall_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_reentrancy_write_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_reentrancy_write_sol_exclude__0.txt new file mode 100644 index 0000000000..0ef9e6cd33 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_5_16_reentrancy_write_sol_exclude__0.txt @@ -0,0 +1,25 @@ +Reentrancy in ReentrancyWrite.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + +Reentrancy in ReentrancyWrite.bad1(address): + External calls: + - (success,None) = msg.sender.call() + - bad0() + - (success,None) = msg.sender.call() + State variables written after the call(s): + - bad0() + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_no_reentrancy_staticcall_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_no_reentrancy_staticcall_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_reentrancy_write_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_reentrancy_write_sol_exclude__0.txt new file mode 100644 index 0000000000..782d57cdb9 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_6_11_reentrancy_write_sol_exclude__0.txt @@ -0,0 +1,25 @@ +Reentrancy in ReentrancyWrite.bad1(address): + External calls: + - (success,None) = msg.sender.call() + - bad0() + - (success,None) = msg.sender.call() + State variables written after the call(s): + - bad0() + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + +Reentrancy in ReentrancyWrite.bad0(): + External calls: + - (success,None) = msg.sender.call() + State variables written after the call(s): + - notCalled = false + ReentrancyWrite.notCalled can be used in cross function reentrancies: + - ReentrancyWrite.bad0() + - ReentrancyWrite.bad1(address) + - ReentrancyWrite.constructor(address) + - ReentrancyWrite.good() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_8_2_comment_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReentrancyReadBeforeWritten_0_8_2_comment_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnBomb_0_8_20_return_bomb_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnBomb_0_8_20_return_bomb_sol_exclude__0.txt new file mode 100644 index 0000000000..f59f5f10f6 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnBomb_0_8_20_return_bomb_sol_exclude__0.txt @@ -0,0 +1,5 @@ +Mark.oops(address) tries to limit the gas of an external call that controls implicit decoding + ret1 = BadGuy(badGuy).fbad{gas: 2000}() + (x,str) = BadGuy(badGuy).fbad1{gas: 2000}() + (success,ret) = badGuy.call{gas: 10000}(abi.encodeWithSelector(BadGuy.llbad.selector)) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol_exclude__0.txt new file mode 100644 index 0000000000..3ab720c811 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReturnInsteadOfLeave_0_8_10_incorrect_return_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.f() contains an incorrect call to return: return(uint256,uint256)(5,6) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_21_reused_base_constructor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_21_reused_base_constructor_sol_exclude__0.txt new file mode 100644 index 0000000000..fdc7dca432 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_21_reused_base_constructor_sol_exclude__0.txt @@ -0,0 +1,24 @@ +E gives base constructor C.C(uint256) arguments more than once in inheritance hierarchy: + - From E constructor definition + - From D constructor definition + +E gives base constructor A.A(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + +F gives base constructor A.A(uint256) arguments more than once in inheritance hierarchy: + - From F constructor definition + - From B constructor definition + +D gives base constructor A.A(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + +C gives base constructor A.A(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + +E gives base constructor B.B(uint256) arguments more than once in inheritance hierarchy: + - From E constructor definition + - From D constructor definition + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_25_reused_base_constructor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_25_reused_base_constructor_sol_exclude__0.txt new file mode 100644 index 0000000000..fefb52f6e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ReusedBaseConstructor_0_4_25_reused_base_constructor_sol_exclude__0.txt @@ -0,0 +1,35 @@ +D gives base constructor A.constructor(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + +C gives base constructor A.constructor(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + +E gives base constructor C.constructor(uint256) arguments more than once in inheritance hierarchy: + - From E constructor definition + - From D contract definition + - From D constructor definition + +D gives base constructor B.constructor(uint256) arguments more than once in inheritance hierarchy: + - From D contract definition + - From D constructor definition + +D gives base constructor C.constructor(uint256) arguments more than once in inheritance hierarchy: + - From D contract definition + - From D constructor definition + +F gives base constructor A.constructor(uint256) arguments more than once in inheritance hierarchy: + - From F constructor definition + - From B constructor definition + +E gives base constructor B.constructor(uint256) arguments more than once in inheritance hierarchy: + - From E contract definition + - From E constructor definition + - From D contract definition + - From D constructor definition + +E gives base constructor A.constructor(uint256) arguments more than once in inheritance hierarchy: + - From C constructor definition + - From B constructor definition + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_5_16_right_to_left_override_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_5_16_right_to_left_override_sol_exclude__0.txt new file mode 100644 index 0000000000..3c5060b6c8 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_5_16_right_to_left_override_sol_exclude__0.txt @@ -0,0 +1,3 @@ +tests/e2e/detectors/test_data/rtlo/0.5.16/right_to_left_override.sol contains a unicode right-to-left-override character at byte offset 96: + - b' test1(/*A\xe2\x80\xae/*B*/2 , 1/*\xe2\x80\xad' + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_6_11_right_to_left_override_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_6_11_right_to_left_override_sol_exclude__0.txt new file mode 100644 index 0000000000..7e181d79d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_6_11_right_to_left_override_sol_exclude__0.txt @@ -0,0 +1,3 @@ +tests/e2e/detectors/test_data/rtlo/0.6.11/right_to_left_override.sol contains a unicode right-to-left-override character at byte offset 96: + - b' test1(/*A\xe2\x80\xae/*B*/2 , 1/*\xe2\x80\xad' + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_8_0_unicode_direction_override_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_8_0_unicode_direction_override_sol_exclude__0.txt new file mode 100644 index 0000000000..6b4a48b5b2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_RightToLeftOverride_0_8_0_unicode_direction_override_sol_exclude__0.txt @@ -0,0 +1,9 @@ +tests/e2e/detectors/test_data/rtlo/0.8.0/unicode_direction_override.sol contains a unicode right-to-left-override character at byte offset 336: + - b' /*ok \xe2\x80\xaeaaa\xe2\x80\xaebbb\xe2\x80\xaeccc\xe2\x80\xacddd\xe2\x80\xaceee\xe2\x80\xac*/' + +tests/e2e/detectors/test_data/rtlo/0.8.0/unicode_direction_override.sol contains a unicode right-to-left-override character at byte offset 348: + - b'\x80\xaebbb\xe2\x80\xaeccc\xe2\x80\xacddd\xe2\x80\xaceee\xe2\x80\xac*/' + +tests/e2e/detectors/test_data/rtlo/0.8.0/unicode_direction_override.sol contains a unicode right-to-left-override character at byte offset 342: + - b'\x80\xaeaaa\xe2\x80\xaebbb\xe2\x80\xaeccc\xe2\x80\xacddd\xe2\x80\xaceee\xe2\x80\xac*/' + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_4_25_shadowing_abstract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_4_25_shadowing_abstract_sol_exclude__0.txt new file mode 100644 index 0000000000..f7eb3ef79e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_4_25_shadowing_abstract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.owner shadows: + - BaseContract.owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_5_16_shadowing_abstract_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_5_16_shadowing_abstract_sol_exclude__0.txt new file mode 100644 index 0000000000..f7eb3ef79e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_5_16_shadowing_abstract_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.owner shadows: + - BaseContract.owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_public_gap_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_public_gap_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..9a5a96e232 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_public_gap_variable_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.__gap shadows: + - BaseContract.__gap + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShadowingAbstractDetection_0_7_5_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_4_25_shift_parameter_mixup_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_4_25_shift_parameter_mixup_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_5_16_shift_parameter_mixup_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_5_16_shift_parameter_mixup_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_7_6_shift_parameter_mixup_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_7_6_shift_parameter_mixup_sol_exclude__0.txt new file mode 100644 index 0000000000..922db089e1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_ShiftParameterMixup_0_7_6_shift_parameter_mixup_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.f() contains an incorrect shift operation: a = 8 >> a + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_5_16_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_5_16_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..f7eb3ef79e --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_5_16_shadowing_state_variable_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.owner shadows: + - BaseContract.owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_6_11_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_6_11_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_public_gap_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_public_gap_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..9a5a96e232 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_public_gap_variable_sol_exclude__0.txt @@ -0,0 +1,3 @@ +DerivedContract.__gap shadows: + - BaseContract.__gap + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_shadowing_state_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StateShadowing_0_7_5_shadowing_state_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_16_storage_signed_integer_array_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_StorageSignedIntegerArray_0_5_16_storage_signed_integer_array_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_4_25_suicidal_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_4_25_suicidal_sol_exclude__0.txt new file mode 100644 index 0000000000..d0e5d9897d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_4_25_suicidal_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.i_am_a_backdoor() allows anyone to destruct the contract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_5_16_suicidal_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_5_16_suicidal_sol_exclude__0.txt new file mode 100644 index 0000000000..d0e5d9897d --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_5_16_suicidal_sol_exclude__0.txt @@ -0,0 +1,2 @@ +C.i_am_a_backdoor() allows anyone to destruct the contract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_7_6_suicidal_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_7_6_suicidal_sol_exclude__0.txt new file mode 100644 index 0000000000..c22e699182 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Suicidal_0_7_6_suicidal_sol_exclude__0.txt @@ -0,0 +1,4 @@ +C.i_am_a_backdoor2(address) allows anyone to destruct the contract + +C.i_am_a_backdoor() allows anyone to destruct the contract + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_4_25_timestamp_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_4_25_timestamp_sol_exclude__0.txt new file mode 100644 index 0000000000..617132ca07 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_4_25_timestamp_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Timestamp.bad0() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(block.timestamp == 0) + +Timestamp.bad1() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(time == 0) + +Timestamp.bad2() uses timestamp for comparisons + Dangerous comparisons: + - block.timestamp > 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_5_16_timestamp_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_5_16_timestamp_sol_exclude__0.txt new file mode 100644 index 0000000000..108e48efcd --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_5_16_timestamp_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Timestamp.bad1() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(time == 0) + +Timestamp.bad0() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(block.timestamp == 0) + +Timestamp.bad2() uses timestamp for comparisons + Dangerous comparisons: + - block.timestamp > 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_6_11_timestamp_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_6_11_timestamp_sol_exclude__0.txt new file mode 100644 index 0000000000..617132ca07 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_6_11_timestamp_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Timestamp.bad0() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(block.timestamp == 0) + +Timestamp.bad1() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(time == 0) + +Timestamp.bad2() uses timestamp for comparisons + Dangerous comparisons: + - block.timestamp > 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_7_6_timestamp_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_7_6_timestamp_sol_exclude__0.txt new file mode 100644 index 0000000000..a8d2018161 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_Timestamp_0_7_6_timestamp_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Timestamp.bad2() uses timestamp for comparisons + Dangerous comparisons: + - block.timestamp > 0 + +Timestamp.bad0() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(block.timestamp == 0) + +Timestamp.bad1() uses timestamp for comparisons + Dangerous comparisons: + - require(bool)(time == 0) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_4_25_too_many_digits_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_4_25_too_many_digits_sol_exclude__0.txt new file mode 100644 index 0000000000..0158568dbb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_4_25_too_many_digits_sol_exclude__0.txt @@ -0,0 +1,15 @@ +C.h() uses literals with too many digits: + - x2 = 100000 + +C.f() uses literals with too many digits: + - x4 = 100000 + +C.f() uses literals with too many digits: + - x1 = 0x000001 + +C.f() uses literals with too many digits: + - x3 = 1000000000000000000 + +C.f() uses literals with too many digits: + - x2 = 0x0000000000001 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_6_11_too_many_digits_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_6_11_too_many_digits_sol_exclude__0.txt new file mode 100644 index 0000000000..d5eca316fb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_6_11_too_many_digits_sol_exclude__0.txt @@ -0,0 +1,15 @@ +C.f() uses literals with too many digits: + - x3 = 1000000000000000000 + +C.f() uses literals with too many digits: + - x2 = 0x0000000000001 + +C.f() uses literals with too many digits: + - x4 = 100000 + +C.h() uses literals with too many digits: + - x2 = 100000 + +C.f() uses literals with too many digits: + - x1 = 0x000001 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_7_6_too_many_digits_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_7_6_too_many_digits_sol_exclude__0.txt new file mode 100644 index 0000000000..8317142228 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TooManyDigits_0_7_6_too_many_digits_sol_exclude__0.txt @@ -0,0 +1,15 @@ +C.f() uses literals with too many digits: + - x3 = 1000000000000000000 + +C.f() uses literals with too many digits: + - x2 = 0x0000000000001 + +C.f() uses literals with too many digits: + - x1 = 0x000001 + +C.h() uses literals with too many digits: + - x2 = 100000 + +C.f() uses literals with too many digits: + - x4 = 100000 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_4_25_tx_origin_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_4_25_tx_origin_sol_exclude__0.txt new file mode 100644 index 0000000000..95c1061d4a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_4_25_tx_origin_sol_exclude__0.txt @@ -0,0 +1,4 @@ +TxOrigin.bug0() uses tx.origin for authorization: require(bool)(tx.origin == owner) + +TxOrigin.bug2() uses tx.origin for authorization: tx.origin != owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_5_16_tx_origin_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_5_16_tx_origin_sol_exclude__0.txt new file mode 100644 index 0000000000..95c1061d4a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_5_16_tx_origin_sol_exclude__0.txt @@ -0,0 +1,4 @@ +TxOrigin.bug0() uses tx.origin for authorization: require(bool)(tx.origin == owner) + +TxOrigin.bug2() uses tx.origin for authorization: tx.origin != owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_6_11_tx_origin_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_6_11_tx_origin_sol_exclude__0.txt new file mode 100644 index 0000000000..95c1061d4a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TxOrigin_0_6_11_tx_origin_sol_exclude__0.txt @@ -0,0 +1,4 @@ +TxOrigin.bug0() uses tx.origin for authorization: require(bool)(tx.origin == owner) + +TxOrigin.bug2() uses tx.origin for authorization: tx.origin != owner + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_4_25_type_based_tautology_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_4_25_type_based_tautology_sol_exclude__0.txt new file mode 100644 index 0000000000..5d27e13339 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_4_25_type_based_tautology_sol_exclude__0.txt @@ -0,0 +1,6 @@ +A.g(uint8) contains a tautology or contradiction: + - (y < 512) + +A.f(uint256) contains a tautology or contradiction: + - x >= 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_5_16_type_based_tautology_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_5_16_type_based_tautology_sol_exclude__0.txt new file mode 100644 index 0000000000..5d27e13339 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_5_16_type_based_tautology_sol_exclude__0.txt @@ -0,0 +1,6 @@ +A.g(uint8) contains a tautology or contradiction: + - (y < 512) + +A.f(uint256) contains a tautology or contradiction: + - x >= 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_6_11_type_based_tautology_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_6_11_type_based_tautology_sol_exclude__0.txt new file mode 100644 index 0000000000..5d27e13339 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_TypeBasedTautology_0_6_11_type_based_tautology_sol_exclude__0.txt @@ -0,0 +1,6 @@ +A.g(uint8) contains a tautology or contradiction: + - (y < 512) + +A.f(uint256) contains a tautology or contradiction: + - x >= 0 + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_4_25_unchecked_lowlevel_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_4_25_unchecked_lowlevel_sol_exclude__0.txt new file mode 100644 index 0000000000..dae680b17f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_4_25_unchecked_lowlevel_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.call.value(msg.value)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_6_11_unchecked_lowlevel_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_6_11_unchecked_lowlevel_sol_exclude__0.txt new file mode 100644 index 0000000000..dae680b17f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_6_11_unchecked_lowlevel_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.call.value(msg.value)() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_7_6_unchecked_lowlevel_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_7_6_unchecked_lowlevel_sol_exclude__0.txt new file mode 100644 index 0000000000..5b1becd7bb --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedLowLevel_0_7_6_unchecked_lowlevel_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.call{value: msg.value}() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_4_25_unchecked_send_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_4_25_unchecked_send_sol_exclude__0.txt new file mode 100644 index 0000000000..9c295db0b1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_4_25_unchecked_send_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_5_16_unchecked_send_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_5_16_unchecked_send_sol_exclude__0.txt new file mode 100644 index 0000000000..9c295db0b1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_5_16_unchecked_send_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_7_6_unchecked_send_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_7_6_unchecked_send_sol_exclude__0.txt new file mode 100644 index 0000000000..9c295db0b1 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UncheckedSend_0_7_6_unchecked_send_sol_exclude__0.txt @@ -0,0 +1,2 @@ +MyConc.bad(address) ignores return value by dst.send(msg.value) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_4_25_unimplemented_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_4_25_unimplemented_sol_exclude__0.txt new file mode 100644 index 0000000000..2cded720d3 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_4_25_unimplemented_sol_exclude__0.txt @@ -0,0 +1,13 @@ +DerivedContract_good does not implement functions: + - BaseInterface3.get(uint256) + +DerivedContract_bad2 does not implement functions: + - BaseInterface3.get(uint256) + +DerivedContract_bad0 does not implement functions: + - BaseInterface.f2() + - BaseInterface2.f3() + +AbstractContract_bad1 does not implement functions: + - AbstractContract_bad1.f1() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_interfaces_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_interfaces_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_sol_exclude__0.txt new file mode 100644 index 0000000000..7ff19e6016 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_5_16_unimplemented_sol_exclude__0.txt @@ -0,0 +1,7 @@ +DerivedContract_bad0 does not implement functions: + - BaseInterface.f2() + - BaseInterface2.f3() + +AbstractContract_bad1 does not implement functions: + - AbstractContract_bad1.f1() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_interfaces_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_interfaces_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_sol_exclude__0.txt new file mode 100644 index 0000000000..909405735a --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_6_11_unimplemented_sol_exclude__0.txt @@ -0,0 +1,10 @@ +DerivedContract_bad2 does not implement functions: + - BaseInterface3.get(uint256) + +DerivedContract_bad0 does not implement functions: + - BaseInterface.f2() + - BaseInterface2.f3() + +AbstractContract_bad1 does not implement functions: + - AbstractContract_bad1.f1() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_interfaces_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnimplementedFunctionDetection_0_7_6_unimplemented_interfaces_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol_exclude__0.txt new file mode 100644 index 0000000000..cbaf36a648 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_4_25_erc20_indexed_sol_exclude__0.txt @@ -0,0 +1,8 @@ +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter owner + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter from + +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter spender + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter to + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol_exclude__0.txt new file mode 100644 index 0000000000..cbaf36a648 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_5_16_erc20_indexed_sol_exclude__0.txt @@ -0,0 +1,8 @@ +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter owner + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter from + +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter spender + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter to + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol_exclude__0.txt new file mode 100644 index 0000000000..cbaf36a648 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnindexedERC20EventParameters_0_7_6_erc20_indexed_sol_exclude__0.txt @@ -0,0 +1,8 @@ +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter owner + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter from + +ERC20 event IERC20Bad.Approval(address,address,uint256)does not index parameter spender + +ERC20 event IERC20Bad.Transfer(address,address,uint256)does not index parameter to + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_16_uninitialized_function_ptr_constructor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_16_uninitialized_function_ptr_constructor_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_8_uninitialized_function_ptr_constructor_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_8_uninitialized_function_ptr_constructor_sol_exclude__0.txt new file mode 100644 index 0000000000..3a9f0a07c0 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedFunctionPtrsConstructor_0_5_8_uninitialized_function_ptr_constructor_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Contract bad3 + a(10) is an unintialized function pointer call in a constructor + +Contract bad1 + b(10) is an unintialized function pointer call in a constructor + +Contract bad0 + a(10) is an unintialized function pointer call in a constructor + +Contract bad2 + s.a(10) is an unintialized function pointer call in a constructor + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_4_25_uninitialized_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_4_25_uninitialized_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..d70021d97c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_4_25_uninitialized_local_variable_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.func().uint_not_init is a local variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..d70021d97c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_6_11_uninitialized_local_variable_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.func().uint_not_init is a local variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol_exclude__0.txt new file mode 100644 index 0000000000..d70021d97c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedLocalVars_0_7_6_uninitialized_local_variable_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.func().uint_not_init is a local variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_5_16_uninitialized_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_5_16_uninitialized_sol_exclude__0.txt new file mode 100644 index 0000000000..e55e651f96 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_5_16_uninitialized_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Test2.st is never initialized. It is used in: + - Test2.use() + +Test.balances is never initialized. It is used in: + - Test.use() + +Test2.v is never initialized. It is used in: + - Test2.init() + +Uninitialized.destination is never initialized. It is used in: + - Uninitialized.transfer() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_6_11_uninitialized_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_6_11_uninitialized_sol_exclude__0.txt new file mode 100644 index 0000000000..e55e651f96 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_6_11_uninitialized_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Test2.st is never initialized. It is used in: + - Test2.use() + +Test.balances is never initialized. It is used in: + - Test.use() + +Test2.v is never initialized. It is used in: + - Test2.init() + +Uninitialized.destination is never initialized. It is used in: + - Uninitialized.transfer() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_7_6_uninitialized_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_7_6_uninitialized_sol_exclude__0.txt new file mode 100644 index 0000000000..e55e651f96 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStateVarsDetection_0_7_6_uninitialized_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Test2.st is never initialized. It is used in: + - Test2.use() + +Test.balances is never initialized. It is used in: + - Test.use() + +Test2.v is never initialized. It is used in: + - Test2.init() + +Uninitialized.destination is never initialized. It is used in: + - Uninitialized.transfer() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_8_19_uninitialized_storage_pointer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_8_19_uninitialized_storage_pointer_sol_exclude__0.txt new file mode 100644 index 0000000000..1b820d5887 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UninitializedStorageVars_0_8_19_uninitialized_storage_pointer_sol_exclude__0.txt @@ -0,0 +1,2 @@ +Uninitialized.bad().ret is a storage variable never initialized + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_AnyInitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_AnyInitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..57839ddeed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_AnyInitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +AnyInitializer is an upgradeable contract that does not protect its initialize functions: AnyInitializer.anyName(). Anyone can delete the contract with: AnyInitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Buggy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Buggy_sol_exclude__0.txt new file mode 100644 index 0000000000..f00fbefdf5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Buggy_sol_exclude__0.txt @@ -0,0 +1 @@ +Buggy is an upgradeable contract that does not protect its initialize functions: Buggy.initialize(). Anyone can delete the contract with: Buggy.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Fixed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Fixed_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Reinitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Reinitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..4d2c6ec224 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_4_25_Reinitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +Reinitializer is an upgradeable contract that does not protect its initialize functions: Reinitializer.initialize(). Anyone can delete the contract with: Reinitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_AnyInitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_AnyInitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..57839ddeed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_AnyInitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +AnyInitializer is an upgradeable contract that does not protect its initialize functions: AnyInitializer.anyName(). Anyone can delete the contract with: AnyInitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Buggy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Buggy_sol_exclude__0.txt new file mode 100644 index 0000000000..f00fbefdf5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Buggy_sol_exclude__0.txt @@ -0,0 +1 @@ +Buggy is an upgradeable contract that does not protect its initialize functions: Buggy.initialize(). Anyone can delete the contract with: Buggy.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Fixed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Fixed_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Reinitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Reinitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..4d2c6ec224 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_Reinitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +Reinitializer is an upgradeable contract that does not protect its initialize functions: Reinitializer.initialize(). Anyone can delete the contract with: Reinitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_whitelisted_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_5_16_whitelisted_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_AnyInitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_AnyInitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..57839ddeed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_AnyInitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +AnyInitializer is an upgradeable contract that does not protect its initialize functions: AnyInitializer.anyName(). Anyone can delete the contract with: AnyInitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Buggy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Buggy_sol_exclude__0.txt new file mode 100644 index 0000000000..f00fbefdf5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Buggy_sol_exclude__0.txt @@ -0,0 +1 @@ +Buggy is an upgradeable contract that does not protect its initialize functions: Buggy.initialize(). Anyone can delete the contract with: Buggy.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Reinitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Reinitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..4d2c6ec224 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_Reinitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +Reinitializer is an upgradeable contract that does not protect its initialize functions: Reinitializer.initialize(). Anyone can delete the contract with: Reinitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_whitelisted_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_6_11_whitelisted_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_AnyInitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_AnyInitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..57839ddeed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_AnyInitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +AnyInitializer is an upgradeable contract that does not protect its initialize functions: AnyInitializer.anyName(). Anyone can delete the contract with: AnyInitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Buggy_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Buggy_sol_exclude__0.txt new file mode 100644 index 0000000000..f00fbefdf5 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Buggy_sol_exclude__0.txt @@ -0,0 +1 @@ +Buggy is an upgradeable contract that does not protect its initialize functions: Buggy.initialize(). Anyone can delete the contract with: Buggy.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Fixed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Fixed_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Reinitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Reinitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..4d2c6ec224 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_Reinitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +Reinitializer is an upgradeable contract that does not protect its initialize functions: Reinitializer.initialize(). Anyone can delete the contract with: Reinitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_whitelisted_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_7_6_whitelisted_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_AnyInitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_AnyInitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..57839ddeed --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_AnyInitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +AnyInitializer is an upgradeable contract that does not protect its initialize functions: AnyInitializer.anyName(). Anyone can delete the contract with: AnyInitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Fixed_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Fixed_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Reinitializer_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Reinitializer_sol_exclude__0.txt new file mode 100644 index 0000000000..4d2c6ec224 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_Reinitializer_sol_exclude__0.txt @@ -0,0 +1 @@ +Reinitializer is an upgradeable contract that does not protect its initialize functions: Reinitializer.initialize(). Anyone can delete the contract with: Reinitializer.kill() diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_whitelisted_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnprotectedUpgradeable_0_8_15_whitelisted_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_C_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_C_sol_exclude__0.txt new file mode 100644 index 0000000000..f5556857be --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_C_sol_exclude__0.txt @@ -0,0 +1,6 @@ +The following unused import(s) in tests/e2e/detectors/test_data/unused-imports/0.8.16/B.sol should be removed: + -import "./A.sol"; (tests/e2e/detectors/test_data/unused-imports/0.8.16/B.sol#4) + +The following unused import(s) in tests/e2e/detectors/test_data/unused-imports/0.8.16/C.sol should be removed: + -import "./B.sol"; (tests/e2e/detectors/test_data/unused-imports/0.8.16/C.sol#4) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantContractLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ConstantTopLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest1_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedInContractTest2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_ContractUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomEventContractLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest1_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest4_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedInContractTest4_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest1_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeContractLevelUsedTopLevelTest2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest1_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest3_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest3_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest4_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedInContractTest4_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest1_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest1_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest2_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_CustomTypeTopLevelUsedTopLevelTest2_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumContractLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_EnumTopLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionContractLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_FunctionTopLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_LibraryUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructContractLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedInContractTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedInContractTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedTopLevelTest_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedImport_0_8_16_StructTopLevelUsedTopLevelTest_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_4_25_unused_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_4_25_unused_return_sol_exclude__0.txt new file mode 100644 index 0000000000..7b4f42a6f2 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_4_25_unused_return_sol_exclude__0.txt @@ -0,0 +1,8 @@ +User.test(Target) ignores return value by (e,None) = t.g() + +User.test(Target) ignores return value by t.g() + +User.test(Target) ignores return value by t.f() + +User.test(Target) ignores return value by a.add(0) + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_5_16_unused_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_5_16_unused_return_sol_exclude__0.txt new file mode 100644 index 0000000000..66e4b4bd60 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_5_16_unused_return_sol_exclude__0.txt @@ -0,0 +1,8 @@ +User.test(Target) ignores return value by a.add(0) + +User.test(Target) ignores return value by t.g() + +User.test(Target) ignores return value by t.f() + +User.test(Target) ignores return value by (e,None) = t.g() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_6_11_unused_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_6_11_unused_return_sol_exclude__0.txt new file mode 100644 index 0000000000..de368a7178 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_6_11_unused_return_sol_exclude__0.txt @@ -0,0 +1,8 @@ +User.test(Target) ignores return value by (e,None) = t.g() + +User.test(Target) ignores return value by t.f() + +User.test(Target) ignores return value by a.add(0) + +User.test(Target) ignores return value by t.g() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_7_6_unused_return_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_7_6_unused_return_sol_exclude__0.txt new file mode 100644 index 0000000000..cee25d0d1c --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedReturnValues_0_7_6_unused_return_sol_exclude__0.txt @@ -0,0 +1,8 @@ +User.test(Target) ignores return value by (e,None) = t.g() + +User.test(Target) ignores return value by t.g() + +User.test(Target) ignores return value by a.add(0) + +User.test(Target) ignores return value by t.f() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_4_25_unused_state_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_4_25_unused_state_sol_exclude__0.txt new file mode 100644 index 0000000000..69c7d1ef8f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_4_25_unused_state_sol_exclude__0.txt @@ -0,0 +1,8 @@ +A.unused is never used in B + +A.unused4 is never used in B + +A.unused2 is never used in B + +A.unused3 is never used in B + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_5_16_unused_state_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_5_16_unused_state_sol_exclude__0.txt new file mode 100644 index 0000000000..69c7d1ef8f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_5_16_unused_state_sol_exclude__0.txt @@ -0,0 +1,8 @@ +A.unused is never used in B + +A.unused4 is never used in B + +A.unused2 is never used in B + +A.unused3 is never used in B + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_6_11_unused_state_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_6_11_unused_state_sol_exclude__0.txt new file mode 100644 index 0000000000..69c7d1ef8f --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_6_11_unused_state_sol_exclude__0.txt @@ -0,0 +1,8 @@ +A.unused is never used in B + +A.unused4 is never used in B + +A.unused2 is never used in B + +A.unused3 is never used in B + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_7_6_unused_state_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_7_6_unused_state_sol_exclude__0.txt new file mode 100644 index 0000000000..e8fb8d53b7 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_UnusedStateVars_0_7_6_unused_state_sol_exclude__0.txt @@ -0,0 +1,12 @@ +A.unused is never used in B + +A.unused4 is never used in B + +A.unused2 is never used in B + +H.bad1 is never used in I + +F.bad1 is never used in F + +A.unused3 is never used in B + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_4_25_var_read_using_this_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_4_25_var_read_using_this_sol_exclude__0.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_5_16_var_read_using_this_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_5_16_var_read_using_this_sol_exclude__0.txt new file mode 100644 index 0000000000..d9ce8a6ac7 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_5_16_var_read_using_this_sol_exclude__0.txt @@ -0,0 +1,8 @@ +The function VarReadUsingThis.bad3() reads this.erc20() == address(0) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad4() reads local = this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad1(uint256) reads this.myMap(x) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad2() reads this.erc20() with `this` which adds an extra STATICCALL. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_6_11_var_read_using_this_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_6_11_var_read_using_this_sol_exclude__0.txt new file mode 100644 index 0000000000..3340034c21 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_6_11_var_read_using_this_sol_exclude__0.txt @@ -0,0 +1,8 @@ +The function VarReadUsingThis.bad2() reads this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad1(uint256) reads this.myMap(x) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad3() reads this.erc20() == address(0) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad4() reads local = this.erc20() with `this` which adds an extra STATICCALL. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_8_15_var_read_using_this_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_8_15_var_read_using_this_sol_exclude__0.txt new file mode 100644 index 0000000000..12c8045062 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VarReadUsingThis_0_8_15_var_read_using_this_sol_exclude__0.txt @@ -0,0 +1,8 @@ +The function VarReadUsingThis.bad2() reads this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad1(uint256) reads this.myMap(x) with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad4() reads local = this.erc20() with `this` which adds an extra STATICCALL. + +The function VarReadUsingThis.bad3() reads this.erc20() == address(0) with `this` which adds an extra STATICCALL. + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_4_25_void_cst_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_4_25_void_cst_sol_exclude__0.txt new file mode 100644 index 0000000000..75822fc632 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_4_25_void_cst_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Void constructor called in D.constructor(): + - C() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_6_11_void_cst_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_6_11_void_cst_sol_exclude__0.txt new file mode 100644 index 0000000000..75822fc632 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_6_11_void_cst_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Void constructor called in D.constructor(): + - C() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_7_6_void_cst_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_7_6_void_cst_sol_exclude__0.txt new file mode 100644 index 0000000000..75822fc632 --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_VoidConstructor_0_7_6_void_cst_sol_exclude__0.txt @@ -0,0 +1,3 @@ +Void constructor called in D.constructor(): + - C() + diff --git a/tests/e2e/detectors/snapshots/detectors__exclude_location_WriteAfterWrite_0_8_0_write_after_write_sol_exclude__0.txt b/tests/e2e/detectors/snapshots/detectors__exclude_location_WriteAfterWrite_0_8_0_write_after_write_sol_exclude__0.txt new file mode 100644 index 0000000000..c4f93edd4b --- /dev/null +++ b/tests/e2e/detectors/snapshots/detectors__exclude_location_WriteAfterWrite_0_8_0_write_after_write_sol_exclude__0.txt @@ -0,0 +1,12 @@ +Test.state is written in both + state = 10 + state = 20 + +Test.bugy_external_local().local is written in both + local = 10 + local = 11 + +Test.buggy_local().a is written in both + a = 10 + a = 20 + diff --git a/tests/e2e/detectors/test_detectors.py b/tests/e2e/detectors/test_detectors.py index 1fc56d5cff..8bdf901150 100644 --- a/tests/e2e/detectors/test_detectors.py +++ b/tests/e2e/detectors/test_detectors.py @@ -1940,7 +1940,7 @@ def id_test_exclude_location(test_item: Test): # Let no rerun every test, but only a subset of them -@pytest.mark.parametrize("test_item", ALL_TESTS[::5], ids=id_test_exclude_location) +@pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test_exclude_location) def test_exclude_location(test_item, snapshot): crytic_compile = load_from_crytic(test_item) @@ -1977,7 +1977,7 @@ def _generate_compile(test_item: Test, skip_existing=False): if __name__ == "__main__": if len(sys.argv) != 2: print( - "To generate the zip artifacts run\n\tpython tests/e2e/tests/test_detectors.py --compile" + "To generate the zip artifacts run\n\tpython tests/e2e/detectors/test_detectors.py --compile" ) elif sys.argv[1] == "--compile": for next_test in ALL_TESTS: From 4e52ab0eca1895da07a656d11c96b6693db48eb0 Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 11 Jun 2024 15:24:15 +0200 Subject: [PATCH 4/4] Disable too many lines --- slither/__main__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/slither/__main__.py b/slither/__main__.py index b123ff0ede..72676928ef 100644 --- a/slither/__main__.py +++ b/slither/__main__.py @@ -54,6 +54,7 @@ logging.basicConfig() logger = logging.getLogger("Slither") +# pylint: disable=too-many-lines ################################################################################### ###################################################################################