Merge branch 'dev' into dev-json-stdout

pull/222/head
Josselin 6 years ago
commit 29bbf5547a
  1. 49
      README.md
  2. 1
      scripts/tests_generate_expected_json_4.sh
  3. 2
      scripts/tests_generate_expected_json_5.sh
  4. 2
      slither/analyses/write/are_variables_written.py
  5. 5
      slither/detectors/erc/incorrect_erc20_interface.py
  6. 5
      slither/detectors/erc/incorrect_erc721_interface.py
  7. 1
      slither/slither.py
  8. 6
      slither/slithir/convert.py
  9. 2
      slither/slithir/operations/return_operation.py
  10. 6
      slither/slithir/variables/constant.py
  11. 9
      slither/solc_parsing/expressions/expression_parsing.py
  12. 2
      slither/visitors/expression/constants_folding.py
  13. 1
      slither/visitors/expression/expression.py
  14. 1
      tests/expected_json/arbitrary_send-0.5.1.arbitrary-send.txt
  15. 1
      tests/expected_json/arbitrary_send.arbitrary-send.txt
  16. 2
      tests/expected_json/backdoor.backdoor.txt
  17. 2
      tests/expected_json/backdoor.suicidal.txt
  18. 1
      tests/expected_json/const_state_variables.constable-states.txt
  19. 1
      tests/expected_json/constant-0.5.1.constant-function.txt
  20. 1
      tests/expected_json/constant.constant-function.txt
  21. 1
      tests/expected_json/controlled_delegatecall.controlled-delegatecall.txt
  22. 1
      tests/expected_json/deprecated_calls.deprecated-standards.txt
  23. 1
      tests/expected_json/erc20_indexed.erc20-indexed.txt
  24. 1
      tests/expected_json/external_function.external-function.txt
  25. 1
      tests/expected_json/external_function_2.external-function.txt
  26. 1
      tests/expected_json/incorrect_equality.incorrect-equality.txt
  27. 1
      tests/expected_json/incorrect_erc20_interface.erc20-interface.txt
  28. 1
      tests/expected_json/incorrect_erc721_interface.erc721-interface.txt
  29. 1
      tests/expected_json/inline_assembly_contract-0.5.1.assembly.txt
  30. 1
      tests/expected_json/inline_assembly_contract.assembly.txt
  31. 1
      tests/expected_json/inline_assembly_library-0.5.1.assembly.txt
  32. 1
      tests/expected_json/inline_assembly_library.assembly.txt
  33. 1
      tests/expected_json/locked_ether-0.5.1.locked-ether.txt
  34. 1
      tests/expected_json/locked_ether.locked-ether.txt
  35. 1
      tests/expected_json/low_level_calls.low-level-calls.txt
  36. 1
      tests/expected_json/multiple_calls_in_loop.calls-loop.txt
  37. 1
      tests/expected_json/naming_convention.naming-convention.txt
  38. 2
      tests/expected_json/old_solc.sol.json.solc-version.txt
  39. 52
      tests/expected_json/pragma.0.4.24.pragma.txt
  40. 1
      tests/expected_json/reentrancy-0.5.1.reentrancy-eth.txt
  41. 10
      tests/expected_json/reentrancy-0.5.1.reentrancy.txt
  42. 1
      tests/expected_json/reentrancy.reentrancy-eth.txt
  43. 3
      tests/expected_json/right_to_left_override.rtlo.txt
  44. 1
      tests/expected_json/shadowing_abstract.shadowing-abstract.txt
  45. 1
      tests/expected_json/shadowing_builtin_symbols.shadowing-builtin.txt
  46. 1
      tests/expected_json/shadowing_local_variable.shadowing-local.txt
  47. 1
      tests/expected_json/shadowing_state_variable.shadowing-state.txt
  48. 1
      tests/expected_json/solc_version_incorrect.solc-version.txt
  49. 1
      tests/expected_json/timestamp.timestamp.txt
  50. 1
      tests/expected_json/too_many_digits.too-many-digits.txt
  51. 1
      tests/expected_json/tx_origin-0.5.1.tx-origin.txt
  52. 1
      tests/expected_json/tx_origin.tx-origin.txt
  53. 1
      tests/expected_json/uninitialized-0.5.1.uninitialized-state.txt
  54. 1
      tests/expected_json/uninitialized.uninitialized-state.txt
  55. 1
      tests/expected_json/uninitialized_local_variable.uninitialized-local.txt
  56. 55
      tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt
  57. 1
      tests/expected_json/unused_return.unused-return.txt
  58. 1
      tests/expected_json/unused_state.unused-state.txt

