pull/231/head
Josselin 6 years ago
parent 30736c9f67
commit 5303b644ba
  1. 1
      scripts/tests_generate_expected_json_4.sh
  2. 1
      scripts/tests_generate_expected_json_5.sh
  3. 1
      tests/expected_json/arbitrary_send-0.5.1.arbitrary-send.txt
  4. 1
      tests/expected_json/arbitrary_send.arbitrary-send.txt
  5. 2
      tests/expected_json/backdoor.backdoor.txt
  6. 2
      tests/expected_json/backdoor.suicidal.txt
  7. 1
      tests/expected_json/const_state_variables.constable-states.txt
  8. 1
      tests/expected_json/constant-0.5.1.constant-function.txt
  9. 1
      tests/expected_json/constant.constant-function.txt
  10. 1
      tests/expected_json/controlled_delegatecall.controlled-delegatecall.txt
  11. 1
      tests/expected_json/deprecated_calls.deprecated-standards.txt
  12. 1
      tests/expected_json/erc20_indexed.erc20-indexed.txt
  13. 1
      tests/expected_json/external_function.external-function.txt
  14. 1
      tests/expected_json/external_function_2.external-function.txt
  15. 1
      tests/expected_json/incorrect_equality.incorrect-equality.txt
  16. 1
      tests/expected_json/incorrect_erc20_interface.erc20-interface.txt
  17. 1
      tests/expected_json/incorrect_erc721_interface.erc721-interface.txt
  18. 1
      tests/expected_json/inline_assembly_contract-0.5.1.assembly.txt
  19. 1
      tests/expected_json/inline_assembly_contract.assembly.txt
  20. 1
      tests/expected_json/inline_assembly_library-0.5.1.assembly.txt
  21. 1
      tests/expected_json/inline_assembly_library.assembly.txt
  22. 1
      tests/expected_json/locked_ether-0.5.1.locked-ether.txt
  23. 1
      tests/expected_json/locked_ether.locked-ether.txt
  24. 1
      tests/expected_json/low_level_calls.low-level-calls.txt
  25. 1
      tests/expected_json/multiple_calls_in_loop.calls-loop.txt
  26. 1
      tests/expected_json/naming_convention.naming-convention.txt
  27. 2
      tests/expected_json/old_solc.sol.json.solc-version.txt
  28. 40
      tests/expected_json/pragma.0.4.24.pragma.txt
  29. 1
      tests/expected_json/reentrancy-0.5.1.reentrancy-eth.txt
  30. 6
      tests/expected_json/reentrancy-0.5.1.reentrancy.txt
  31. 1
      tests/expected_json/reentrancy.reentrancy-eth.txt
  32. 3
      tests/expected_json/right_to_left_override.rtlo.txt
  33. 1
      tests/expected_json/shadowing_abstract.shadowing-abstract.txt
  34. 1
      tests/expected_json/shadowing_builtin_symbols.shadowing-builtin.txt
  35. 1
      tests/expected_json/shadowing_local_variable.shadowing-local.txt
  36. 1
      tests/expected_json/shadowing_state_variable.shadowing-state.txt
  37. 1
      tests/expected_json/solc_version_incorrect.solc-version.txt
  38. 1
      tests/expected_json/timestamp.timestamp.txt
  39. 1
      tests/expected_json/too_many_digits.too-many-digits.txt
  40. 1
      tests/expected_json/tx_origin-0.5.1.tx-origin.txt
  41. 1
      tests/expected_json/tx_origin.tx-origin.txt
  42. 1
      tests/expected_json/uninitialized-0.5.1.uninitialized-state.txt
  43. 1
      tests/expected_json/uninitialized.uninitialized-state.txt
  44. 1
      tests/expected_json/uninitialized_local_variable.uninitialized-local.txt
  45. 40
      tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt
  46. 1
      tests/expected_json/unused_return.unused-return.txt
  47. 1
      tests/expected_json/unused_state.unused-state.txt

@ -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_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
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"

