Skip to content

Commit

Permalink
Restore missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkaMaul authored and CI User committed Jun 12, 2024
1 parent d84ffd5 commit 8be74b3
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 0 deletions.
12 changes: 12 additions & 0 deletions slither/all_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,15 @@
This module import all slither exceptions
"""
# pylint: disable=unused-import
from slither.slithir.exceptions import SlithIRError
from slither.solc_parsing.exceptions import ParsingError, VariableNotFound
from slither.core.exceptions import SlitherCoreError
from slither.exceptions import SlitherException

__all__ = [
"SlithIRError",
"ParsingError",
"VariableNotFound",
"SlitherCoreError",
"SlitherException",
]
195 changes: 195 additions & 0 deletions slither/detectors/all_detectors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,198 @@
# pylint: disable=unused-import,relative-beyond-top-level
from .examples.backdoor import Backdoor
from .variables.uninitialized_state_variables import UninitializedStateVarsDetection
from .variables.uninitialized_storage_variables import UninitializedStorageVars
from .variables.uninitialized_local_variables import UninitializedLocalVars
from .variables.var_read_using_this import VarReadUsingThis
from .attributes.constant_pragma import ConstantPragma
from .attributes.incorrect_solc import IncorrectSolc
from .attributes.locked_ether import LockedEther
from .functions.arbitrary_send_eth import ArbitrarySendEth
from .erc.erc20.arbitrary_send_erc20_no_permit import ArbitrarySendErc20NoPermit
from .erc.erc20.arbitrary_send_erc20_permit import ArbitrarySendErc20Permit
from .functions.suicidal import Suicidal

# from .functions.complex_function import ComplexFunction
from .reentrancy.reentrancy_benign import ReentrancyBenign
from .reentrancy.reentrancy_read_before_write import ReentrancyReadBeforeWritten
from .reentrancy.reentrancy_eth import ReentrancyEth
from .reentrancy.reentrancy_no_gas import ReentrancyNoGas
from .reentrancy.reentrancy_events import ReentrancyEvent
from .variables.unused_state_variables import UnusedStateVars
from .variables.could_be_constant import CouldBeConstant
from .variables.could_be_immutable import CouldBeImmutable
from .statements.tx_origin import TxOrigin
from .statements.assembly import Assembly
from .operations.low_level_calls import LowLevelCalls
from .operations.unused_return_values import UnusedReturnValues
from .operations.unchecked_transfer import UncheckedTransfer
from .naming_convention.naming_convention import NamingConvention
from .functions.external_function import ExternalFunction
from .statements.controlled_delegatecall import ControlledDelegateCall
from .attributes.const_functions_asm import ConstantFunctionsAsm
from .attributes.const_functions_state import ConstantFunctionsState
from .shadowing.abstract import ShadowingAbstractDetection
from .shadowing.state import StateShadowing
from .shadowing.local import LocalShadowing
from .shadowing.builtin_symbols import BuiltinSymbolShadowing
from .operations.block_timestamp import Timestamp
from .statements.calls_in_loop import MultipleCallsInLoop
from .statements.incorrect_strict_equality import IncorrectStrictEquality
from .erc.erc20.incorrect_erc20_interface import IncorrectERC20InterfaceDetection
from .erc.incorrect_erc721_interface import IncorrectERC721InterfaceDetection
from .erc.unindexed_event_parameters import UnindexedERC20EventParameters
from .statements.deprecated_calls import DeprecatedStandards
from .source.rtlo import RightToLeftOverride
from .statements.too_many_digits import TooManyDigits
from .operations.unchecked_low_level_return_values import UncheckedLowLevel
from .operations.unchecked_send_return_value import UncheckedSend
from .operations.void_constructor import VoidConstructor
from .statements.type_based_tautology import TypeBasedTautology
from .statements.boolean_constant_equality import BooleanEquality
from .statements.boolean_constant_misuse import BooleanConstantMisuse
from .statements.divide_before_multiply import DivideBeforeMultiply
from .statements.unprotected_upgradeable import UnprotectedUpgradeable
from .slither.name_reused import NameReused

from .functions.unimplemented import UnimplementedFunctionDetection
from .statements.mapping_deletion import MappingDeletionDetection
from .statements.array_length_assignment import ArrayLengthAssignment
from .variables.function_init_state_variables import FunctionInitializedState
from .statements.redundant_statements import RedundantStatements
from .operations.bad_prng import BadPRNG
from .statements.costly_operations_in_loop import CostlyOperationsInLoop
from .statements.assert_state_change import AssertStateChange
from .attributes.unimplemented_interface import MissingInheritance
from .assembly.shift_parameter_mixup import ShiftParameterMixup
from .compiler_bugs.storage_signed_integer_array import StorageSignedIntegerArray
from .compiler_bugs.uninitialized_function_ptr_in_constructor import (
UninitializedFunctionPtrsConstructor,
)
from .compiler_bugs.storage_ABIEncoderV2_array import ABIEncoderV2Array
from .compiler_bugs.array_by_reference import ArrayByReference
from .compiler_bugs.enum_conversion import EnumConversion
from .compiler_bugs.multiple_constructor_schemes import MultipleConstructorSchemes
from .compiler_bugs.public_mapping_nested import PublicMappingNested
from .compiler_bugs.reused_base_constructor import ReusedBaseConstructor
from .operations.missing_events_access_control import MissingEventsAccessControl
from .operations.missing_events_arithmetic import MissingEventsArithmetic
from .functions.modifier import ModifierDefaultDetection
from .variables.predeclaration_usage_local import PredeclarationUsageLocal
from .statements.unary import IncorrectUnaryExpressionDetection
from .operations.missing_zero_address_validation import MissingZeroAddressValidation
from .functions.dead_code import DeadCode
from .statements.write_after_write import WriteAfterWrite
from .statements.msg_value_in_loop import MsgValueInLoop
from .statements.delegatecall_in_loop import DelegatecallInLoop
from .functions.protected_variable import ProtectedVariables
from .functions.permit_domain_signature_collision import DomainSeparatorCollision
from .functions.codex import Codex
from .functions.cyclomatic_complexity import CyclomaticComplexity
from .operations.cache_array_length import CacheArrayLength
from .statements.incorrect_using_for import IncorrectUsingFor
from .operations.encode_packed import EncodePackedCollision
from .assembly.incorrect_return import IncorrectReturn
from .assembly.return_instead_of_leave import ReturnInsteadOfLeave
from .operations.incorrect_exp import IncorrectOperatorExponentiation
from .statements.tautological_compare import TautologicalCompare
from .statements.return_bomb import ReturnBomb
from .functions.out_of_order_retryable import OutOfOrderRetryable
from .statements.unused_import import UnusedImport


__all__ = [
"Backdoor",
"UninitializedStateVarsDetection",
"UninitializedStorageVars",
"UninitializedLocalVars",
"VarReadUsingThis",
"ConstantPragma",
"IncorrectSolc",
"LockedEther",
"ArbitrarySendEth",
"ArbitrarySendErc20NoPermit",
"ArbitrarySendErc20Permit",
"Suicidal",
"ReentrancyBenign",
"ReentrancyReadBeforeWritten",
"ReentrancyEth",
"ReentrancyNoGas",
"ReentrancyEvent",
"UnusedStateVars",
"CouldBeConstant",
"CouldBeImmutable",
"TxOrigin",
"Assembly",
"LowLevelCalls",
"UnusedReturnValues",
"UncheckedTransfer",
"NamingConvention",
"ExternalFunction",
"ControlledDelegateCall",
"ConstantFunctionsAsm",
"ConstantFunctionsState",
"ShadowingAbstractDetection",
"StateShadowing",
"LocalShadowing",
"BuiltinSymbolShadowing",
"Timestamp",
"MultipleCallsInLoop",
"IncorrectStrictEquality",
"IncorrectERC20InterfaceDetection",
"IncorrectERC721InterfaceDetection",
"UnindexedERC20EventParameters",
"DeprecatedStandards",
"RightToLeftOverride",
"TooManyDigits",
"UncheckedLowLevel",
"UncheckedSend",
"VoidConstructor",
"TypeBasedTautology",
"BooleanEquality",
"BooleanConstantMisuse",
"DivideBeforeMultiply",
"UnprotectedUpgradeable",
"NameReused",
"UnimplementedFunctionDetection",
"MappingDeletionDetection",
"ArrayLengthAssignment",
"FunctionInitializedState",
"RedundantStatements",
"BadPRNG",
"CostlyOperationsInLoop",
"AssertStateChange",
"MissingInheritance",
"ShiftParameterMixup",
"StorageSignedIntegerArray",
"UninitializedFunctionPtrsConstructor",
"ABIEncoderV2Array",
"ArrayByReference",
"EnumConversion",
"MultipleConstructorSchemes",
"PublicMappingNested",
"ReusedBaseConstructor",
"MissingEventsAccessControl",
"MissingEventsArithmetic",
"ModifierDefaultDetection",
"PredeclarationUsageLocal",
"IncorrectUnaryExpressionDetection",
"MissingZeroAddressValidation",
"DeadCode",
"WriteAfterWrite",
"MsgValueInLoop",
"DelegatecallInLoop",
"ProtectedVariables",
"DomainSeparatorCollision",
"Codex",
"CyclomaticComplexity",
"CacheArrayLength",
"IncorrectUsingFor",
"EncodePackedCollision",
"IncorrectReturn",
"ReturnInsteadOfLeave",
"IncorrectOperatorExponentiation",
"TautologicalCompare",
"ReturnBomb",
"OutOfOrderRetryable",
"UnusedImport",
]
53 changes: 53 additions & 0 deletions slither/printers/all_printers.py
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
# pylint: disable=unused-import,relative-beyond-top-level
from .summary.function import FunctionSummary
from .summary.contract import ContractSummary
from .summary.loc import LocPrinter
from .inheritance.inheritance import PrinterInheritance
from .inheritance.inheritance_graph import PrinterInheritanceGraph
from .call.call_graph import PrinterCallGraph
from .functions.authorization import PrinterWrittenVariablesAndAuthorization
from .summary.slithir import PrinterSlithIR
from .summary.slithir_ssa import PrinterSlithIRSSA
from .summary.human_summary import PrinterHumanSummary
from .summary.ck import CK
from .summary.halstead import Halstead
from .functions.cfg import CFG
from .summary.function_ids import FunctionIds
from .summary.variable_order import VariableOrder
from .summary.data_depenency import DataDependency
from .summary.modifier_calls import Modifiers
from .summary.require_calls import RequireOrAssert
from .summary.constructor_calls import ConstructorPrinter
from .guidance.echidna import Echidna
from .summary.evm import PrinterEVM
from .summary.when_not_paused import PrinterWhenNotPaused
from .summary.declaration import Declaration
from .functions.dominator import Dominator
from .summary.martin import Martin

__all__ = [
"FunctionSummary",
"ContractSummary",
"LocPrinter",
"PrinterInheritance",
"PrinterInheritanceGraph",
"PrinterCallGraph",
"PrinterWrittenVariablesAndAuthorization",
"PrinterSlithIR",
"PrinterSlithIRSSA",
"PrinterHumanSummary",
"CK",
"Halstead",
"CFG",
"FunctionIds",
"VariableOrder",
"DataDependency",
"Modifiers",
"RequireOrAssert",
"ConstructorPrinter",
"Echidna",
"PrinterEVM",
"PrinterWhenNotPaused",
"Declaration",
"Dominator",
"Martin",
]
33 changes: 33 additions & 0 deletions slither/tools/mutator/mutators/all_mutators.py
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# pylint: disable=unused-import
from slither.tools.mutator.mutators.MVIV import MVIV # severity low
from slither.tools.mutator.mutators.MVIE import MVIE # severity low
from slither.tools.mutator.mutators.LOR import LOR # severity medium
from slither.tools.mutator.mutators.UOR import UOR # severity medium
from slither.tools.mutator.mutators.SBR import SBR # severity medium
from slither.tools.mutator.mutators.AOR import AOR # severity medium
from slither.tools.mutator.mutators.BOR import BOR # severity medium
from slither.tools.mutator.mutators.ASOR import ASOR # severity medium
from slither.tools.mutator.mutators.MWA import MWA # severity medium
from slither.tools.mutator.mutators.LIR import LIR # severity medium
from slither.tools.mutator.mutators.FHR import FHR # severity medium
from slither.tools.mutator.mutators.MIA import MIA # severity medium
from slither.tools.mutator.mutators.ROR import ROR # severity medium
from slither.tools.mutator.mutators.RR import RR # severity high
from slither.tools.mutator.mutators.CR import CR # severity high

__all__ = [
"MVIV",
"MVIE",
"LOR",
"UOR",
"SBR",
"AOR",
"BOR",
"ASOR",
"MWA",
"LIR",
"FHR",
"MIA",
"ROR",
"RR",
"CR",
]
43 changes: 43 additions & 0 deletions slither/tools/upgradeability/checks/all_checks.py
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
# pylint: disable=unused-import
from slither.tools.upgradeability.checks.initialization import (
InitializablePresent,
InitializableInherited,
InitializableInitializer,
MissingInitializerModifier,
MissingCalls,
MultipleCalls,
InitializeTarget,
)

from slither.tools.upgradeability.checks.functions_ids import IDCollision, FunctionShadowing

from slither.tools.upgradeability.checks.variable_initialization import VariableWithInit

from slither.tools.upgradeability.checks.variables_order import (
MissingVariable,
DifferentVariableContractProxy,
DifferentVariableContractNewContract,
ExtraVariablesProxy,
ExtraVariablesNewContract,
)

from slither.tools.upgradeability.checks.constant import WereConstant, BecameConstant

__all__ = [
"InitializablePresent",
"InitializableInherited",
"InitializableInitializer",
"MissingInitializerModifier",
"MissingCalls",
"MultipleCalls",
"InitializeTarget",
"IDCollision",
"FunctionShadowing",
"VariableWithInit",
"MissingVariable",
"DifferentVariableContractProxy",
"DifferentVariableContractNewContract",
"ExtraVariablesProxy",
"ExtraVariablesNewContract",
"WereConstant",
"BecameConstant",
]

0 comments on commit 8be74b3

Please sign in to comment.