@ -48,30 +48,31 @@ Num | Detector | What it Detects | Impact | Confidence
7 | `controlled-delegatecall` | [Controlled delegatecall destination](https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall) | High | Medium 7 | `controlled-delegatecall` | [Controlled delegatecall destination](https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall) | High | Medium
8 | `reentrancy-eth` | [Reentrancy vulnerabilities (theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities) | High | Medium 8 | `reentrancy-eth` | [Reentrancy vulnerabilities (theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities) | High | Medium
9 | `erc20-interface` | [Incorrect ERC20 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface) | Medium | High 9 | `erc20-interface` | [Incorrect ERC20 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface) | Medium | High
10 | `incorrect-equality` | [Dangerous strict equalities](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities) | Medium | High 10 | `erc721-interface` | [Incorrect ERC721 interfaces](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface) | Medium | High
11 | `locked-ether` | [Contracts that lock ether](https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether) | Medium | High 11 | `incorrect-equality` | [Dangerous strict equalities](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities) | Medium | High
12 | `shadowing-abstract` | [State variables shadowing from abstract contracts](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts) | Medium | High 12 | `locked-ether` | [Contracts that lock ether](https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether) | Medium | High
13 | `constant-function` | [Constant functions changing the state](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state) | Medium | Medium 13 | `shadowing-abstract` | [State variables shadowing from abstract contracts](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts) | Medium | High
14 | `reentrancy-no-eth` | [Reentrancy vulnerabilities (no theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1) | Medium | Medium 14 | `constant-function` | [Constant functions changing the state](https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state) | Medium | Medium
15 | `tx-origin` | [Dangerous usage of `tx.origin`](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin) | Medium | Medium 15 | `reentrancy-no-eth` | [Reentrancy vulnerabilities (no theft of ethers)](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-1) | Medium | Medium
16 | `uninitialized-local` | [Uninitialized local variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables) | Medium | Medium 16 | `tx-origin` | [Dangerous usage of `tx.origin`](https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin) | Medium | Medium
17 | `unused-return` | [Unused return values](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return) | Medium | Medium 17 | `uninitialized-local` | [Uninitialized local variables](https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables) | Medium | Medium
18 | `shadowing-builtin` | [Built-in symbol shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing) | Low | High 18 | `unused-return` | [Unused return values](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return) | Medium | Medium
19 | `shadowing-local` | [Local variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing) | Low | High 19 | `shadowing-builtin` | [Built-in symbol shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing) | Low | High
20 | `calls-loop` | [Multiple calls in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/_edit#calls-inside-a-loop) | Low | Medium 20 | `shadowing-local` | [Local variables shadowing](https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing) | Low | High
21 | `reentrancy-benign` | [Benign reentrancy vulnerabilities](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2) | Low | Medium 21 | `calls-loop` | [Multiple calls in a loop](https://github.com/crytic/slither/wiki/Detector-Documentation/_edit#calls-inside-a-loop) | Low | Medium
22 | `timestamp` | [Dangerous usage of `block.timestamp`](https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp) | Low | Medium 22 | `reentrancy-benign` | [Benign reentrancy vulnerabilities](https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities-2) | Low | Medium
23 | `assembly` | [Assembly usage](https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage) | Informational | High 23 | `timestamp` | [Dangerous usage of `block.timestamp`](https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp) | Low | Medium
24 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Informational | High 24 | `assembly` | [Assembly usage](https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage) | Informational | High
25 | `deprecated-standards` | [Deprecated Solidity Standards](https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards) | Informational | High 25 | `constable-states` | [State variables that could be declared constant](https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant) | Informational | High
26 | `erc20-indexed` | [Un-indexed ERC20 event parameters](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters) | Informational | High 26 | `deprecated-standards` | [Deprecated Solidity Standards](https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards) | Informational | High
27 | `external-function` | [Public function that could be declared as external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-as-external) | Informational | High 27 | `erc20-indexed` | [Un-indexed ERC20 event parameters](https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters) | Informational | High
28 | `low-level-calls` | [Low level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls) | Informational | High 28 | `external-function` | [Public function that could be declared as external](https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-as-external) | Informational | High
29 | `naming-convention` | [Conformance to Solidity naming conventions](https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions) | Informational | High 29 | `low-level-calls` | [Low level calls](https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls) | Informational | High
30 | `pragma` | [If different pragma directives are used](https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used) | Informational | High 30 | `naming-convention` | [Conformance to Solidity naming conventions](https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions) | Informational | High
31 | `solc-version` | [Incorrect Solidity version (< 0.4.24 or complex pragma)](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity) | Informational | High 31 | `pragma` | [If different pragma directives are used](https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used) | Informational | High
32 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variables) | Informational | High 32 | `solc-version` | [Incorrect Solidity version (< 0.4.24 or complex pragma)](https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity) | Informational | High
33 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium 33 | `unused-state` | [Unused state variables](https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variables) | Informational | High
34 | `too-many-digits` | [Conformance to numeric notation best practices](https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits) | Informational | Medium
[Contact us](https://www.trailofbits.com/contact/) to get access to additional detectors. [Contact us](https://www.trailofbits.com/contact/) to get access to additional detectors.

@ -17,6 +17,7 @@ generate_expected_json(){
sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename" -i sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename" -i
sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename_txt" -i
} }

@ -17,6 +17,7 @@ generate_expected_json(){
slither "$1" --solc-disable-warnings --detect "$2" --json "$output_filename" --solc solc-0.5.1 > $output_filename_txt 2>&1 slither "$1" --solc-disable-warnings --detect "$2" --json "$output_filename" --solc solc-0.5.1 > $output_filename_txt 2>&1
sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename" -i sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename" -i
sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$output_filename_txt" -i
} }
#generate_expected_json tests/uninitialized-0.5.1.sol "uninitialized-state" #generate_expected_json tests/uninitialized-0.5.1.sol "uninitialized-state"
@ -25,7 +26,6 @@ generate_expected_json(){
#generate_expected_json tests/pragma.0.4.24.sol "pragma" #generate_expected_json tests/pragma.0.4.24.sol "pragma"
#generate_expected_json tests/old_solc.sol.json "solc-version" #generate_expected_json tests/old_solc.sol.json "solc-version"
#generate_expected_json tests/reentrancy-0.5.1.sol "reentrancy-eth" #generate_expected_json tests/reentrancy-0.5.1.sol "reentrancy-eth"
#generate_expected_json tests/reentrancy-0.5.1.sol "reentrancy"
#generate_expected_json tests/uninitialized_storage_pointer.sol "uninitialized-storage" #generate_expected_json tests/uninitialized_storage_pointer.sol "uninitialized-storage"
#generate_expected_json tests/tx_origin-0.5.1.sol "tx-origin" #generate_expected_json tests/tx_origin-0.5.1.sol "tx-origin"
#generate_expected_json tests/locked_ether-0.5.1.sol "locked-ether" #generate_expected_json tests/locked_ether-0.5.1.sol "locked-ether"

@ -33,6 +33,8 @@ def _visit(node, visited, variables_written, variables_to_write):
variables_written = variables_written + [ir.lvalue] variables_written = variables_written + [ir.lvalue]
lvalue = ir.lvalue lvalue = ir.lvalue
while isinstance(lvalue, ReferenceVariable): while isinstance(lvalue, ReferenceVariable):
if lvalue not in refs:
break
variables_written = variables_written + [refs[lvalue]] variables_written = variables_written + [refs[lvalue]]
lvalue = refs[lvalue] lvalue = refs[lvalue]

@ -70,7 +70,8 @@ contract Token{
if contract.is_possible_erc721(): if contract.is_possible_erc721():
return [] return []
functions = [f for f in contract.functions if IncorrectERC20InterfaceDetection.incorrect_erc20_interface(f.signature)] funcs = contract.functions
functions = [f for f in funcs if IncorrectERC20InterfaceDetection.incorrect_erc20_interface(f.signature)]
return functions return functions
def _detect(self): def _detect(self):
@ -80,7 +81,7 @@ contract Token{
dict: [contract name] = set(str) events dict: [contract name] = set(str) events
""" """
results = [] results = []
for c in self.contracts: for c in self.slither.contracts_derived:
functions = IncorrectERC20InterfaceDetection.detect_incorrect_erc20_interface(c) functions = IncorrectERC20InterfaceDetection.detect_incorrect_erc20_interface(c)
if functions: if functions:
info = "{} ({}) has incorrect ERC20 function interface(s):\n" info = "{} ({}) has incorrect ERC20 function interface(s):\n"

@ -71,7 +71,8 @@ contract Token{
if not contract.is_possible_erc721() or not contract.is_possible_erc20(): if not contract.is_possible_erc721() or not contract.is_possible_erc20():
return [] return []
functions = [f for f in contract.functions if IncorrectERC721InterfaceDetection.incorrect_erc721_interface(f.signature)] funcs = contract.functions
functions = [f for f in funcs if IncorrectERC721InterfaceDetection.incorrect_erc721_interface(f.signature)]
return functions return functions
def _detect(self): def _detect(self):
@ -81,7 +82,7 @@ contract Token{
dict: [contract name] = set(str) events dict: [contract name] = set(str) events
""" """
results = [] results = []
for c in self.contracts: for c in self.slither.contracts_derived:
functions = IncorrectERC721InterfaceDetection.detect_incorrect_erc721_interface(c) functions = IncorrectERC721InterfaceDetection.detect_incorrect_erc721_interface(c)
if functions: if functions:
info = "{} ({}) has incorrect ERC721 function interface(s):\n" info = "{} ({}) has incorrect ERC721 function interface(s):\n"

@ -44,7 +44,6 @@ class Slither(SlitherSolc):
embark_overwrite_config (bool): overwrite original config file (default false) embark_overwrite_config (bool): overwrite original config file (default false)
''' '''
# list of files provided (see --splitted option) # list of files provided (see --splitted option)
if isinstance(contract, list): if isinstance(contract, list):
self._init_from_list(contract) self._init_from_list(contract)

@ -678,6 +678,9 @@ def convert_type_library_call(ir, lib_contract):
func = lib_contract.get_function_from_signature(sig) func = lib_contract.get_function_from_signature(sig)
if not func: if not func:
func = lib_contract.get_state_variable_from_name(ir.function_name) func = lib_contract.get_state_variable_from_name(ir.function_name)
if func:
# stop to explore if func is found (prevent dupplicate issue)
break
# In case of multiple binding to the same type # In case of multiple binding to the same type
if not func: if not func:
# specific lookup when the compiler does implicit conversion # specific lookup when the compiler does implicit conversion
@ -712,6 +715,9 @@ def convert_type_of_high_and_internal_level_call(ir, contract):
func = contract.get_function_from_signature(sig) func = contract.get_function_from_signature(sig)
if not func: if not func:
func = contract.get_state_variable_from_name(ir.function_name) func = contract.get_state_variable_from_name(ir.function_name)
if func:
# stop to explore if func is found (prevent dupplicate issue)
break
if not func: if not func:
# specific lookup when the compiler does implicit conversion # specific lookup when the compiler does implicit conversion
# for example # for example

@ -40,7 +40,7 @@ class Return(Operation):
@property @property
def values(self): def values(self):
return self._values return self._unroll(self._values)
def __str__(self): def __str__(self):
return "RETURN {}".format(','.join(['{}'.format(x) for x in self.values])) return "RETURN {}".format(','.join(['{}'.format(x) for x in self.values]))

@ -13,8 +13,8 @@ class Constant(SlithIRVariable):
if type: if type:
assert isinstance(type, ElementaryType) assert isinstance(type, ElementaryType)
self._type = type self._type = type
if type.type in Int + Uint: if type.type in Int + Uint + ['address']:
if val.startswith('0x'): if val.startswith('0x') or val.startswith('0X'):
self._val = int(val, 16) self._val = int(val, 16)
else: else:
if 'e' in val: if 'e' in val:
@ -24,7 +24,7 @@ class Constant(SlithIRVariable):
base, expo = val.split('E') base, expo = val.split('E')
self._val = int(float(base) * (10 ** int(expo))) self._val = int(float(base) * (10 ** int(expo)))
else: else:
self._val = int(val) self._val = int(float(val))
elif type.type == 'bool': elif type.type == 'bool':
self._val = val == 'true' self._val = val == 'true'
else: else:

@ -496,10 +496,17 @@ def parse_expression(expression, caller_context):
value = '0x'+expression['attributes']['hexvalue'] value = '0x'+expression['attributes']['hexvalue']
type = expression['attributes']['type'] type = expression['attributes']['type']
if type.startswith('int_const '): if type is None:
if value.isdecimal():
type = ElementaryType('uint256')
else:
type = ElementaryType('string')
elif type.startswith('int_const '):
type = ElementaryType('uint256') type = ElementaryType('uint256')
elif type.startswith('bool'): elif type.startswith('bool'):
type = ElementaryType('bool') type = ElementaryType('bool')
elif type.startswith('address'):
type = ElementaryType('address')
else: else:
type = ElementaryType('string') type = ElementaryType('string')
literal = Literal(value, type) literal = Literal(value, type)

@ -21,8 +21,8 @@ def set_val(expression, val):
class ConstantFolding(ExpressionVisitor): class ConstantFolding(ExpressionVisitor):
def __init__(self, expression, type): def __init__(self, expression, type):
super(ConstantFolding, self).__init__(expression)
self._type = type self._type = type
super(ConstantFolding, self).__init__(expression)
def result(self): def result(self):
return Literal(int(get_val(self._expression)), self._type) return Literal(int(get_val(self._expression)), self._type)

@ -22,6 +22,7 @@ logger = logging.getLogger("ExpressionVisitor")
class ExpressionVisitor: class ExpressionVisitor:
def __init__(self, expression): def __init__(self, expression):
# Inherited class must declared their variables prior calling super().__init__
self._expression = expression self._expression = expression
self._result = None self._result = None
self._visit_expression(self.expression) self._visit_expression(self.expression)

@ -6,4 +6,5 @@ Test.indirect (tests/arbitrary_send-0.5.1.sol#19-21) sends eth to arbitrary user
Dangerous calls: Dangerous calls:
- destination.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#20) - destination.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#20)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/arbitrary_send-0.5.1.arbitrary-send.json exists already, the overwrite is prevented
INFO:Slither:tests/arbitrary_send-0.5.1.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/arbitrary_send-0.5.1.sol analyzed (1 contracts), 2 result(s) found

@ -6,4 +6,5 @@ Test.indirect (tests/arbitrary_send.sol#19-21) sends eth to arbitrary user
Dangerous calls: Dangerous calls:
- destination.send(address(this).balance) (tests/arbitrary_send.sol#20) - destination.send(address(this).balance) (tests/arbitrary_send.sol#20)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/arbitrary_send.arbitrary-send.json exists already, the overwrite is prevented
INFO:Slither:tests/arbitrary_send.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/arbitrary_send.sol analyzed (1 contracts), 2 result(s) found

@ -1,5 +1,5 @@
INFO:Detectors: INFO:Detectors:
Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6) Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)
Reference: https://github.com/trailofbits/slither/wiki/Adding-a-new-detector Reference: https://github.com/trailofbits/slither/wiki/Adding-a-new-detector
INFO:Slither:/home/monty/Private/tob/tools/slither-public/scripts/../tests/expected_json/backdoor.backdoor.json exists already, the overwrite is prevented INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/backdoor.backdoor.json exists already, the overwrite is prevented
INFO:Slither:tests/backdoor.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/backdoor.sol analyzed (1 contracts), 1 result(s) found

@ -1,5 +1,5 @@
INFO:Detectors: INFO:Detectors:
C.i_am_a_backdoor (tests/backdoor.sol#4-6) allows anyone to destruct the contract C.i_am_a_backdoor (tests/backdoor.sol#4-6) allows anyone to destruct the contract
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal
INFO:Slither:/home/monty/Private/tob/tools/slither-public/scripts/../tests/expected_json/backdoor.suicidal.json exists already, the overwrite is prevented INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/backdoor.suicidal.json exists already, the overwrite is prevented
INFO:Slither:tests/backdoor.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/backdoor.sol analyzed (1 contracts), 1 result(s) found

@ -6,4 +6,5 @@ B.mySistersAddress should be constant (tests/const_state_variables.sol#26)
MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42) MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)
MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43) MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variables-that-could-be-declared-constant
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/const_state_variables.constable-states.json exists already, the overwrite is prevented
INFO:Slither:tests/const_state_variables.sol analyzed (3 contracts), 1 result(s) found INFO:Slither:tests/const_state_variables.sol analyzed (3 contracts), 1 result(s) found

@ -1,4 +1,5 @@
INFO:Detectors: INFO:Detectors:
Constant.test_assembly_bug (tests/constant-0.5.1.sol#15-17) is declared view but contains assembly code Constant.test_assembly_bug (tests/constant-0.5.1.sol#15-17) is declared view but contains assembly code
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/constant-0.5.1.constant-function.json exists already, the overwrite is prevented
INFO:Slither:tests/constant-0.5.1.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/constant-0.5.1.sol analyzed (1 contracts), 1 result(s) found

@ -5,4 +5,5 @@ Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but change
- Constant.a - Constant.a
Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#constant-functions-changing-the-state
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/constant.constant-function.json exists already, the overwrite is prevented
INFO:Slither:tests/constant.sol analyzed (1 contracts), 3 result(s) found INFO:Slither:tests/constant.sol analyzed (1 contracts), 3 result(s) found

@ -4,4 +4,5 @@ C.bad_delegate_call (tests/controlled_delegatecall.sol#8-11) uses delegatecall t
C.bad_delegate_call2 (tests/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id C.bad_delegate_call2 (tests/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id
addr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19) addr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#controlled-delegatecall
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/controlled_delegatecall.controlled-delegatecall.json exists already, the overwrite is prevented
INFO:Slither:tests/controlled_delegatecall.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/controlled_delegatecall.sol analyzed (1 contracts), 2 result(s) found

@ -14,4 +14,5 @@ Deprecated standard detected @ tests/deprecated_calls.sol#22:
Deprecated standard detected @ tests/deprecated_calls.sol#25: Deprecated standard detected @ tests/deprecated_calls.sol#25:
- Usage of "suicide()" should be replaced with "selfdestruct()" - Usage of "suicide()" should be replaced with "selfdestruct()"
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#deprecated-standards
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/deprecated_calls.deprecated-standards.json exists already, the overwrite is prevented
INFO:Slither:tests/deprecated_calls.sol analyzed (1 contracts), 7 result(s) found INFO:Slither:tests/deprecated_calls.sol analyzed (1 contracts), 7 result(s) found

@ -5,4 +5,5 @@ IERC20Bad (tests/erc20_indexed.sol#12-21) does not mark important ERC20 paramete
-Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner' -Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'
-Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender' -Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-parameters
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/erc20_indexed.erc20-indexed.json exists already, the overwrite is prevented
INFO:Slither:tests/erc20_indexed.sol analyzed (3 contracts), 1 result(s) found INFO:Slither:tests/erc20_indexed.sol analyzed (3 contracts), 1 result(s) found

@ -4,4 +4,5 @@ ContractWithFunctionNotCalled.funcNotCalled2 (tests/external_function.sol#17-19)
ContractWithFunctionNotCalled.funcNotCalled (tests/external_function.sol#21-23) should be declared external ContractWithFunctionNotCalled.funcNotCalled (tests/external_function.sol#21-23) should be declared external
ContractWithFunctionNotCalled2.funcNotCalled (tests/external_function.sol#32-39) should be declared external ContractWithFunctionNotCalled2.funcNotCalled (tests/external_function.sol#32-39) should be declared external
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-as-external Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#public-function-that-could-be-declared-as-external
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/external_function.external-function.json exists already, the overwrite is prevented
INFO:Slither:tests/external_function.sol analyzed (5 contracts), 4 result(s) found INFO:Slither:tests/external_function.sol analyzed (5 contracts), 4 result(s) found

@ -1 +1,2 @@
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/external_function_2.external-function.json exists already, the overwrite is prevented
INFO:Slither:tests/external_function_2.sol analyzed (4 contracts), 0 result(s) found INFO:Slither:tests/external_function_2.sol analyzed (4 contracts), 0 result(s) found

@ -74,4 +74,5 @@ TestSolidityKeyword.bad1 (tests/incorrect_equality.sol#127-129) uses a dangerous
TestSolidityKeyword.bad2 (tests/incorrect_equality.sol#131-133) uses a dangerous strict equality: TestSolidityKeyword.bad2 (tests/incorrect_equality.sol#131-133) uses a dangerous strict equality:
- require(bool)(block.number == 0) - require(bool)(block.number == 0)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-strict-equalities
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/incorrect_equality.incorrect-equality.json exists already, the overwrite is prevented
INFO:Slither:tests/incorrect_equality.sol analyzed (5 contracts), 12 result(s) found INFO:Slither:tests/incorrect_equality.sol analyzed (5 contracts), 12 result(s) found

@ -7,4 +7,5 @@ Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function in
-balanceOf (tests/incorrect_erc20_interface.sol#8) -balanceOf (tests/incorrect_erc20_interface.sol#8)
-allowance (tests/incorrect_erc20_interface.sol#9) -allowance (tests/incorrect_erc20_interface.sol#9)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc20-interface
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/incorrect_erc20_interface.erc20-interface.json exists already, the overwrite is prevented
INFO:Slither:tests/incorrect_erc20_interface.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/incorrect_erc20_interface.sol analyzed (1 contracts), 1 result(s) found

@ -11,4 +11,5 @@ Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function
-getApproved (tests/incorrect_erc721_interface.sol#14) -getApproved (tests/incorrect_erc721_interface.sol#14)
-isApprovedForAll (tests/incorrect_erc721_interface.sol#15) -isApprovedForAll (tests/incorrect_erc721_interface.sol#15)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/incorrect_erc721_interface.erc721-interface.json exists already, the overwrite is prevented
INFO:Slither:tests/incorrect_erc721_interface.sol analyzed (2 contracts), 1 result(s) found INFO:Slither:tests/incorrect_erc721_interface.sol analyzed (2 contracts), 1 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
GetCode.at uses assembly (tests/inline_assembly_contract-0.5.1.sol#6-20) GetCode.at uses assembly (tests/inline_assembly_contract-0.5.1.sol#6-20)
- tests/inline_assembly_contract-0.5.1.sol#7-20 - tests/inline_assembly_contract-0.5.1.sol#7-20
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/inline_assembly_contract-0.5.1.assembly.json exists already, the overwrite is prevented
INFO:Slither:tests/inline_assembly_contract-0.5.1.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/inline_assembly_contract-0.5.1.sol analyzed (1 contracts), 1 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20) GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20)
- tests/inline_assembly_contract.sol#7-20 - tests/inline_assembly_contract.sol#7-20
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/inline_assembly_contract.assembly.json exists already, the overwrite is prevented
INFO:Slither:tests/inline_assembly_contract.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/inline_assembly_contract.sol analyzed (1 contracts), 1 result(s) found

@ -4,4 +4,5 @@ VectorSum.sumAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#16-22)
VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#25-47) VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#25-47)
- tests/inline_assembly_library-0.5.1.sol#26-47 - tests/inline_assembly_library-0.5.1.sol#26-47
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/inline_assembly_library-0.5.1.assembly.json exists already, the overwrite is prevented
INFO:Slither:tests/inline_assembly_library-0.5.1.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/inline_assembly_library-0.5.1.sol analyzed (1 contracts), 2 result(s) found

@ -4,4 +4,5 @@ VectorSum.sumAsm uses assembly (tests/inline_assembly_library.sol#16-22)
VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library.sol#25-47) VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library.sol#25-47)
- tests/inline_assembly_library.sol#26-47 - tests/inline_assembly_library.sol#26-47
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#assembly-usage
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/inline_assembly_library.assembly.json exists already, the overwrite is prevented
INFO:Slither:tests/inline_assembly_library.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/inline_assembly_library.sol analyzed (1 contracts), 2 result(s) found

@ -4,4 +4,5 @@ Contract locking ether found in :
- receive (tests/locked_ether-0.5.1.sol#4-6) - receive (tests/locked_ether-0.5.1.sol#4-6)
But does not have a function to withdraw the ether But does not have a function to withdraw the ether
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/locked_ether-0.5.1.locked-ether.json exists already, the overwrite is prevented
INFO:Slither:tests/locked_ether-0.5.1.sol analyzed (4 contracts), 1 result(s) found INFO:Slither:tests/locked_ether-0.5.1.sol analyzed (4 contracts), 1 result(s) found

@ -4,4 +4,5 @@ Contract locking ether found in :
- receive (tests/locked_ether.sol#4-6) - receive (tests/locked_ether.sol#4-6)
But does not have a function to withdraw the ether But does not have a function to withdraw the ether
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#contracts-that-lock-ether
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/locked_ether.locked-ether.json exists already, the overwrite is prevented
INFO:Slither:tests/locked_ether.sol analyzed (4 contracts), 1 result(s) found INFO:Slither:tests/locked_ether.sol analyzed (4 contracts), 1 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
Low level call in Sender.send (tests/low_level_calls.sol#5-7): Low level call in Sender.send (tests/low_level_calls.sol#5-7):
-_receiver.call.value(msg.value).gas(7777)() tests/low_level_calls.sol#6 -_receiver.call.value(msg.value).gas(7777)() tests/low_level_calls.sol#6
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#low-level-calls
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/low_level_calls.low-level-calls.json exists already, the overwrite is prevented
INFO:Slither:tests/low_level_calls.sol analyzed (2 contracts), 1 result(s) found INFO:Slither:tests/low_level_calls.sol analyzed (2 contracts), 1 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
CallInLoop.bad has external calls inside a loop: CallInLoop.bad has external calls inside a loop:
- destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11) - destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation/_edit#calls-inside-a-loop Reference: https://github.com/crytic/slither/wiki/Detector-Documentation/_edit#calls-inside-a-loop
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/multiple_calls_in_loop.calls-loop.json exists already, the overwrite is prevented
INFO:Slither:tests/multiple_calls_in_loop.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/multiple_calls_in_loop.sol analyzed (1 contracts), 1 result(s) found

@ -12,4 +12,5 @@ Parameter '_used' of T.test (tests/naming_convention.sol#59) is not in mixedCase
Variable 'T._myPublicVar' (tests/naming_convention.sol#56) is not in mixedCase Variable 'T._myPublicVar' (tests/naming_convention.sol#56) is not in mixedCase
Variable 'T.l' (tests/naming_convention.sol#67) used l, O, I, which should not be used Variable 'T.l' (tests/naming_convention.sol#67) used l, O, I, which should not be used
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#conformance-to-solidity-naming-conventions
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/naming_convention.naming-convention.json exists already, the overwrite is prevented
INFO:Slither:tests/naming_convention.sol analyzed (3 contracts), 12 result(s) found INFO:Slither:tests/naming_convention.sol analyzed (3 contracts), 12 result(s) found

@ -2,5 +2,5 @@ INFO:Detectors:
Detected issues with version pragma in tests/old_solc.sol.json: Detected issues with version pragma in tests/old_solc.sol.json:
- pragma solidity0.4.21 (None): it allows old versions - pragma solidity0.4.21 (None): it allows old versions
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity
INFO:Slither:/home/monty/Private/tob/tools/slither-public/scripts/../tests/expected_json/old_solc.sol.json.solc-version.json exists already, the overwrite is prevented INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/old_solc.sol.json.solc-version.json exists already, the overwrite is prevented
INFO:Slither:tests/old_solc.sol.json analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/old_solc.sol.json analyzed (1 contracts), 1 result(s) found

@ -1,44 +1,8 @@
ERROR:root:Error in tests/pragma.0.4.24.sol INFO:Detectors:
ERROR:root:Traceback (most recent call last): Different versions of Solidity is used in :
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 189, in _run_solc - Version used: ['^0.4.23', '^0.4.24']
ret = json.loads(stdout) - tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads - tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24
return _default_decoder.decode(s) Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/pragma.0.4.24.pragma.json exists already, the overwrite is prevented
obj, end = self.raw_decode(s, idx=_w(s, 0).end()) INFO:Slither:tests/pragma.0.4.24.sol analyzed (1 contracts), 1 result(s) found
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/monty/Private/tob/tools/slither-public/slither/slither.py", line 56, in __init__
crytic_compile = CryticCompile(contract, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/crytic_compile.py", line 68, in __init__
self._compile(target, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/crytic_compile.py", line 590, in _compile
self._platform.compile(self, target, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 33, in compile
working_dir=solc_working_dir)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 192, in _run_solc
raise InvalidCompilation(f'Invalid solc compilation {stderr}')
crytic_compile.platform.exceptions.InvalidCompilation: Invalid solc compilation tests/pragma.0.4.23.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.5.1+commit.c8a2cb62.Linux.g++ - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.23;
^----------------------^
tests/pragma.0.4.24.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.5.1+commit.c8a2cb62.Linux.g++ - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 558, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 51, in process
**vars(args))
File "/home/monty/Private/tob/tools/slither-public/slither/slither.py", line 59, in __init__
raise SlitherError('Invalid compilation: '+e)
TypeError: must be str, not InvalidCompilation

@ -10,4 +10,5 @@ Reentrancy in Reentrancy.withdrawBalance_fixed_3 (tests/reentrancy-0.5.1.sol#44-
State variables written after the call(s): State variables written after the call(s):
- userBalance (tests/reentrancy-0.5.1.sol#51) - userBalance (tests/reentrancy-0.5.1.sol#51)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/reentrancy-0.5.1.reentrancy-eth.json exists already, the overwrite is prevented
INFO:Slither:tests/reentrancy-0.5.1.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/reentrancy-0.5.1.sol analyzed (1 contracts), 2 result(s) found

@ -1,10 +0,0 @@
Traceback (most recent call last):
File "/home/monty/Envs/slither/bin/slither", line 11, in <module>
load_entry_point('slither-analyzer', 'console_scripts', 'slither')()
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 503, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 522, in main_impl
detector_classes = choose_detectors(args, all_detector_classes)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 191, in choose_detectors
raise Exception('Error: {} is not a detector'.format(d))
Exception: Error: reentrancy is not a detector

@ -10,4 +10,5 @@ Reentrancy in Reentrancy.withdrawBalance_nested (tests/reentrancy.sol#64-70):
State variables written after the call(s): State variables written after the call(s):
- userBalance (tests/reentrancy.sol#68) - userBalance (tests/reentrancy.sol#68)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#reentrancy-vulnerabilities
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/reentrancy.reentrancy-eth.json exists already, the overwrite is prevented
INFO:Slither:tests/reentrancy.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/reentrancy.sol analyzed (1 contracts), 2 result(s) found

@ -1,5 +1,6 @@
INFO:Detectors: INFO:Detectors:
/home/monty/Private/tob/tools/slither-public/tests/right_to_left_override.sol contains a unicode right-to-left-override character: /home/travis/build/crytic/slither/tests/right_to_left_override.sol contains a unicode right-to-left-override character:
- test1(/*A/*B*/2 , 1/* - test1(/*A/*B*/2 , 1/*
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#right-to-left-override-character Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#right-to-left-override-character
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/right_to_left_override.rtlo.json exists already, the overwrite is prevented
INFO:Slither:tests/right_to_left_override.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/right_to_left_override.sol analyzed (1 contracts), 1 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
DerivedContract.owner (tests/shadowing_abstract.sol#7) shadows: DerivedContract.owner (tests/shadowing_abstract.sol#7) shadows:
- BaseContract.owner (tests/shadowing_abstract.sol#2) - BaseContract.owner (tests/shadowing_abstract.sol#2)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing-from-abstract-contracts
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/shadowing_abstract.shadowing-abstract.json exists already, the overwrite is prevented
INFO:Slither:tests/shadowing_abstract.sol analyzed (2 contracts), 1 result(s) found INFO:Slither:tests/shadowing_abstract.sol analyzed (2 contracts), 1 result(s) found

@ -13,4 +13,5 @@ FurtherExtendedContract.this (state variable @ tests/shadowing_builtin_symbols.s
FurtherExtendedContract.abi (state variable @ tests/shadowing_builtin_symbols.sol#21) shadows built-in symbol "abi" FurtherExtendedContract.abi (state variable @ tests/shadowing_builtin_symbols.sol#21) shadows built-in symbol "abi"
Reserved.mutable (state variable @ tests/shadowing_builtin_symbols.sol#32) shadows built-in symbol "mutable" Reserved.mutable (state variable @ tests/shadowing_builtin_symbols.sol#32) shadows built-in symbol "mutable"
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#builtin-symbol-shadowing
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/shadowing_builtin_symbols.shadowing-builtin.json exists already, the overwrite is prevented
INFO:Slither:tests/shadowing_builtin_symbols.sol analyzed (4 contracts), 13 result(s) found INFO:Slither:tests/shadowing_builtin_symbols.sol analyzed (4 contracts), 13 result(s) found

@ -12,4 +12,5 @@ FurtherExtendedContract.shadowingParent.w (local variable @ tests/shadowing_loca
FurtherExtendedContract.shadowingParent.v (local variable @ tests/shadowing_local_variable.sol#25) shadows: FurtherExtendedContract.shadowingParent.v (local variable @ tests/shadowing_local_variable.sol#25) shadows:
- ExtendedContract.v (event @ tests/shadowing_local_variable.sol#13) - ExtendedContract.v (event @ tests/shadowing_local_variable.sol#13)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#local-variable-shadowing
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/shadowing_local_variable.shadowing-local.json exists already, the overwrite is prevented
INFO:Slither:tests/shadowing_local_variable.sol analyzed (3 contracts), 5 result(s) found INFO:Slither:tests/shadowing_local_variable.sol analyzed (3 contracts), 5 result(s) found

@ -2,4 +2,5 @@ INFO:Detectors:
DerivedContract.owner (tests/shadowing_state_variable.sol#12) shadows: DerivedContract.owner (tests/shadowing_state_variable.sol#12) shadows:
- BaseContract.owner (tests/shadowing_state_variable.sol#2) - BaseContract.owner (tests/shadowing_state_variable.sol#2)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#state-variable-shadowing
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/shadowing_state_variable.shadowing-state.json exists already, the overwrite is prevented
INFO:Slither:tests/shadowing_state_variable.sol analyzed (2 contracts), 1 result(s) found INFO:Slither:tests/shadowing_state_variable.sol analyzed (2 contracts), 1 result(s) found

@ -3,4 +3,5 @@ Detected issues with version pragma in :
- pragma solidity^0.4.23 (tests/solc_version_incorrect.sol#2): it allows old versions - pragma solidity^0.4.23 (tests/solc_version_incorrect.sol#2): it allows old versions
- pragma solidity>=0.4.0<0.6.0 (tests/solc_version_incorrect.sol#3): it allows old versions - pragma solidity>=0.4.0<0.6.0 (tests/solc_version_incorrect.sol#3): it allows old versions
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/solc_version_incorrect.solc-version.json exists already, the overwrite is prevented
INFO:Slither:tests/solc_version_incorrect.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/solc_version_incorrect.sol analyzed (1 contracts), 1 result(s) found

@ -9,4 +9,5 @@ Timestamp.bad2 (tests/timestamp.sol#13-15) uses timestamp for comparisons
Dangerous comparisons: Dangerous comparisons:
- block.timestamp > 0 (tests/timestamp.sol#14) - block.timestamp > 0 (tests/timestamp.sol#14)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#block-timestamp
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/timestamp.timestamp.json exists already, the overwrite is prevented
INFO:Slither:tests/timestamp.sol analyzed (1 contracts), 3 result(s) found INFO:Slither:tests/timestamp.sol analyzed (1 contracts), 3 result(s) found

@ -16,4 +16,5 @@ C.i (tests/too_many_digits.sol#29-33) uses literals with too many digits:
- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000 - x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000
Use the proper denomination (ether-unit, time-unit,or the scientific notation Use the proper denomination (ether-unit, time-unit,or the scientific notation
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/too_many_digits.too-many-digits.json exists already, the overwrite is prevented
INFO:Slither:tests/too_many_digits.sol analyzed (1 contracts), 3 result(s) found INFO:Slither:tests/too_many_digits.sol analyzed (1 contracts), 3 result(s) found

@ -4,4 +4,5 @@ TxOrigin.bug0 uses tx.origin for authorization:
TxOrigin.bug2 uses tx.origin for authorization: TxOrigin.bug2 uses tx.origin for authorization:
- tx.origin != owner (tests/tx_origin-0.5.1.sol#14-16) - tx.origin != owner (tests/tx_origin-0.5.1.sol#14-16)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/tx_origin-0.5.1.tx-origin.json exists already, the overwrite is prevented
INFO:Slither:tests/tx_origin-0.5.1.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/tx_origin-0.5.1.sol analyzed (1 contracts), 2 result(s) found

@ -4,4 +4,5 @@ TxOrigin.bug0 uses tx.origin for authorization:
TxOrigin.bug2 uses tx.origin for authorization: TxOrigin.bug2 uses tx.origin for authorization:
- tx.origin != owner (tests/tx_origin.sol#14-16) - tx.origin != owner (tests/tx_origin.sol#14-16)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#dangerous-usage-of-txorigin
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/tx_origin.tx-origin.json exists already, the overwrite is prevented
INFO:Slither:tests/tx_origin.sol analyzed (1 contracts), 2 result(s) found INFO:Slither:tests/tx_origin.sol analyzed (1 contracts), 2 result(s) found

@ -8,4 +8,5 @@ Test2.st (tests/uninitialized-0.5.1.sol#45) is never initialized. It is used in:
Test2.v (tests/uninitialized-0.5.1.sol#47) is never initialized. It is used in: Test2.v (tests/uninitialized-0.5.1.sol#47) is never initialized. It is used in:
- init (tests/uninitialized-0.5.1.sol#49-51) - init (tests/uninitialized-0.5.1.sol#49-51)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/uninitialized-0.5.1.uninitialized-state.json exists already, the overwrite is prevented
INFO:Slither:tests/uninitialized-0.5.1.sol analyzed (4 contracts), 4 result(s) found INFO:Slither:tests/uninitialized-0.5.1.sol analyzed (4 contracts), 4 result(s) found

@ -8,4 +8,5 @@ Test2.st (tests/uninitialized.sol#45) is never initialized. It is used in:
Test2.v (tests/uninitialized.sol#47) is never initialized. It is used in: Test2.v (tests/uninitialized.sol#47) is never initialized. It is used in:
- init (tests/uninitialized.sol#49-51) - init (tests/uninitialized.sol#49-51)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-state-variables
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/uninitialized.uninitialized-state.json exists already, the overwrite is prevented
INFO:Slither:tests/uninitialized.sol analyzed (4 contracts), 4 result(s) found INFO:Slither:tests/uninitialized.sol analyzed (4 contracts), 4 result(s) found

@ -1,4 +1,5 @@
INFO:Detectors: INFO:Detectors:
uint_not_init in Uninitialized.func (tests/uninitialized_local_variable.sol#4) is a local variable never initialiazed uint_not_init in Uninitialized.func (tests/uninitialized_local_variable.sol#4) is a local variable never initialiazed
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/uninitialized_local_variable.uninitialized-local.json exists already, the overwrite is prevented
INFO:Slither:tests/uninitialized_local_variable.sol analyzed (1 contracts), 1 result(s) found INFO:Slither:tests/uninitialized_local_variable.sol analyzed (1 contracts), 1 result(s) found

@ -1,50 +1,5 @@
ERROR:root:Error in tests/uninitialized_storage_pointer.sol INFO:Detectors:
ERROR:root:Traceback (most recent call last): st_bug in Uninitialized.func (tests/uninitialized_storage_pointer.sol#10) is a storage variable never initialiazed
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 189, in _run_solc Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-storage-variables
ret = json.loads(stdout) INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json exists already, the overwrite is prevented
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads INFO:Slither:tests/uninitialized_storage_pointer.sol analyzed (1 contracts), 1 result(s) found
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/monty/Private/tob/tools/slither-public/slither/slither.py", line 56, in __init__
crytic_compile = CryticCompile(contract, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/crytic_compile.py", line 68, in __init__
self._compile(target, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/crytic_compile.py", line 590, in _compile
self._platform.compile(self, target, **kwargs)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 33, in compile
working_dir=solc_working_dir)
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 192, in _run_solc
raise InvalidCompilation(f'Invalid solc compilation {stderr}')
crytic_compile.platform.exceptions.InvalidCompilation: Invalid solc compilation tests/uninitialized_storage_pointer.sol:7:5: Error: No visibility specified. Did you intend to add "public"?
function func() {
^ (Relevant source part starts here and spans across multiple lines).
tests/uninitialized_storage_pointer.sol:1:1: Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.5.1;"
contract Uninitialized{
^ (Relevant source part starts here and spans across multiple lines).
tests/uninitialized_storage_pointer.sol:8:9: Error: Data location must be "storage" or "memory" for variable, but none was given.
St st; // non init, but never read so its fine
^---^
tests/uninitialized_storage_pointer.sol:10:9: Error: Data location must be "storage" or "memory" for variable, but none was given.
St st_bug;
^-------^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 558, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 51, in process
**vars(args))
File "/home/monty/Private/tob/tools/slither-public/slither/slither.py", line 59, in __init__
raise SlitherError('Invalid compilation: '+e)
TypeError: must be str, not InvalidCompilation

@ -3,4 +3,5 @@ User.test (tests/unused_return.sol#17-29) does not use the value returned by ext
-t.f() (tests/unused_return.sol#18) -t.f() (tests/unused_return.sol#18)
-a.add(0) (tests/unused_return.sol#22) -a.add(0) (tests/unused_return.sol#22)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/unused_return.unused-return.json exists already, the overwrite is prevented
INFO:Slither:tests/unused_return.sol analyzed (3 contracts), 1 result(s) found INFO:Slither:tests/unused_return.sol analyzed (3 contracts), 1 result(s) found

@ -1,4 +1,5 @@
INFO:Detectors: INFO:Detectors:
A.unused (tests/unused_state.sol#4) is never used in B A.unused (tests/unused_state.sol#4) is never used in B
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variables Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-state-variables
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/unused_state.unused-state.json exists already, the overwrite is prevented
INFO:Slither:tests/unused_state.sol analyzed (2 contracts), 1 result(s) found INFO:Slither:tests/unused_state.sol analyzed (2 contracts), 1 result(s) found

Loading…
Cancel
Save