@ -6,4 +6,5 @@ Test.indirect (tests/arbitrary_send-0.5.1.sol#19-21) sends eth to arbitrary user
Dangerous calls:
- 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
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

@ -6,4 +6,5 @@ Test.indirect (tests/arbitrary_send.sol#19-21) sends eth to arbitrary user
Dangerous calls:
- 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
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

@ -1,5 +1,5 @@
INFO:Detectors:
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
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

@ -1,5 +1,5 @@
INFO:Detectors:
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
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

@ -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_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
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

@ -1,4 +1,5 @@
INFO:Detectors:
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
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

@ -5,4 +5,5 @@ Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but change
- Constant.a
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
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

@ -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
addr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19)
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

@ -14,4 +14,5 @@ Deprecated standard detected @ tests/deprecated_calls.sol#22:
Deprecated standard detected @ tests/deprecated_calls.sol#25:
- Usage of "suicide()" should be replaced with "selfdestruct()"
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

@ -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 'spender'
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

@ -4,4 +4,5 @@ ContractWithFunctionNotCalled.funcNotCalled2 (tests/external_function.sol#17-19)
ContractWithFunctionNotCalled.funcNotCalled (tests/external_function.sol#21-23) 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
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

@ -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

@ -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:
- require(bool)(block.number == 0)
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

@ -7,4 +7,5 @@ Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function in
-balanceOf (tests/incorrect_erc20_interface.sol#8)
-allowance (tests/incorrect_erc20_interface.sol#9)
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

@ -11,4 +11,5 @@ Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function
-getApproved (tests/incorrect_erc721_interface.sol#14)
-isApprovedForAll (tests/incorrect_erc721_interface.sol#15)
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

@ -2,4 +2,5 @@ INFO:Detectors:
GetCode.at uses assembly (tests/inline_assembly_contract-0.5.1.sol#6-20)
- tests/inline_assembly_contract-0.5.1.sol#7-20
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

@ -2,4 +2,5 @@ INFO:Detectors:
GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20)
- tests/inline_assembly_contract.sol#7-20
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

@ -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)
- tests/inline_assembly_library-0.5.1.sol#26-47
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

@ -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)
- tests/inline_assembly_library.sol#26-47
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

@ -4,4 +4,5 @@ Contract locking ether found in :
- receive (tests/locked_ether-0.5.1.sol#4-6)
But does not have a function to withdraw the 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

@ -4,4 +4,5 @@ Contract locking ether found in :
- receive (tests/locked_ether.sol#4-6)
But does not have a function to withdraw the 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

@ -2,4 +2,5 @@ INFO:Detectors:
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
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

@ -2,4 +2,5 @@ INFO:Detectors:
CallInLoop.bad has external calls inside a loop:
- 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
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

@ -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.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
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

@ -2,5 +2,5 @@ INFO:Detectors:
Detected issues with version pragma in tests/old_solc.sol.json:
- pragma solidity0.4.21 (None): it allows old versions
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

@ -1,8 +1,44 @@
ERROR:Slither:Invalid compilation
ERROR:Slither: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
ERROR:root:Error in tests/pragma.0.4.24.sol
ERROR:root:Traceback (most recent call last):
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 189, in _run_solc
ret = json.loads(stdout)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
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/travis/build/crytic/slither/slither/slither.py", line 55, 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/travis/build/crytic/slither/slither/__main__.py", line 520, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "/home/travis/build/crytic/slither/slither/__main__.py", line 52, in process
**vars(args))
File "/home/travis/build/crytic/slither/slither/slither.py", line 58, 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):
- userBalance (tests/reentrancy-0.5.1.sol#51)
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

@ -1,10 +1,10 @@
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 469, in main
File "/home/travis/build/crytic/slither/slither/__main__.py", line 470, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 483, in main_impl
File "/home/travis/build/crytic/slither/slither/__main__.py", line 484, in main_impl
detector_classes = choose_detectors(args, all_detector_classes)
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 176, in choose_detectors
File "/home/travis/build/crytic/slither/slither/__main__.py", line 177, 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):
- userBalance (tests/reentrancy.sol#68)
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

@ -1,5 +1,6 @@
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/*
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

@ -2,4 +2,5 @@ INFO:Detectors:
DerivedContract.owner (tests/shadowing_abstract.sol#7) shadows:
- BaseContract.owner (tests/shadowing_abstract.sol#2)
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

@ -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"
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
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

@ -12,4 +12,5 @@ FurtherExtendedContract.shadowingParent.w (local variable @ tests/shadowing_loca
FurtherExtendedContract.shadowingParent.v (local variable @ tests/shadowing_local_variable.sol#25) shadows:
- ExtendedContract.v (event @ tests/shadowing_local_variable.sol#13)
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

@ -2,4 +2,5 @@ INFO:Detectors:
DerivedContract.owner (tests/shadowing_state_variable.sol#12) shadows:
- BaseContract.owner (tests/shadowing_state_variable.sol#2)
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

@ -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.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
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

@ -9,4 +9,5 @@ Timestamp.bad2 (tests/timestamp.sol#13-15) uses timestamp for comparisons
Dangerous comparisons:
- block.timestamp > 0 (tests/timestamp.sol#14)
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

@ -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
Use the proper denomination (ether-unit, time-unit,or the scientific notation
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

@ -4,4 +4,5 @@ TxOrigin.bug0 uses tx.origin for authorization:
TxOrigin.bug2 uses tx.origin for authorization:
- 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
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

@ -4,4 +4,5 @@ TxOrigin.bug0 uses tx.origin for authorization:
TxOrigin.bug2 uses tx.origin for authorization:
- tx.origin != owner (tests/tx_origin.sol#14-16)
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

@ -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:
- init (tests/uninitialized-0.5.1.sol#49-51)
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

@ -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:
- init (tests/uninitialized.sol#49-51)
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

@ -1,4 +1,5 @@
INFO:Detectors:
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
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

@ -1,5 +1,29 @@
ERROR:Slither:Invalid compilation
ERROR:Slither:Invalid solc compilation tests/uninitialized_storage_pointer.sol:7:5: Error: No visibility specified. Did you intend to add "public"?
ERROR:root:Error in tests/uninitialized_storage_pointer.sol
ERROR:root:Traceback (most recent call last):
File "/home/monty/Private/tob/tools/crytic-compile/crytic_compile/platform/solc.py", line 189, in _run_solc
ret = json.loads(stdout)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
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/travis/build/crytic/slither/slither/slither.py", line 55, 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;"
@ -12,3 +36,15 @@ tests/uninitialized_storage_pointer.sol:10:9: Error: Data location must be "stor
St st_bug;
^-------^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/travis/build/crytic/slither/slither/__main__.py", line 520, in main_impl
(results, number_contracts) = process(filename, args, detector_classes, printer_classes)
File "/home/travis/build/crytic/slither/slither/__main__.py", line 52, in process
**vars(args))
File "/home/travis/build/crytic/slither/slither/slither.py", line 58, 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)
-a.add(0) (tests/unused_return.sol#22)
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

@ -1,4 +1,5 @@
INFO:Detectors:
A.unused (tests/unused_state.sol#4) is never used in B
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

Loading…
Cancel
Save