Rename add_other_to_json to add_pragma_to_json

Add contract/function field element to variable/enum/structure/...
Update travis test
pull/226/head
Josselin 6 years ago
parent d962ddeb5b
commit 9149bfc5bf
  1. 2
      scripts/tests_generate_expected_json_5.sh
  2. 33
      slither/detectors/abstract_detector.py
  3. 5
      slither/detectors/attributes/constant_pragma.py
  4. 5
      slither/detectors/attributes/incorrect_solc.py
  5. 160
      tests/expected_json/arbitrary_send-0.5.1.arbitrary-send.json
  6. 1
      tests/expected_json/arbitrary_send-0.5.1.arbitrary-send.txt
  7. 160
      tests/expected_json/arbitrary_send.arbitrary-send.json
  8. 1
      tests/expected_json/arbitrary_send.arbitrary-send.txt
  9. 294
      tests/expected_json/const_state_variables.constable-states.json
  10. 3
      tests/expected_json/const_state_variables.constable-states.txt
  11. 9
      tests/expected_json/constant-0.5.1.constant-function.json
  12. 1
      tests/expected_json/constant-0.5.1.constant-function.txt
  13. 109
      tests/expected_json/constant.constant-function.json
  14. 1
      tests/expected_json/constant.constant-function.txt
  15. 189
      tests/expected_json/controlled_delegatecall.controlled-delegatecall.json
  16. 5
      tests/expected_json/controlled_delegatecall.controlled-delegatecall.txt
  17. 487
      tests/expected_json/deprecated_calls.deprecated-standards.json
  18. 1
      tests/expected_json/deprecated_calls.deprecated-standards.txt
  19. 92
      tests/expected_json/erc20_indexed.erc20-indexed.json
  20. 12
      tests/expected_json/erc20_indexed.erc20-indexed.txt
  21. 1
      tests/expected_json/external_function.external-function.txt
  22. 1
      tests/expected_json/external_function_2.external-function.txt
  23. 1440
      tests/expected_json/incorrect_equality.incorrect-equality.json
  24. 51
      tests/expected_json/incorrect_equality.incorrect-equality.txt
  25. 92
      tests/expected_json/incorrect_erc20_interface.erc20-interface.json
  26. 16
      tests/expected_json/incorrect_erc20_interface.erc20-interface.txt
  27. 212
      tests/expected_json/incorrect_erc721_interface.erc721-interface.json
  28. 24
      tests/expected_json/incorrect_erc721_interface.erc721-interface.txt
  29. 68
      tests/expected_json/inline_assembly_contract-0.5.1.assembly.json
  30. 1
      tests/expected_json/inline_assembly_contract-0.5.1.assembly.txt
  31. 68
      tests/expected_json/inline_assembly_contract.assembly.json
  32. 1
      tests/expected_json/inline_assembly_contract.assembly.txt
  33. 190
      tests/expected_json/inline_assembly_library-0.5.1.assembly.json
  34. 1
      tests/expected_json/inline_assembly_library-0.5.1.assembly.txt
  35. 190
      tests/expected_json/inline_assembly_library.assembly.json
  36. 1
      tests/expected_json/inline_assembly_library.assembly.txt
  37. 34
      tests/expected_json/locked_ether-0.5.1.locked-ether.json
  38. 1
      tests/expected_json/locked_ether-0.5.1.locked-ether.txt
  39. 34
      tests/expected_json/locked_ether.locked-ether.json
  40. 1
      tests/expected_json/locked_ether.locked-ether.txt
  41. 44
      tests/expected_json/low_level_calls.low-level-calls.json
  42. 1
      tests/expected_json/low_level_calls.low-level-calls.txt
  43. 94
      tests/expected_json/multiple_calls_in_loop.calls-loop.json
  44. 4
      tests/expected_json/multiple_calls_in_loop.calls-loop.txt
  45. 711
      tests/expected_json/naming_convention.naming-convention.json
  46. 1
      tests/expected_json/naming_convention.naming-convention.txt
  47. 13
      tests/expected_json/old_solc.sol.json.solc-version.json
  48. 3
      tests/expected_json/old_solc.sol.json.solc-version.txt
  49. 24
      tests/expected_json/pragma.0.4.24.pragma.json
  50. 1
      tests/expected_json/pragma.0.4.24.pragma.txt
  51. 406
      tests/expected_json/reentrancy-0.5.1.reentrancy-eth.json
  52. 1
      tests/expected_json/reentrancy-0.5.1.reentrancy-eth.txt
  53. 470
      tests/expected_json/reentrancy.reentrancy-eth.json
  54. 1
      tests/expected_json/reentrancy.reentrancy-eth.txt
  55. 1
      tests/expected_json/right_to_left_override.rtlo.txt
  56. 40
      tests/expected_json/shadowing_abstract.shadowing-abstract.json
  57. 1
      tests/expected_json/shadowing_abstract.shadowing-abstract.txt
  58. 315
      tests/expected_json/shadowing_builtin_symbols.shadowing-builtin.json
  59. 1
      tests/expected_json/shadowing_builtin_symbols.shadowing-builtin.txt
  60. 312
      tests/expected_json/shadowing_local_variable.shadowing-local.json
  61. 1
      tests/expected_json/shadowing_local_variable.shadowing-local.txt
  62. 52
      tests/expected_json/shadowing_state_variable.shadowing-state.json
  63. 1
      tests/expected_json/shadowing_state_variable.shadowing-state.txt
  64. 42
      tests/expected_json/solc_version_incorrect.solc-version.json
  65. 8
      tests/expected_json/solc_version_incorrect.solc-version.txt
  66. 178
      tests/expected_json/timestamp.timestamp.json
  67. 1
      tests/expected_json/timestamp.timestamp.txt
  68. 556
      tests/expected_json/too_many_digits.too-many-digits.json
  69. 13
      tests/expected_json/too_many_digits.too-many-digits.txt
  70. 224
      tests/expected_json/tx_origin-0.5.1.tx-origin.json
  71. 7
      tests/expected_json/tx_origin-0.5.1.tx-origin.txt
  72. 224
      tests/expected_json/tx_origin.tx-origin.json
  73. 7
      tests/expected_json/tx_origin.tx-origin.txt
  74. 82
      tests/expected_json/unchecked_lowlevel-0.5.1.unchecked-lowlevel.json
  75. 3
      tests/expected_json/unchecked_lowlevel-0.5.1.unchecked-lowlevel.txt
  76. 81
      tests/expected_json/unchecked_lowlevel.unchecked-lowlevel.json
  77. 3
      tests/expected_json/unchecked_lowlevel.unchecked-lowlevel.txt
  78. 89
      tests/expected_json/unchecked_send-0.5.1.unchecked-send.json
  79. 3
      tests/expected_json/unchecked_send-0.5.1.unchecked-send.txt
  80. 121
      tests/expected_json/uninitialized-0.5.1.uninitialized-state.json
  81. 1
      tests/expected_json/uninitialized-0.5.1.uninitialized-state.txt
  82. 121
      tests/expected_json/uninitialized.uninitialized-state.json
  83. 1
      tests/expected_json/uninitialized.uninitialized-state.txt
  84. 46
      tests/expected_json/uninitialized_local_variable.uninitialized-local.json
  85. 1
      tests/expected_json/uninitialized_local_variable.uninitialized-local.txt
  86. 52
      tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.json
  87. 1
      tests/expected_json/uninitialized_storage_pointer.uninitialized-storage.txt
  88. 227
      tests/expected_json/unused_return.unused-return.json
  89. 8
      tests/expected_json/unused_return.unused-return.txt
  90. 255
      tests/expected_json/unused_state.unused-state.json
  91. 6
      tests/expected_json/unused_state.unused-state.txt

@ -23,10 +23,8 @@ generate_expected_json(){
#generate_expected_json tests/uninitialized-0.5.1.sol "uninitialized-state"
#generate_expected_json tests/backdoor.sol "backdoor"
#generate_expected_json tests/backdoor.sol "suicidal"
#generate_expected_json tests/pragma.0.4.24.sol "pragma"
#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/uninitialized_storage_pointer.sol "uninitialized-storage"
#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/arbitrary_send-0.5.1.sol "arbitrary-send"

@ -86,12 +86,6 @@ class AbstractDetector(metaclass=abc.ABCMeta):
DetectorClassification.INFORMATIONAL]:
raise IncorrectDetectorInitialization('CONFIDENCE is not initialized {}'.format(self.__class__.__name__))
# def log(self, info):
# if self.logger:
# info = "\n"+info
# if self.WIKI != '':
# info += 'Reference: {}'.format(self.WIKI)
# self.logger.info(self.color(info))
def _log(self, info):
self.logger.info(self.color(info))
@ -162,7 +156,17 @@ class AbstractDetector(metaclass=abc.ABCMeta):
@staticmethod
def add_variable_to_json(variable, d, additional_fields={}):
from slither.core.variables.state_variable import StateVariable
from slither.core.variables.local_variable import LocalVariable
element = AbstractDetector._create_base_element('variable', variable.name, variable.source_mapping, additional_fields)
if isinstance(variable, StateVariable):
contract = {'elements': []}
AbstractDetector.add_contract_to_json(variable.contract, contract)
element['contract'] = contract['elements'][0]
elif isinstance(variable, LocalVariable):
function = {'elements': []}
AbstractDetector.add_function_to_json(variable.function, function)
element['function'] = function['elements'][0]
d['elements'].append(element)
@staticmethod
@ -191,11 +195,17 @@ class AbstractDetector(metaclass=abc.ABCMeta):
@staticmethod
def add_enum_to_json(enum, d, additional_fields={}):
element = AbstractDetector._create_base_element('enum', enum.name, enum.source_mapping, additional_fields)
contract = {'elements': []}
AbstractDetector.add_contract_to_json(enum.contract, contract)
element['contract'] = contract['elements'][0]
d['elements'].append(element)
@staticmethod
def add_struct_to_json(struct, d, additional_fields={}):
element = AbstractDetector._create_base_element('struct', struct.name, struct.source_mapping, additional_fields)
contract = {'elements': []}
AbstractDetector.add_contract_to_json(struct.contract, contract)
element['contract'] = contract['elements'][0]
d['elements'].append(element)
@staticmethod
@ -222,10 +232,11 @@ class AbstractDetector(metaclass=abc.ABCMeta):
AbstractDetector.add_node_to_json(node, d)
@staticmethod
def add_other_to_json(name, source_mapping, d, additional_fields={}):
# Verify the type of object provided
assert isinstance(name, str), "'name' should be a string when adding an element to a JSON result"
def add_pragma_to_json(pragma, d, additional_fields={}):
# Add the other object to JSON
element = AbstractDetector._create_base_element('other', name, source_mapping, additional_fields)
additional_fields['directive'] = pragma.directive
element = AbstractDetector._create_base_element('pragma',
pragma.version,
pragma.source_mapping,
additional_fields)
d['elements'].append(element)

@ -38,10 +38,7 @@ class ConstantPragma(AbstractDetector):
# Add each pragma to our elements
for p in pragma:
self.add_other_to_json(p.version, p.source_mapping, json, {
"version": p.version,
"directive": p.directive
})
self.add_pragma_to_json(p, json)
results.append(json)
return results

@ -89,10 +89,7 @@ We recommend avoiding complex pragma statement.'''
info = f"Pragma version \"{p.version}\" {reason} ({p.source_mapping_str})\n"
json = self.generate_json_result(info)
self.add_other_to_json(p.version, p.source_mapping, json, {
"version": p.version,
"directive": p.directive
})
self.add_pragma_to_json(p, json)
results.append(json)
return results

@ -85,8 +85,8 @@
}
},
{
"type": "expression",
"expression": "msg.sender.send(address(this).balance)",
"type": "node",
"name": "msg.sender.send(address(this).balance)",
"source_mapping": {
"start": 196,
"length": 38,
@ -99,6 +99,82 @@
],
"starting_column": 9,
"ending_column": 47
},
"function": {
"type": "function",
"name": "direct",
"source_mapping": {
"start": 162,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_relative": "tests/arbitrary_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_short": "tests/arbitrary_send-0.5.1.sol",
"lines": [
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 884,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_relative": "tests/arbitrary_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_short": "tests/arbitrary_send-0.5.1.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -186,8 +262,8 @@
}
},
{
"type": "expression",
"expression": "destination.send(address(this).balance)",
"type": "node",
"name": "destination.send(address(this).balance)",
"source_mapping": {
"start": 352,
"length": 39,
@ -200,6 +276,82 @@
],
"starting_column": 9,
"ending_column": 48
},
"function": {
"type": "function",
"name": "indirect",
"source_mapping": {
"start": 316,
"length": 82,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_relative": "tests/arbitrary_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_short": "tests/arbitrary_send-0.5.1.sol",
"lines": [
19,
20,
21
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 884,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_relative": "tests/arbitrary_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send-0.5.1.sol",
"filename_short": "tests/arbitrary_send-0.5.1.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -6,5 +6,4 @@ 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

@ -85,8 +85,8 @@
}
},
{
"type": "expression",
"expression": "msg.sender.send(address(this).balance)",
"type": "node",
"name": "msg.sender.send(address(this).balance)",
"source_mapping": {
"start": 181,
"length": 38,
@ -99,6 +99,82 @@
],
"starting_column": 9,
"ending_column": 47
},
"function": {
"type": "function",
"name": "direct",
"source_mapping": {
"start": 147,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_relative": "tests/arbitrary_send.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_short": "tests/arbitrary_send.sol",
"lines": [
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 869,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_relative": "tests/arbitrary_send.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_short": "tests/arbitrary_send.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -186,8 +262,8 @@
}
},
{
"type": "expression",
"expression": "destination.send(address(this).balance)",
"type": "node",
"name": "destination.send(address(this).balance)",
"source_mapping": {
"start": 337,
"length": 39,
@ -200,6 +276,82 @@
],
"starting_column": 9,
"ending_column": 48
},
"function": {
"type": "function",
"name": "indirect",
"source_mapping": {
"start": 301,
"length": 82,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_relative": "tests/arbitrary_send.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_short": "tests/arbitrary_send.sol",
"lines": [
19,
20,
21
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 0,
"length": 869,
"filename_used": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_relative": "tests/arbitrary_send.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/arbitrary_send.sol",
"filename_short": "tests/arbitrary_send.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -6,5 +6,4 @@ 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

@ -6,7 +6,7 @@
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\nA.test should be constant (tests/const_state_variables.sol#10)\nA.text2 should be constant (tests/const_state_variables.sol#14)\nB.mySistersAddress should be constant (tests/const_state_variables.sol#26)\nMyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\nMyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n",
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n",
"elements": [
{
"type": "variable",
@ -23,91 +23,323 @@
],
"starting_column": 5,
"ending_column": 81
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 29,
"length": 441,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n",
"elements": [
{
"type": "variable",
"name": "mySistersAddress",
"name": "test",
"source_mapping": {
"start": 496,
"length": 76,
"start": 237,
"length": 20,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
26
10
],
"starting_column": 5,
"ending_column": 81
"ending_column": 25
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 29,
"length": 441,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n",
"elements": [
{
"type": "variable",
"name": "should_be_constant",
"name": "text2",
"source_mapping": {
"start": 793,
"length": 42,
"start": 333,
"length": 20,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
42
14
],
"starting_column": 5,
"ending_column": 47
"ending_column": 25
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 29,
"length": 441,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n",
"elements": [
{
"type": "variable",
"name": "should_be_constant_2",
"name": "mySistersAddress",
"source_mapping": {
"start": 841,
"length": 33,
"start": 496,
"length": 76,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
43
26
],
"starting_column": 5,
"ending_column": 38
"ending_column": 81
},
"contract": {
"type": "contract",
"name": "B",
"source_mapping": {
"start": 473,
"length": 271,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\n",
"elements": [
{
"type": "variable",
"name": "test",
"name": "should_be_constant",
"source_mapping": {
"start": 237,
"length": 20,
"start": 793,
"length": 42,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
10
42
],
"starting_column": 5,
"ending_column": 25
"ending_column": 47
},
"contract": {
"type": "contract",
"name": "MyConc",
"source_mapping": {
"start": 746,
"length": 342,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "constable-states",
"impact": "Informational",
"confidence": "High",
"description": "MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n",
"elements": [
{
"type": "variable",
"name": "text2",
"name": "should_be_constant_2",
"source_mapping": {
"start": 333,
"length": 20,
"start": 841,
"length": 33,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
14
43
],
"starting_column": 5,
"ending_column": 25
"ending_column": 38
},
"contract": {
"type": "contract",
"name": "MyConc",
"source_mapping": {
"start": 746,
"length": 342,
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_relative": "tests/const_state_variables.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol",
"filename_short": "tests/const_state_variables.sol",
"lines": [
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

@ -6,5 +6,4 @@ 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
INFO:Slither:tests/const_state_variables.sol analyzed (3 contracts), 6 result(s) found

@ -60,12 +60,11 @@
"ending_column": 2
}
}
},
{
"type": "info",
"contains_assembly": true
}
]
],
"additional_fields": {
"contains_assembly": true
}
}
]
}

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

@ -83,13 +83,53 @@
],
"starting_column": 5,
"ending_column": 11
},
"contract": {
"type": "contract",
"name": "Constant",
"source_mapping": {
"start": 0,
"length": 392,
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
"filename_relative": "tests/constant.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
"filename_short": "tests/constant.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "info",
"contains_assembly": false
}
]
],
"additional_fields": {
"contains_assembly": false
}
},
{
"check": "constant-function",
@ -172,13 +212,53 @@
],
"starting_column": 5,
"ending_column": 11
},
"contract": {
"type": "contract",
"name": "Constant",
"source_mapping": {
"start": 0,
"length": 392,
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
"filename_relative": "tests/constant.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
"filename_short": "tests/constant.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "info",
"contains_assembly": false
}
]
],
"additional_fields": {
"contains_assembly": false
}
},
{
"check": "constant-function",
@ -245,12 +325,11 @@
"ending_column": 2
}
}
},
{
"type": "info",
"contains_assembly": true
}
]
],
"additional_fields": {
"contains_assembly": true
}
}
]
}

@ -5,5 +5,4 @@ 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

@ -6,8 +6,86 @@
"check": "controlled-delegatecall",
"impact": "High",
"confidence": "Medium",
"description": "C.bad_delegate_call (tests/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\taddr_bad.delegatecall(data) (tests/controlled_delegatecall.sol#10)\n",
"description": "C.bad_delegate_call (tests/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(data) (tests/controlled_delegatecall.sol#10)\n",
"elements": [
{
"type": "node",
"name": "addr_bad.delegatecall(data)",
"source_mapping": {
"start": 201,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
10
],
"starting_column": 9,
"ending_column": 36
},
"function": {
"type": "function",
"name": "bad_delegate_call",
"source_mapping": {
"start": 101,
"length": 134,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
8,
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 585,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"name": "bad_delegate_call",
@ -68,32 +146,92 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "controlled-delegatecall",
"impact": "High",
"confidence": "Medium",
"description": "C.bad_delegate_call2 (tests/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19)\n",
"elements": [
{
"type": "expression",
"expression": "addr_bad.delegatecall(data)",
"type": "node",
"name": "addr_bad.delegatecall(abi.encode(func_id,data))",
"source_mapping": {
"start": 201,
"length": 27,
"start": 400,
"length": 48,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
10
19
],
"starting_column": 9,
"ending_column": 36
"ending_column": 57
},
"function": {
"type": "function",
"name": "bad_delegate_call2",
"source_mapping": {
"start": 337,
"length": 118,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 0,
"length": 585,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
},
{
"check": "controlled-delegatecall",
"impact": "High",
"confidence": "Medium",
"description": "C.bad_delegate_call2 (tests/controlled_delegatecall.sol#18-20) uses delegatecall to a input-controlled function id\n\taddr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19)\n",
"elements": [
},
{
"type": "function",
"name": "bad_delegate_call2",
@ -153,23 +291,6 @@
"ending_column": 2
}
}
},
{
"type": "expression",
"expression": "addr_bad.delegatecall(abi.encode(func_id,data))",
"source_mapping": {
"start": 400,
"length": 48,
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_relative": "tests/controlled_delegatecall.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol",
"filename_short": "tests/controlled_delegatecall.sol",
"lines": [
19
],
"starting_column": 9,
"ending_column": 57
}
}
]
}

@ -1,8 +1,7 @@
INFO:Detectors:
C.bad_delegate_call (tests/controlled_delegatecall.sol#8-11) uses delegatecall to a input-controlled function id
addr_bad.delegatecall(data) (tests/controlled_delegatecall.sol#10)
- addr_bad.delegatecall(data) (tests/controlled_delegatecall.sol#10)
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
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

@ -23,6 +23,49 @@
],
"starting_column": 5,
"ending_column": 49
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
]
@ -34,8 +77,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#7-10:\n\t- Usage of \"msg.gas\" should be replaced with \"gasleft()\"\n",
"elements": [
{
"type": "expression",
"expression": "msg.gas == msg.value",
"type": "node",
"name": "msg.gas == msg.value",
"source_mapping": {
"start": 258,
"length": 107,
@ -51,6 +94,72 @@
],
"starting_column": 9,
"ending_column": 10
},
"function": {
"type": "function",
"name": "functionWithDeprecatedThrow",
"source_mapping": {
"start": 142,
"length": 229,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]
@ -62,8 +171,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#9:\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n",
"elements": [
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 349,
"length": 5,
@ -76,6 +185,72 @@
],
"starting_column": 13,
"ending_column": 18
},
"function": {
"type": "function",
"name": "functionWithDeprecatedThrow",
"source_mapping": {
"start": 142,
"length": 229,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]
@ -87,8 +262,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#16:\n\t- Usage of \"sha3()\" should be replaced with \"keccak256()\"\n",
"elements": [
{
"type": "expression",
"expression": "sha3Result = sha3()(test deprecated sha3 usage)",
"type": "node",
"name": "sha3Result = sha3()(test deprecated sha3 usage)",
"source_mapping": {
"start": 542,
"length": 55,
@ -101,6 +276,78 @@
],
"starting_column": 9,
"ending_column": 64
},
"function": {
"type": "function",
"name": "functionWithDeprecatedReferences",
"source_mapping": {
"start": 420,
"length": 484,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]
@ -112,8 +359,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#19:\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n",
"elements": [
{
"type": "expression",
"expression": "blockHashResult = block.blockhash(0)",
"type": "node",
"name": "blockHashResult = block.blockhash(0)",
"source_mapping": {
"start": 671,
"length": 44,
@ -126,6 +373,78 @@
],
"starting_column": 9,
"ending_column": 53
},
"function": {
"type": "function",
"name": "functionWithDeprecatedReferences",
"source_mapping": {
"start": 420,
"length": 484,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]
@ -137,8 +456,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#22:\n\t- Usage of \"callcode\" should be replaced with \"delegatecall\"\n",
"elements": [
{
"type": "expression",
"expression": "address(this).callcode()",
"type": "node",
"name": "address(this).callcode()",
"source_mapping": {
"start": 785,
"length": 24,
@ -151,6 +470,78 @@
],
"starting_column": 9,
"ending_column": 33
},
"function": {
"type": "function",
"name": "functionWithDeprecatedReferences",
"source_mapping": {
"start": 420,
"length": 484,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]
@ -162,8 +553,8 @@
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#25:\n\t- Usage of \"suicide()\" should be replaced with \"selfdestruct()\"\n",
"elements": [
{
"type": "expression",
"expression": "suicide(address)(address(0))",
"type": "node",
"name": "suicide(address)(address(0))",
"source_mapping": {
"start": 878,
"length": 19,
@ -176,6 +567,78 @@
],
"starting_column": 9,
"ending_column": 28
},
"function": {
"type": "function",
"name": "functionWithDeprecatedReferences",
"source_mapping": {
"start": 420,
"length": 484,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ContractWithDeprecatedReferences",
"source_mapping": {
"start": 0,
"length": 906,
"filename_used": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_relative": "tests/deprecated_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/deprecated_calls.sol",
"filename_short": "tests/deprecated_calls.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": null
}
}
}
}
]

@ -14,5 +14,4 @@ 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

@ -6,23 +6,26 @@
"check": "erc20-indexed",
"impact": "Informational",
"confidence": "High",
"description": "IERC20Bad (tests/erc20_indexed.sol#12-21) does not mark important ERC20 parameters as 'indexed':\n\t-Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n\t-Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n\t-Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n\t-Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n",
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n",
"elements": [
{
"type": "function",
"name": "Approval",
"type": "event",
"name": "Transfer",
"source_mapping": {
"start": 1148,
"length": 59,
"start": 1090,
"length": 53,
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_relative": "tests/erc20_indexed.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_short": "tests/erc20_indexed.sol",
"lines": [
20
19
],
"starting_column": 5,
"ending_column": 64
"ending_column": 58
},
"additional_fields": {
"parameter_name": "from"
},
"contract": {
"type": "contract",
@ -50,22 +53,33 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-indexed",
"impact": "Informational",
"confidence": "High",
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n",
"elements": [
{
"type": "function",
"name": "Approval",
"type": "event",
"name": "Transfer",
"source_mapping": {
"start": 1148,
"length": 59,
"start": 1090,
"length": 53,
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_relative": "tests/erc20_indexed.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_short": "tests/erc20_indexed.sol",
"lines": [
20
19
],
"starting_column": 5,
"ending_column": 64
"ending_column": 58
},
"additional_fields": {
"parameter_name": "to"
},
"contract": {
"type": "contract",
@ -93,22 +107,33 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-indexed",
"impact": "Informational",
"confidence": "High",
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n",
"elements": [
{
"type": "function",
"name": "Transfer",
"type": "event",
"name": "Approval",
"source_mapping": {
"start": 1090,
"length": 53,
"start": 1148,
"length": 59,
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_relative": "tests/erc20_indexed.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_short": "tests/erc20_indexed.sol",
"lines": [
19
20
],
"starting_column": 5,
"ending_column": 58
"ending_column": 64
},
"additional_fields": {
"parameter_name": "owner"
},
"contract": {
"type": "contract",
@ -136,22 +161,33 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-indexed",
"impact": "Informational",
"confidence": "High",
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n",
"elements": [
{
"type": "function",
"name": "Transfer",
"type": "event",
"name": "Approval",
"source_mapping": {
"start": 1090,
"length": 53,
"start": 1148,
"length": 59,
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_relative": "tests/erc20_indexed.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol",
"filename_short": "tests/erc20_indexed.sol",
"lines": [
19
20
],
"starting_column": 5,
"ending_column": 58
"ending_column": 64
},
"additional_fields": {
"parameter_name": "spender"
},
"contract": {
"type": "contract",

@ -1,9 +1,7 @@
INFO:Detectors:
IERC20Bad (tests/erc20_indexed.sol#12-21) does not mark important ERC20 parameters as 'indexed':
-Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'
-Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'
-Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'
-Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'
ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'
ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'
ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'
ERC20 event IERC20Bad.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
INFO:Slither:tests/erc20_indexed.sol analyzed (3 contracts), 4 result(s) found

@ -4,5 +4,4 @@ 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,2 +1 @@
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

@ -1,54 +1,10 @@
INFO:Detectors:
ERC20TestBalance.bad0 (tests/incorrect_equality.sol#21-23) uses a dangerous strict equality:
- require(bool)(erc.balanceOf(address(this)) == 10)
ERC20TestBalance.bad0 (tests/incorrect_equality.sol#21-23) uses a dangerous strict equality:
- require(bool)(erc.balanceOf(address(this)) == 10)
ERC20TestBalance.bad1 (tests/incorrect_equality.sol#25-27) uses a dangerous strict equality:
- require(bool)(erc.balanceOf(msg.sender) == 10)
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad2 (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:
- require(bool)(address(this).balance == 10000000000000000000)
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad2 (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:
- require(bool)(address(this).balance == 10000000000000000000)
TestContractBalance.bad3 (tests/incorrect_equality.sol#47-50) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(this).balance)
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad2 (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:
- require(bool)(address(this).balance == 10000000000000000000)
TestContractBalance.bad3 (tests/incorrect_equality.sol#47-50) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(this).balance)
TestContractBalance.bad4 (tests/incorrect_equality.sol#52-57) uses a dangerous strict equality:
- balance == 10000000000000000000
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad2 (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:
- require(bool)(address(this).balance == 10000000000000000000)
TestContractBalance.bad3 (tests/incorrect_equality.sol#47-50) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(this).balance)
TestContractBalance.bad4 (tests/incorrect_equality.sol#52-57) uses a dangerous strict equality:
- balance == 10000000000000000000
TestContractBalance.bad5 (tests/incorrect_equality.sol#59-64) uses a dangerous strict equality:
- 10000000000000000000 == balance
TestContractBalance.bad0 (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:
- require(bool)(address(address(this)).balance == 10000000000000000000)
TestContractBalance.bad1 (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:
- require(bool)(10000000000000000000 == address(address(this)).balance)
TestContractBalance.bad2 (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:
@ -63,16 +19,9 @@ TestContractBalance.bad6 (tests/incorrect_equality.sol#66-71) uses a dangerous s
- balance == 10000000000000000000
TestSolidityKeyword.bad0 (tests/incorrect_equality.sol#123-125) uses a dangerous strict equality:
- require(bool)(now == 0)
TestSolidityKeyword.bad0 (tests/incorrect_equality.sol#123-125) uses a dangerous strict equality:
- require(bool)(now == 0)
TestSolidityKeyword.bad1 (tests/incorrect_equality.sol#127-129) uses a dangerous strict equality:
- require(bool)(block.number == 0)
TestSolidityKeyword.bad0 (tests/incorrect_equality.sol#123-125) uses a dangerous strict equality:
- require(bool)(now == 0)
TestSolidityKeyword.bad1 (tests/incorrect_equality.sol#127-129) uses a dangerous strict equality:
- require(bool)(block.number == 0)
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

@ -6,23 +6,23 @@
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface(s):\n\t-transfer (tests/incorrect_erc20_interface.sol#4)\n\t-approve (tests/incorrect_erc20_interface.sol#5)\n\t-transferFrom (tests/incorrect_erc20_interface.sol#6)\n\t-totalSupply (tests/incorrect_erc20_interface.sol#7)\n\t-balanceOf (tests/incorrect_erc20_interface.sol#8)\n\t-allowance (tests/incorrect_erc20_interface.sol#9)\n",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: transfer (tests/incorrect_erc20_interface.sol#4)\n",
"elements": [
{
"type": "function",
"name": "allowance",
"name": "transfer",
"source_mapping": {
"start": 319,
"length": 60,
"start": 46,
"length": 51,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_relative": "tests/incorrect_erc20_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_short": "tests/incorrect_erc20_interface.sol",
"lines": [
9
4
],
"starting_column": 5,
"ending_column": 65
"ending_column": 56
},
"contract": {
"type": "contract",
@ -48,7 +48,15 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: approve (tests/incorrect_erc20_interface.sol#5)\n",
"elements": [
{
"type": "function",
"name": "approve",
@ -89,22 +97,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: transferFrom (tests/incorrect_erc20_interface.sol#6)\n",
"elements": [
{
"type": "function",
"name": "balanceOf",
"name": "transferFrom",
"source_mapping": {
"start": 273,
"length": 41,
"start": 162,
"length": 69,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_relative": "tests/incorrect_erc20_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_short": "tests/incorrect_erc20_interface.sol",
"lines": [
8
6
],
"starting_column": 5,
"ending_column": 46
"ending_column": 74
},
"contract": {
"type": "contract",
@ -130,7 +146,15 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: totalSupply (tests/incorrect_erc20_interface.sol#7)\n",
"elements": [
{
"type": "function",
"name": "totalSupply",
@ -171,22 +195,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: balanceOf (tests/incorrect_erc20_interface.sol#8)\n",
"elements": [
{
"type": "function",
"name": "transfer",
"name": "balanceOf",
"source_mapping": {
"start": 46,
"length": 51,
"start": 273,
"length": 41,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_relative": "tests/incorrect_erc20_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_short": "tests/incorrect_erc20_interface.sol",
"lines": [
4
8
],
"starting_column": 5,
"ending_column": 56
"ending_column": 46
},
"contract": {
"type": "contract",
@ -212,22 +244,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc20-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: allowance (tests/incorrect_erc20_interface.sol#9)\n",
"elements": [
{
"type": "function",
"name": "transferFrom",
"name": "allowance",
"source_mapping": {
"start": 162,
"length": 69,
"start": 319,
"length": 60,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_relative": "tests/incorrect_erc20_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol",
"filename_short": "tests/incorrect_erc20_interface.sol",
"lines": [
6
9
],
"starting_column": 5,
"ending_column": 74
"ending_column": 65
},
"contract": {
"type": "contract",

@ -1,11 +1,9 @@
INFO:Detectors:
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface(s):
-transfer (tests/incorrect_erc20_interface.sol#4)
-approve (tests/incorrect_erc20_interface.sol#5)
-transferFrom (tests/incorrect_erc20_interface.sol#6)
-totalSupply (tests/incorrect_erc20_interface.sol#7)
-balanceOf (tests/incorrect_erc20_interface.sol#8)
-allowance (tests/incorrect_erc20_interface.sol#9)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: transfer (tests/incorrect_erc20_interface.sol#4)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: approve (tests/incorrect_erc20_interface.sol#5)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: transferFrom (tests/incorrect_erc20_interface.sol#6)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: totalSupply (tests/incorrect_erc20_interface.sol#7)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: balanceOf (tests/incorrect_erc20_interface.sol#8)
Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface: 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
INFO:Slither:tests/incorrect_erc20_interface.sol analyzed (1 contracts), 6 result(s) found

@ -6,52 +6,52 @@
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface(s):\n\t-supportsInterface (tests/incorrect_erc721_interface.sol#4)\n\t-balanceOf (tests/incorrect_erc721_interface.sol#7)\n\t-ownerOf (tests/incorrect_erc721_interface.sol#8)\n\t-safeTransferFrom (tests/incorrect_erc721_interface.sol#9)\n\t-safeTransferFrom (tests/incorrect_erc721_interface.sol#10)\n\t-transferFrom (tests/incorrect_erc721_interface.sol#11)\n\t-approve (tests/incorrect_erc721_interface.sol#12)\n\t-setApprovalForAll (tests/incorrect_erc721_interface.sol#13)\n\t-getApproved (tests/incorrect_erc721_interface.sol#14)\n\t-isApprovedForAll (tests/incorrect_erc721_interface.sol#15)\n",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: supportsInterface (tests/incorrect_erc721_interface.sol#4)\n",
"elements": [
{
"type": "function",
"name": "approve",
"name": "supportsInterface",
"source_mapping": {
"start": 549,
"length": 78,
"start": 50,
"length": 56,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
12
4
],
"starting_column": 5,
"ending_column": 83
"ending_column": 61
},
"contract": {
"type": "contract",
"name": "Token",
"name": "IERC165",
"source_mapping": {
"start": 109,
"length": 739,
"start": 26,
"length": 82,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16
3,
4,
5
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: balanceOf (tests/incorrect_erc721_interface.sol#7)\n",
"elements": [
{
"type": "function",
"name": "balanceOf",
@ -95,22 +95,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: ownerOf (tests/incorrect_erc721_interface.sol#8)\n",
"elements": [
{
"type": "function",
"name": "getApproved",
"name": "ownerOf",
"source_mapping": {
"start": 723,
"length": 48,
"start": 189,
"length": 44,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
14
8
],
"starting_column": 5,
"ending_column": 53
"ending_column": 49
},
"contract": {
"type": "contract",
@ -139,22 +147,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: safeTransferFrom (tests/incorrect_erc721_interface.sol#9)\n",
"elements": [
{
"type": "function",
"name": "isApprovedForAll",
"name": "safeTransferFrom",
"source_mapping": {
"start": 776,
"length": 70,
"start": 238,
"length": 108,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
15
9
],
"starting_column": 5,
"ending_column": 75
"ending_column": 113
},
"contract": {
"type": "contract",
@ -183,22 +199,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: safeTransferFrom (tests/incorrect_erc721_interface.sol#10)\n",
"elements": [
{
"type": "function",
"name": "ownerOf",
"name": "safeTransferFrom",
"source_mapping": {
"start": 189,
"length": 44,
"start": 351,
"length": 96,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
8
10
],
"starting_column": 5,
"ending_column": 49
"ending_column": 101
},
"contract": {
"type": "contract",
@ -227,22 +251,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: transferFrom (tests/incorrect_erc721_interface.sol#11)\n",
"elements": [
{
"type": "function",
"name": "safeTransferFrom",
"name": "transferFrom",
"source_mapping": {
"start": 238,
"length": 108,
"start": 452,
"length": 92,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
9
11
],
"starting_column": 5,
"ending_column": 113
"ending_column": 97
},
"contract": {
"type": "contract",
@ -271,22 +303,30 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: approve (tests/incorrect_erc721_interface.sol#12)\n",
"elements": [
{
"type": "function",
"name": "safeTransferFrom",
"name": "approve",
"source_mapping": {
"start": 351,
"length": 96,
"start": 549,
"length": 78,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
10
12
],
"starting_column": 5,
"ending_column": 101
"ending_column": 83
},
"contract": {
"type": "contract",
@ -315,7 +355,15 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: setApprovalForAll (tests/incorrect_erc721_interface.sol#13)\n",
"elements": [
{
"type": "function",
"name": "setApprovalForAll",
@ -359,58 +407,82 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: getApproved (tests/incorrect_erc721_interface.sol#14)\n",
"elements": [
{
"type": "function",
"name": "supportsInterface",
"name": "getApproved",
"source_mapping": {
"start": 50,
"length": 56,
"start": 723,
"length": 48,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
4
14
],
"starting_column": 5,
"ending_column": 61
"ending_column": 53
},
"contract": {
"type": "contract",
"name": "IERC165",
"name": "Token",
"source_mapping": {
"start": 26,
"length": 82,
"start": 109,
"length": 739,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
3,
4,
5
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
},
}
]
},
{
"check": "erc721-interface",
"impact": "Medium",
"confidence": "High",
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: isApprovedForAll (tests/incorrect_erc721_interface.sol#15)\n",
"elements": [
{
"type": "function",
"name": "transferFrom",
"name": "isApprovedForAll",
"source_mapping": {
"start": 452,
"length": 92,
"start": 776,
"length": 70,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_relative": "tests/incorrect_erc721_interface.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol",
"filename_short": "tests/incorrect_erc721_interface.sol",
"lines": [
11
15
],
"starting_column": 5,
"ending_column": 97
"ending_column": 75
},
"contract": {
"type": "contract",

@ -1,15 +1,13 @@
INFO:Detectors:
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface(s):
-supportsInterface (tests/incorrect_erc721_interface.sol#4)
-balanceOf (tests/incorrect_erc721_interface.sol#7)
-ownerOf (tests/incorrect_erc721_interface.sol#8)
-safeTransferFrom (tests/incorrect_erc721_interface.sol#9)
-safeTransferFrom (tests/incorrect_erc721_interface.sol#10)
-transferFrom (tests/incorrect_erc721_interface.sol#11)
-approve (tests/incorrect_erc721_interface.sol#12)
-setApprovalForAll (tests/incorrect_erc721_interface.sol#13)
-getApproved (tests/incorrect_erc721_interface.sol#14)
-isApprovedForAll (tests/incorrect_erc721_interface.sol#15)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: supportsInterface (tests/incorrect_erc721_interface.sol#4)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: balanceOf (tests/incorrect_erc721_interface.sol#7)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: ownerOf (tests/incorrect_erc721_interface.sol#8)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: safeTransferFrom (tests/incorrect_erc721_interface.sol#9)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: safeTransferFrom (tests/incorrect_erc721_interface.sol#10)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: transferFrom (tests/incorrect_erc721_interface.sol#11)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: approve (tests/incorrect_erc721_interface.sol#12)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: setApprovalForAll (tests/incorrect_erc721_interface.sol#13)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: getApproved (tests/incorrect_erc721_interface.sol#14)
Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface: 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
INFO:Slither:tests/incorrect_erc721_interface.sol analyzed (2 contracts), 10 result(s) found

@ -73,8 +73,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 198,
"length": 628,
@ -100,6 +100,70 @@
],
"starting_column": 9,
"ending_column": 6
},
"function": {
"type": "function",
"name": "at",
"source_mapping": {
"start": 119,
"length": 707,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol",
"filename_relative": "tests/inline_assembly_contract-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol",
"filename_short": "tests/inline_assembly_contract-0.5.1.sol",
"lines": [
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "GetCode",
"source_mapping": {
"start": 97,
"length": 731,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol",
"filename_relative": "tests/inline_assembly_contract-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol",
"filename_short": "tests/inline_assembly_contract-0.5.1.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

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

@ -73,8 +73,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 191,
"length": 628,
@ -100,6 +100,70 @@
],
"starting_column": 9,
"ending_column": 6
},
"function": {
"type": "function",
"name": "at",
"source_mapping": {
"start": 119,
"length": 700,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol",
"filename_relative": "tests/inline_assembly_contract.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol",
"filename_short": "tests/inline_assembly_contract.sol",
"lines": [
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "GetCode",
"source_mapping": {
"start": 97,
"length": 724,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol",
"filename_relative": "tests/inline_assembly_contract.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol",
"filename_short": "tests/inline_assembly_contract.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

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

@ -92,8 +92,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 733,
"length": 114,
@ -109,6 +109,89 @@
],
"starting_column": 13,
"ending_column": 10
},
"function": {
"type": "function",
"name": "sumAsm",
"source_mapping": {
"start": 599,
"length": 254,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_relative": "tests/inline_assembly_library-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_short": "tests/inline_assembly_library-0.5.1.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "VectorSum",
"source_mapping": {
"start": 97,
"length": 1602,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_relative": "tests/inline_assembly_library-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_short": "tests/inline_assembly_library-0.5.1.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -219,8 +302,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 1020,
"length": 677,
@ -254,6 +337,105 @@
],
"starting_column": 9,
"ending_column": 6
},
"function": {
"type": "function",
"name": "sumPureAsm",
"source_mapping": {
"start": 936,
"length": 761,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_relative": "tests/inline_assembly_library-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_short": "tests/inline_assembly_library-0.5.1.sol",
"lines": [
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "VectorSum",
"source_mapping": {
"start": 97,
"length": 1602,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_relative": "tests/inline_assembly_library-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol",
"filename_short": "tests/inline_assembly_library-0.5.1.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -4,5 +4,4 @@ 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

@ -92,8 +92,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 720,
"length": 114,
@ -109,6 +109,89 @@
],
"starting_column": 13,
"ending_column": 10
},
"function": {
"type": "function",
"name": "sumAsm",
"source_mapping": {
"start": 593,
"length": 247,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_relative": "tests/inline_assembly_library.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_short": "tests/inline_assembly_library.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "VectorSum",
"source_mapping": {
"start": 98,
"length": 1581,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_relative": "tests/inline_assembly_library.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_short": "tests/inline_assembly_library.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -219,8 +302,8 @@
}
},
{
"type": "expression",
"expression": "None",
"type": "node",
"name": "",
"source_mapping": {
"start": 1000,
"length": 677,
@ -254,6 +337,105 @@
],
"starting_column": 9,
"ending_column": 6
},
"function": {
"type": "function",
"name": "sumPureAsm",
"source_mapping": {
"start": 923,
"length": 754,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_relative": "tests/inline_assembly_library.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_short": "tests/inline_assembly_library.sol",
"lines": [
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "VectorSum",
"source_mapping": {
"start": 98,
"length": 1581,
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_relative": "tests/inline_assembly_library.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol",
"filename_short": "tests/inline_assembly_library.sol",
"lines": [
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -4,5 +4,4 @@ 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

@ -8,6 +8,23 @@
"confidence": "High",
"description": "Contract locking ether found in :\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether-0.5.1.sol#4-6)\n\tBut does not have a function to withdraw the ether\n",
"elements": [
{
"type": "contract",
"name": "OnlyLocked",
"source_mapping": {
"start": 375,
"length": 32,
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol",
"filename_relative": "tests/locked_ether-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol",
"filename_short": "tests/locked_ether-0.5.1.sol",
"lines": [
26
],
"starting_column": 1,
"ending_column": 33
}
},
{
"type": "function",
"name": "receive",
@ -49,23 +66,6 @@
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "OnlyLocked",
"source_mapping": {
"start": 375,
"length": 32,
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol",
"filename_relative": "tests/locked_ether-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol",
"filename_short": "tests/locked_ether-0.5.1.sol",
"lines": [
26
],
"starting_column": 1,
"ending_column": 33
}
}
]
}

@ -4,5 +4,4 @@ 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

@ -8,6 +8,23 @@
"confidence": "High",
"description": "Contract locking ether found in :\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether.sol#4-6)\n\tBut does not have a function to withdraw the ether\n",
"elements": [
{
"type": "contract",
"name": "OnlyLocked",
"source_mapping": {
"start": 368,
"length": 32,
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether.sol",
"filename_relative": "tests/locked_ether.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether.sol",
"filename_short": "tests/locked_ether.sol",
"lines": [
26
],
"starting_column": 1,
"ending_column": 33
}
},
{
"type": "function",
"name": "receive",
@ -49,23 +66,6 @@
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "OnlyLocked",
"source_mapping": {
"start": 368,
"length": 32,
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether.sol",
"filename_relative": "tests/locked_ether.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether.sol",
"filename_short": "tests/locked_ether.sol",
"lines": [
26
],
"starting_column": 1,
"ending_column": 33
}
}
]
}

@ -4,5 +4,4 @@ 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

@ -49,8 +49,8 @@
}
},
{
"type": "expression",
"expression": "_receiver.call.value(msg.value).gas(7777)()",
"type": "node",
"name": "_receiver.call.value(msg.value).gas(7777)()",
"source_mapping": {
"start": 111,
"length": 45,
@ -63,6 +63,46 @@
],
"starting_column": 9,
"ending_column": 54
},
"function": {
"type": "function",
"name": "send",
"source_mapping": {
"start": 51,
"length": 112,
"filename_used": "/home/travis/build/crytic/slither/tests/low_level_calls.sol",
"filename_relative": "tests/low_level_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/low_level_calls.sol",
"filename_short": "tests/low_level_calls.sol",
"lines": [
5,
6,
7
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Sender",
"source_mapping": {
"start": 29,
"length": 136,
"filename_used": "/home/travis/build/crytic/slither/tests/low_level_calls.sol",
"filename_relative": "tests/low_level_calls.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/low_level_calls.sol",
"filename_short": "tests/low_level_calls.sol",
"lines": [
4,
5,
6,
7,
8
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

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

@ -6,76 +6,76 @@
"check": "calls-loop",
"impact": "Low",
"confidence": "Medium",
"description": "CallInLoop.bad has external calls inside a loop:\n\t- destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11)\n",
"description": "CallInLoop.bad has external calls inside a loop: \"destinations[i].transfer(i)\" (tests/multiple_calls_in_loop.sol#11)\n",
"elements": [
{
"type": "function",
"name": "bad",
"type": "node",
"name": "destinations[i].transfer(i)",
"source_mapping": {
"start": 153,
"length": 135,
"start": 244,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_relative": "tests/multiple_calls_in_loop.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_short": "tests/multiple_calls_in_loop.sol",
"lines": [
9,
10,
11,
12,
13
11
],
"starting_column": 5,
"ending_column": 6
"starting_column": 13,
"ending_column": 40
},
"contract": {
"type": "contract",
"name": "CallInLoop",
"function": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 0,
"length": 291,
"start": 153,
"length": 135,
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_relative": "tests/multiple_calls_in_loop.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_short": "tests/multiple_calls_in_loop.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
13
],
"starting_column": 1,
"ending_column": 2
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "CallInLoop",
"source_mapping": {
"start": 0,
"length": 291,
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_relative": "tests/multiple_calls_in_loop.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_short": "tests/multiple_calls_in_loop.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "destinations[i].transfer(i)",
"source_mapping": {
"start": 244,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_relative": "tests/multiple_calls_in_loop.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol",
"filename_short": "tests/multiple_calls_in_loop.sol",
"lines": [
11
],
"starting_column": 13,
"ending_column": 40
}
}
]
}

@ -1,6 +1,4 @@
INFO:Detectors:
CallInLoop.bad has external calls inside a loop:
- destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11)
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

@ -9,8 +9,7 @@
"description": "Contract 'naming' (tests/naming_convention.sol#3-48) is not in CapWords\n",
"elements": [
{
"target": "contract",
"convention": "CapWords",
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
@ -69,6 +68,10 @@
],
"starting_column": 1,
"ending_column": 2
},
"additional_fields": {
"target": "contract",
"convention": "CapWords"
}
}
]
@ -80,8 +83,7 @@
"description": "Struct 'naming.test' (tests/naming_convention.sol#14-16) is not in CapWords\n",
"elements": [
{
"target": "structure",
"convention": "CapWords",
"type": "struct",
"name": "test",
"source_mapping": {
"start": 229,
@ -97,6 +99,72 @@
],
"starting_column": 5,
"ending_column": 6
},
"additional_fields": {
"target": "structure",
"convention": "CapWords"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -108,8 +176,7 @@
"description": "Event 'naming.event_' (tests/naming_convention.sol#23) is not in CapWords\n",
"elements": [
{
"target": "event",
"convention": "CapWords",
"type": "event",
"name": "event_",
"source_mapping": {
"start": 335,
@ -123,6 +190,72 @@
],
"starting_column": 5,
"ending_column": 24
},
"additional_fields": {
"target": "event",
"convention": "CapWords"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -134,8 +267,7 @@
"description": "Function 'naming.GetOne' (tests/naming_convention.sol#30-33) is not in mixedCase\n",
"elements": [
{
"target": "function",
"convention": "mixedCase",
"type": "function",
"name": "GetOne",
"source_mapping": {
"start": 440,
@ -152,6 +284,72 @@
],
"starting_column": 5,
"ending_column": 6
},
"additional_fields": {
"target": "function",
"convention": "mixedCase"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -163,8 +361,7 @@
"description": "Parameter 'Number2' of naming.setInt (tests/naming_convention.sol#35) is not in mixedCase\n",
"elements": [
{
"target": "parameter",
"convention": "mixedCase",
"type": "variable",
"name": "Number2",
"source_mapping": {
"start": 551,
@ -178,6 +375,92 @@
],
"starting_column": 35,
"ending_column": 47
},
"additional_fields": {
"target": "parameter",
"convention": "mixedCase"
},
"function": {
"type": "function",
"name": "setInt",
"source_mapping": {
"start": 521,
"length": 63,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
35,
36,
37,
38
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -189,8 +472,7 @@
"description": "Constant 'naming.MY_other_CONSTANT' (tests/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n",
"elements": [
{
"target": "variable_constant",
"convention": "UPPER_CASE_WITH_UNDERSCORES",
"type": "variable",
"name": "MY_other_CONSTANT",
"source_mapping": {
"start": 143,
@ -204,6 +486,72 @@
],
"starting_column": 5,
"ending_column": 40
},
"additional_fields": {
"target": "variable_constant",
"convention": "UPPER_CASE_WITH_UNDERSCORES"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -215,8 +563,7 @@
"description": "Variable 'naming.Var_One' (tests/naming_convention.sol#11) is not in mixedCase\n",
"elements": [
{
"target": "variable",
"convention": "mixedCase",
"type": "variable",
"name": "Var_One",
"source_mapping": {
"start": 185,
@ -230,6 +577,72 @@
],
"starting_column": 5,
"ending_column": 21
},
"additional_fields": {
"target": "variable",
"convention": "mixedCase"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -241,8 +654,7 @@
"description": "Enum 'naming.numbers' (tests/naming_convention.sol#6) is not in CapWords\n",
"elements": [
{
"target": "enum",
"convention": "CapWords",
"type": "enum",
"name": "numbers",
"source_mapping": {
"start": 79,
@ -256,6 +668,72 @@
],
"starting_column": 5,
"ending_column": 28
},
"additional_fields": {
"target": "enum",
"convention": "CapWords"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -267,8 +745,7 @@
"description": "Modifier 'naming.CantDo' (tests/naming_convention.sol#41-43) is not in mixedCase\n",
"elements": [
{
"target": "modifier",
"convention": "mixedCase",
"type": "function",
"name": "CantDo",
"source_mapping": {
"start": 591,
@ -284,6 +761,72 @@
],
"starting_column": 5,
"ending_column": 6
},
"additional_fields": {
"target": "modifier",
"convention": "mixedCase"
},
"contract": {
"type": "contract",
"name": "naming",
"source_mapping": {
"start": 28,
"length": 642,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -295,8 +838,7 @@
"description": "Parameter '_used' of T.test (tests/naming_convention.sol#59) is not in mixedCase\n",
"elements": [
{
"target": "parameter",
"convention": "mixedCase",
"type": "variable",
"name": "_used",
"source_mapping": {
"start": 794,
@ -310,6 +852,59 @@
],
"starting_column": 33,
"ending_column": 43
},
"additional_fields": {
"target": "parameter",
"convention": "mixedCase"
},
"function": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 766,
"length": 84,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
59,
60
],
"starting_column": 5,
"ending_column": 23
},
"contract": {
"type": "contract",
"name": "T",
"source_mapping": {
"start": 692,
"length": 221,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -321,8 +916,7 @@
"description": "Variable 'T._myPublicVar' (tests/naming_convention.sol#56) is not in mixedCase\n",
"elements": [
{
"target": "variable",
"convention": "mixedCase",
"type": "variable",
"name": "_myPublicVar",
"source_mapping": {
"start": 741,
@ -336,6 +930,41 @@
],
"starting_column": 5,
"ending_column": 22
},
"additional_fields": {
"target": "variable",
"convention": "mixedCase"
},
"contract": {
"type": "contract",
"name": "T",
"source_mapping": {
"start": 692,
"length": 221,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -347,8 +976,7 @@
"description": "Variable 'T.l' (tests/naming_convention.sol#67) used l, O, I, which should not be used\n",
"elements": [
{
"target": "variable",
"convention": "l_O_I_should_not_be_used",
"type": "variable",
"name": "l",
"source_mapping": {
"start": 900,
@ -362,6 +990,41 @@
],
"starting_column": 5,
"ending_column": 15
},
"additional_fields": {
"target": "variable",
"convention": "l_O_I_should_not_be_used"
},
"contract": {
"type": "contract",
"name": "T",
"source_mapping": {
"start": 692,
"length": 221,
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_relative": "tests/naming_convention.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol",
"filename_short": "tests/naming_convention.sol",
"lines": [
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

@ -12,5 +12,4 @@ 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

@ -6,11 +6,11 @@
"check": "solc-version",
"impact": "Informational",
"confidence": "High",
"description": "Detected issues with version pragma in tests/old_solc.sol.json:\n\t- pragma solidity0.4.21 (None): it allows old versions\n",
"description": "Pragma version \"0.4.21\" allows old versions (None)\n",
"elements": [
{
"type": "expression",
"expression": "0.4.21",
"type": "pragma",
"name": "0.4.21",
"source_mapping": {
"start": 0,
"length": 23,
@ -21,6 +21,13 @@
"lines": [],
"starting_column": null,
"ending_column": null
},
"additional_fields": {
"directive": [
"solidity",
"0.4",
".21"
]
}
}
]

@ -1,6 +1,5 @@
INFO:Detectors:
Detected issues with version pragma in tests/old_solc.sol.json:
- pragma solidity0.4.21 (None): it allows old versions
Pragma version "0.4.21" allows old versions (None)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-version-of-solidity
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

@ -9,8 +9,8 @@
"description": "Different versions of Solidity is used in :\n\t- Version used: ['^0.4.23', '^0.4.24']\n\t- tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23\n\t- tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24\n",
"elements": [
{
"type": "expression",
"expression": "^0.4.23",
"type": "pragma",
"name": "^0.4.23",
"source_mapping": {
"start": 0,
"length": 24,
@ -23,11 +23,19 @@
],
"starting_column": 1,
"ending_column": 25
},
"additional_fields": {
"directive": [
"solidity",
"^",
"0.4",
".24"
]
}
},
{
"type": "expression",
"expression": "^0.4.24",
"type": "pragma",
"name": "^0.4.24",
"source_mapping": {
"start": 0,
"length": 24,
@ -40,6 +48,14 @@
],
"starting_column": 1,
"ending_column": 25
},
"additional_fields": {
"directive": [
"solidity",
"^",
"0.4",
".24"
]
}
}
]

@ -4,5 +4,4 @@ Different versions of Solidity is used in :
- tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23
- tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used
INFO:Slither:/home/travis/build/crytic/slither/scripts/../tests/expected_json/pragma.0.4.24.pragma.json exists already, the overwrite is prevented
INFO:Slither:tests/pragma.0.4.24.sol analyzed (1 contracts), 1 result(s) found

@ -102,8 +102,8 @@
}
},
{
"type": "external_calls",
"expression": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()",
"type": "node",
"name": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()",
"source_mapping": {
"start": 477,
"length": 81,
@ -116,12 +116,107 @@
],
"starting_column": 9,
"ending_column": 90
},
"additional_fields": {
"underlying_type": "external_calls"
},
"function": {
"type": "function",
"name": "withdrawBalance",
"source_mapping": {
"start": 298,
"length": 357,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 25,
"length": 1807,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "variables_written",
"name": "userBalance",
"expression": "userBalance[msg.sender] = 0",
"type": "node",
"name": "userBalance[msg.sender] = 0",
"source_mapping": {
"start": 621,
"length": 27,
@ -134,6 +229,103 @@
],
"starting_column": 9,
"ending_column": 36
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "userBalance"
},
"function": {
"type": "function",
"name": "withdrawBalance",
"source_mapping": {
"start": 298,
"length": 357,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 25,
"length": 1807,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -239,8 +431,8 @@
}
},
{
"type": "external_calls",
"expression": "(ret,mem) = msg.sender.call.value(amount)()",
"type": "node",
"name": "(ret,mem) = msg.sender.call.value(amount)()",
"source_mapping": {
"start": 1679,
"length": 64,
@ -253,12 +445,108 @@
],
"starting_column": 9,
"ending_column": 73
},
"additional_fields": {
"underlying_type": "external_calls"
},
"function": {
"type": "function",
"name": "withdrawBalance_fixed_3",
"source_mapping": {
"start": 1434,
"length": 393,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
44,
45,
46,
47,
48,
49,
50,
51,
52,
53
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 25,
"length": 1807,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "variables_written",
"name": "userBalance",
"expression": "userBalance[msg.sender] = amount",
"type": "node",
"name": "userBalance[msg.sender] = amount",
"source_mapping": {
"start": 1778,
"length": 32,
@ -271,6 +559,104 @@
],
"starting_column": 13,
"ending_column": 45
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "userBalance"
},
"function": {
"type": "function",
"name": "withdrawBalance_fixed_3",
"source_mapping": {
"start": 1434,
"length": 393,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
44,
45,
46,
47,
48,
49,
50,
51,
52,
53
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 25,
"length": 1807,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_relative": "tests/reentrancy-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol",
"filename_short": "tests/reentrancy-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -10,5 +10,4 @@ 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

@ -119,8 +119,8 @@
}
},
{
"type": "external_calls",
"expression": "! (msg.sender.call.value(userBalance[msg.sender])())",
"type": "node",
"name": "! (msg.sender.call.value(userBalance[msg.sender])())",
"source_mapping": {
"start": 478,
"length": 92,
@ -135,12 +135,124 @@
],
"starting_column": 9,
"ending_column": 10
},
"additional_fields": {
"underlying_type": "external_calls"
},
"function": {
"type": "function",
"name": "withdrawBalance",
"source_mapping": {
"start": 299,
"length": 314,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 26,
"length": 2334,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "variables_written",
"name": "userBalance",
"expression": "userBalance[msg.sender] = 0",
"type": "node",
"name": "userBalance[msg.sender] = 0",
"source_mapping": {
"start": 579,
"length": 27,
@ -153,6 +265,120 @@
],
"starting_column": 9,
"ending_column": 36
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "userBalance"
},
"function": {
"type": "function",
"name": "withdrawBalance",
"source_mapping": {
"start": 299,
"length": 314,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 26,
"length": 2334,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -273,8 +499,8 @@
}
},
{
"type": "external_calls",
"expression": "msg.sender.call.value(amount / 2)()",
"type": "node",
"name": "msg.sender.call.value(amount / 2)()",
"source_mapping": {
"start": 2263,
"length": 33,
@ -287,12 +513,123 @@
],
"starting_column": 13,
"ending_column": 46
},
"additional_fields": {
"underlying_type": "external_calls"
},
"function": {
"type": "function",
"name": "withdrawBalance_nested",
"source_mapping": {
"start": 2108,
"length": 246,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
64,
65,
66,
67,
68,
69,
70
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 26,
"length": 2334,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "variables_written",
"name": "userBalance",
"expression": "userBalance[msg.sender] = 0",
"type": "node",
"name": "userBalance[msg.sender] = 0",
"source_mapping": {
"start": 2310,
"length": 27,
@ -305,6 +642,119 @@
],
"starting_column": 13,
"ending_column": 40
},
"additional_fields": {
"underlying_type": "variables_written",
"variable_name": "userBalance"
},
"function": {
"type": "function",
"name": "withdrawBalance_nested",
"source_mapping": {
"start": 2108,
"length": 246,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
64,
65,
66,
67,
68,
69,
70
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Reentrancy",
"source_mapping": {
"start": 26,
"length": 2334,
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_relative": "tests/reentrancy.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol",
"filename_short": "tests/reentrancy.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -10,5 +10,4 @@ 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

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

@ -23,6 +23,26 @@
],
"starting_column": 5,
"ending_column": 18
},
"contract": {
"type": "contract",
"name": "DerivedContract",
"source_mapping": {
"start": 46,
"length": 63,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_abstract.sol",
"filename_relative": "tests/shadowing_abstract.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_abstract.sol",
"filename_short": "tests/shadowing_abstract.sol",
"lines": [
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -40,6 +60,26 @@
],
"starting_column": 5,
"ending_column": 18
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 0,
"length": 44,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_abstract.sol",
"filename_relative": "tests/shadowing_abstract.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_abstract.sol",
"filename_short": "tests/shadowing_abstract.sol",
"lines": [
1,
2,
3,
4
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

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

@ -23,6 +23,28 @@
],
"starting_column": 5,
"ending_column": 19
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 26,
"length": 94,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
3,
4,
5,
6,
7,
8
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -48,6 +70,28 @@
],
"starting_column": 5,
"ending_column": 13
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 26,
"length": 94,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
3,
4,
5,
6,
7,
8
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -59,7 +103,7 @@
"description": "BaseContract.revert (event @ tests/shadowing_builtin_symbols.sol#7) shadows built-in symbol \"revert\"\n",
"elements": [
{
"type": "function",
"type": "event",
"name": "revert",
"source_mapping": {
"start": 89,
@ -170,6 +214,48 @@
],
"starting_column": 9,
"ending_column": 17
},
"function": {
"type": "function",
"name": "assert",
"source_mapping": {
"start": 195,
"length": 64,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "ExtendedContract",
"source_mapping": {
"start": 122,
"length": 139,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
10,
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -195,6 +281,29 @@
],
"starting_column": 5,
"ending_column": 23
},
"contract": {
"type": "contract",
"name": "ExtendedContract",
"source_mapping": {
"start": 122,
"length": 139,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
10,
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -278,6 +387,56 @@
],
"starting_column": 9,
"ending_column": 23
},
"function": {
"type": "function",
"name": "require",
"source_mapping": {
"start": 380,
"length": 120,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
23,
24,
25,
26,
27,
28
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 263,
"length": 239,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -303,6 +462,56 @@
],
"starting_column": 9,
"ending_column": 18
},
"function": {
"type": "function",
"name": "require",
"source_mapping": {
"start": 380,
"length": 120,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
23,
24,
25,
26,
27,
28
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 263,
"length": 239,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -328,6 +537,34 @@
],
"starting_column": 5,
"ending_column": 23
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 263,
"length": 239,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -353,6 +590,34 @@
],
"starting_column": 5,
"ending_column": 18
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 263,
"length": 239,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -378,6 +643,34 @@
],
"starting_column": 5,
"ending_column": 13
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 263,
"length": 239,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -403,6 +696,26 @@
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "Reserved",
"source_mapping": {
"start": 504,
"length": 42,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_relative": "tests/shadowing_builtin_symbols.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_builtin_symbols.sol",
"filename_short": "tests/shadowing_builtin_symbols.sol",
"lines": [
31,
32,
33,
34
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

@ -13,5 +13,4 @@ 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

@ -23,6 +23,50 @@
],
"starting_column": 30,
"ending_column": 36
},
"function": {
"type": "function",
"name": "shadowingParent",
"source_mapping": {
"start": 351,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
25
],
"starting_column": 5,
"ending_column": 84
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
@ -40,6 +84,33 @@
],
"starting_column": 5,
"ending_column": 15
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -57,6 +128,29 @@
],
"starting_column": 5,
"ending_column": 15
},
"contract": {
"type": "contract",
"name": "ExtendedContract",
"source_mapping": {
"start": 85,
"length": 110,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
8,
9,
10,
11,
12,
13,
14
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -74,6 +168,26 @@
],
"starting_column": 5,
"ending_column": 15
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 26,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
3,
4,
5,
6
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -99,6 +213,50 @@
],
"starting_column": 52,
"ending_column": 57
},
"function": {
"type": "function",
"name": "shadowingParent",
"source_mapping": {
"start": 351,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
25
],
"starting_column": 5,
"ending_column": 84
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
@ -116,6 +274,26 @@
],
"starting_column": 5,
"ending_column": 15
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 26,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
3,
4,
5,
6
],
"starting_column": 1,
"ending_column": 2
}
}
}
]
@ -141,6 +319,50 @@
],
"starting_column": 59,
"ending_column": 65
},
"function": {
"type": "function",
"name": "shadowingParent",
"source_mapping": {
"start": 351,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
25
],
"starting_column": 5,
"ending_column": 84
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
@ -206,6 +428,50 @@
],
"starting_column": 67,
"ending_column": 73
},
"function": {
"type": "function",
"name": "shadowingParent",
"source_mapping": {
"start": 351,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
25
],
"starting_column": 5,
"ending_column": 84
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
@ -278,10 +544,54 @@
],
"starting_column": 75,
"ending_column": 81
},
"function": {
"type": "function",
"name": "shadowingParent",
"source_mapping": {
"start": 351,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
25
],
"starting_column": 5,
"ending_column": 84
},
"contract": {
"type": "contract",
"name": "FurtherExtendedContract",
"source_mapping": {
"start": 197,
"length": 235,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_relative": "tests/shadowing_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_local_variable.sol",
"filename_short": "tests/shadowing_local_variable.sol",
"lines": [
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"type": "event",
"name": "v",
"source_mapping": {
"start": 183,

@ -12,5 +12,4 @@ 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

@ -23,6 +23,33 @@
],
"starting_column": 5,
"ending_column": 18
},
"contract": {
"type": "contract",
"name": "DerivedContract",
"source_mapping": {
"start": 126,
"length": 210,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_state_variable.sol",
"filename_relative": "tests/shadowing_state_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_state_variable.sol",
"filename_short": "tests/shadowing_state_variable.sol",
"lines": [
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -40,6 +67,31 @@
],
"starting_column": 5,
"ending_column": 18
},
"contract": {
"type": "contract",
"name": "BaseContract",
"source_mapping": {
"start": 0,
"length": 124,
"filename_used": "/home/travis/build/crytic/slither/tests/shadowing_state_variable.sol",
"filename_relative": "tests/shadowing_state_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/shadowing_state_variable.sol",
"filename_short": "tests/shadowing_state_variable.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

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

@ -6,11 +6,11 @@
"check": "solc-version",
"impact": "Informational",
"confidence": "High",
"description": "Detected issues with version pragma in :\n\t- pragma solidity^0.4.23 (tests/solc_version_incorrect.sol#2): it allows old versions\n\t- pragma solidity>=0.4.0<0.6.0 (tests/solc_version_incorrect.sol#3): it allows old versions\n",
"description": "Pragma version \"^0.4.23\" allows old versions (tests/solc_version_incorrect.sol#2)\n",
"elements": [
{
"type": "expression",
"expression": "^0.4.23",
"type": "pragma",
"name": "^0.4.23",
"source_mapping": {
"start": 63,
"length": 24,
@ -23,11 +23,30 @@
],
"starting_column": 1,
"ending_column": 25
},
"additional_fields": {
"directive": [
"solidity",
">=",
"0.4",
".0",
"<",
"0.6",
".0"
]
}
},
}
]
},
{
"check": "solc-version",
"impact": "Informational",
"confidence": "High",
"description": "Pragma version \">=0.4.0<0.6.0\" allows old versions (tests/solc_version_incorrect.sol#3)\n",
"elements": [
{
"type": "expression",
"expression": ">=0.4.0<0.6.0",
"type": "pragma",
"name": ">=0.4.0<0.6.0",
"source_mapping": {
"start": 89,
"length": 31,
@ -40,6 +59,17 @@
],
"starting_column": 1,
"ending_column": 32
},
"additional_fields": {
"directive": [
"solidity",
">=",
"0.4",
".0",
"<",
"0.6",
".0"
]
}
}
]

@ -1,7 +1,5 @@
INFO:Detectors:
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
Pragma version "^0.4.23" allows old versions (tests/solc_version_incorrect.sol#2)
Pragma version ">=0.4.0<0.6.0" allows old versions (tests/solc_version_incorrect.sol#3)
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), 2 result(s) found

@ -64,8 +64,8 @@
}
},
{
"type": "expression",
"expression": "require(bool)(block.timestamp == 0)",
"type": "node",
"name": "require(bool)(block.timestamp == 0)",
"source_mapping": {
"start": 81,
"length": 29,
@ -78,6 +78,61 @@
],
"starting_column": 9,
"ending_column": 38
},
"function": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 47,
"length": 70,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
4,
5,
6
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Timestamp",
"source_mapping": {
"start": 0,
"length": 402,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -145,8 +200,8 @@
}
},
{
"type": "expression",
"expression": "require(bool)(time == 0)",
"type": "node",
"name": "require(bool)(time == 0)",
"source_mapping": {
"start": 197,
"length": 18,
@ -159,6 +214,62 @@
],
"starting_column": 9,
"ending_column": 27
},
"function": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 126,
"length": 96,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
8,
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Timestamp",
"source_mapping": {
"start": 0,
"length": 402,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -225,8 +336,8 @@
}
},
{
"type": "expression",
"expression": "block.timestamp > 0",
"type": "node",
"name": "block.timestamp > 0",
"source_mapping": {
"start": 279,
"length": 24,
@ -239,6 +350,61 @@
],
"starting_column": 9,
"ending_column": 33
},
"function": {
"type": "function",
"name": "bad2",
"source_mapping": {
"start": 231,
"length": 79,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Timestamp",
"source_mapping": {
"start": 0,
"length": 402,
"filename_used": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_relative": "tests/timestamp.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/timestamp.sol",
"filename_short": "tests/timestamp.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -9,5 +9,4 @@ 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

@ -6,11 +6,11 @@
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001\n\t- x2 = 0x0000000000001\n\t- x3 = 1000000000000000000\n\t- x4 = 100000\n\tUse the proper denomination (ether-unit, time-unit,or the scientific notation\n",
"description": "C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x1 = 0x000001\n",
"elements": [
{
"type": "expression",
"expression": "x1 = 0x000001",
"type": "node",
"name": "x1 = 0x000001",
"source_mapping": {
"start": 206,
"length": 18,
@ -23,11 +23,91 @@
],
"starting_column": 9,
"ending_column": 27
},
"function": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 174,
"length": 195,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
}
]
},
{
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x2 = 0x0000000000001\n",
"elements": [
{
"type": "expression",
"expression": "x2 = 0x0000000000001",
"type": "node",
"name": "x2 = 0x0000000000001",
"source_mapping": {
"start": 234,
"length": 25,
@ -40,11 +120,91 @@
],
"starting_column": 9,
"ending_column": 34
},
"function": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 174,
"length": 195,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
}
]
},
{
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x3 = 1000000000000000000\n",
"elements": [
{
"type": "expression",
"expression": "x3 = 1000000000000000000",
"type": "node",
"name": "x3 = 1000000000000000000",
"source_mapping": {
"start": 269,
"length": 29,
@ -57,11 +217,91 @@
],
"starting_column": 9,
"ending_column": 38
},
"function": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 174,
"length": 195,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
}
]
},
{
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:\n\t- x4 = 100000\n",
"elements": [
{
"type": "expression",
"expression": "x4 = 100000",
"type": "node",
"name": "x4 = 100000",
"source_mapping": {
"start": 308,
"length": 16,
@ -74,6 +314,78 @@
],
"starting_column": 9,
"ending_column": 25
},
"function": {
"type": "function",
"name": "f",
"source_mapping": {
"start": 174,
"length": 195,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -82,11 +394,11 @@
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.h (tests/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000\n\tUse the proper denomination (ether-unit, time-unit,or the scientific notation\n",
"description": "C.h (tests/too_many_digits.sol#20-24) uses literals with too many digits:\n\t- x2 = 100000\n",
"elements": [
{
"type": "expression",
"expression": "x2 = 100000",
"type": "node",
"name": "x2 = 100000",
"source_mapping": {
"start": 509,
"length": 16,
@ -99,6 +411,76 @@
],
"starting_column": 9,
"ending_column": 25
},
"function": {
"type": "function",
"name": "h",
"source_mapping": {
"start": 453,
"length": 113,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
20,
21,
22,
23,
24
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]
@ -107,79 +489,11 @@
"check": "too-many-digits",
"impact": "Informational",
"confidence": "Medium",
"description": "C.i (tests/too_many_digits.sol#29-33) uses literals with too many digits:\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n\tUse the proper denomination (ether-unit, time-unit,or the scientific notation\n",
"description": "C.i (tests/too_many_digits.sol#29-33) uses literals with too many digits:\n\t- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000\n",
"elements": [
{
"type": "expression",
"expression": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"source_mapping": {
"start": 749,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
31
],
"starting_column": 9,
"ending_column": 76
}
},
{
"type": "expression",
"expression": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"source_mapping": {
"start": 749,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
31
],
"starting_column": 9,
"ending_column": 76
}
},
{
"type": "expression",
"expression": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"source_mapping": {
"start": 749,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
31
],
"starting_column": 9,
"ending_column": 76
}
},
{
"type": "expression",
"expression": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"source_mapping": {
"start": 749,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
31
],
"starting_column": 9,
"ending_column": 76
}
},
{
"type": "expression",
"expression": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"type": "node",
"name": "x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000",
"source_mapping": {
"start": 749,
"length": 67,
@ -192,6 +506,76 @@
],
"starting_column": 9,
"ending_column": 76
},
"function": {
"type": "function",
"name": "i",
"source_mapping": {
"start": 650,
"length": 201,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
29,
30,
31,
32,
33
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "C",
"source_mapping": {
"start": 25,
"length": 833,
"filename_used": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_relative": "tests/too_many_digits.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/too_many_digits.sol",
"filename_short": "tests/too_many_digits.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35
],
"starting_column": 1,
"ending_column": 2
}
}
}
}
]

@ -1,20 +1,15 @@
INFO:Detectors:
C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:
- x1 = 0x000001
C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:
- x2 = 0x0000000000001
C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:
- x3 = 1000000000000000000
C.f (tests/too_many_digits.sol#9-15) uses literals with too many digits:
- x4 = 100000
Use the proper denomination (ether-unit, time-unit,or the scientific notation
C.h (tests/too_many_digits.sol#20-24) uses literals with too many digits:
- x2 = 100000
Use the proper denomination (ether-unit, time-unit,or the scientific notation
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
- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000
- x2 = 1000000000000 + 10000000000000 + 100000000000000 + 1000000000000000 + 10000000000000000
- 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
INFO:Slither:tests/too_many_digits.sol analyzed (1 contracts), 6 result(s) found

@ -6,83 +6,83 @@
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium",
"description": "TxOrigin.bug0 uses tx.origin for authorization:\n\t- require(bool)(tx.origin == owner) (tests/tx_origin-0.5.1.sol#10)\n",
"description": "TxOrigin.bug0 uses tx.origin for authorization: \"require(bool)(tx.origin == owner)\" (tests/tx_origin-0.5.1.sol#10)\n",
"elements": [
{
"type": "function",
"name": "bug0",
"type": "node",
"name": "require(bool)(tx.origin == owner)",
"source_mapping": {
"start": 127,
"length": 66,
"start": 159,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
9,
10,
11
10
],
"starting_column": 5,
"ending_column": 6
"starting_column": 9,
"ending_column": 36
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"function": {
"type": "function",
"name": "bug0",
"source_mapping": {
"start": 25,
"length": 442,
"start": 127,
"length": 66,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
11
],
"starting_column": 1,
"ending_column": 2
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "require(bool)(tx.origin == owner)",
"source_mapping": {
"start": 159,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
10
],
"starting_column": 9,
"ending_column": 36
}
}
]
},
@ -90,87 +90,87 @@
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium",
"description": "TxOrigin.bug2 uses tx.origin for authorization:\n\t- tx.origin != owner (tests/tx_origin-0.5.1.sol#14-16)\n",
"description": "TxOrigin.bug2 uses tx.origin for authorization: \"tx.origin != owner\" (tests/tx_origin-0.5.1.sol#14-16)\n",
"elements": [
{
"type": "function",
"name": "bug2",
"type": "node",
"name": "tx.origin != owner",
"source_mapping": {
"start": 199,
"length": 95,
"start": 231,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
13,
14,
15,
16,
17
16
],
"starting_column": 5,
"ending_column": 6
"starting_column": 9,
"ending_column": 10
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"function": {
"type": "function",
"name": "bug2",
"source_mapping": {
"start": 25,
"length": 442,
"start": 199,
"length": 95,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
17
],
"starting_column": 1,
"ending_column": 2
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "tx.origin != owner",
"source_mapping": {
"start": 231,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"lines": [
14,
15,
16
],
"starting_column": 9,
"ending_column": 10
}
}
]
}

@ -1,8 +1,5 @@
INFO:Detectors:
TxOrigin.bug0 uses tx.origin for authorization:
- require(bool)(tx.origin == owner) (tests/tx_origin-0.5.1.sol#10)
TxOrigin.bug2 uses tx.origin for authorization:
- tx.origin != owner (tests/tx_origin-0.5.1.sol#14-16)
TxOrigin.bug0 uses tx.origin for authorization: "require(bool)(tx.origin == owner)" (tests/tx_origin-0.5.1.sol#10)
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

@ -6,83 +6,83 @@
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium",
"description": "TxOrigin.bug0 uses tx.origin for authorization:\n\t- require(bool)(tx.origin == owner) (tests/tx_origin.sol#10)\n",
"description": "TxOrigin.bug0 uses tx.origin for authorization: \"require(bool)(tx.origin == owner)\" (tests/tx_origin.sol#10)\n",
"elements": [
{
"type": "function",
"name": "bug0",
"type": "node",
"name": "require(bool)(tx.origin == owner)",
"source_mapping": {
"start": 116,
"length": 60,
"start": 142,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
9,
10,
11
10
],
"starting_column": 5,
"ending_column": 6
"starting_column": 9,
"ending_column": 36
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"function": {
"type": "function",
"name": "bug0",
"source_mapping": {
"start": 28,
"length": 393,
"start": 116,
"length": 60,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
11
],
"starting_column": 1,
"ending_column": 2
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 28,
"length": 393,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "require(bool)(tx.origin == owner)",
"source_mapping": {
"start": 142,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
10
],
"starting_column": 9,
"ending_column": 36
}
}
]
},
@ -90,87 +90,87 @@
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium",
"description": "TxOrigin.bug2 uses tx.origin for authorization:\n\t- tx.origin != owner (tests/tx_origin.sol#14-16)\n",
"description": "TxOrigin.bug2 uses tx.origin for authorization: \"tx.origin != owner\" (tests/tx_origin.sol#14-16)\n",
"elements": [
{
"type": "function",
"name": "bug2",
"type": "node",
"name": "tx.origin != owner",
"source_mapping": {
"start": 182,
"length": 89,
"start": 208,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
13,
14,
15,
16,
17
16
],
"starting_column": 5,
"ending_column": 6
"starting_column": 9,
"ending_column": 10
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"function": {
"type": "function",
"name": "bug2",
"source_mapping": {
"start": 28,
"length": 393,
"start": 182,
"length": 89,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
17
],
"starting_column": 1,
"ending_column": 2
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 28,
"length": 393,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "tx.origin != owner",
"source_mapping": {
"start": 208,
"length": 57,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_relative": "tests/tx_origin.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin.sol",
"filename_short": "tests/tx_origin.sol",
"lines": [
14,
15,
16
],
"starting_column": 9,
"ending_column": 10
}
}
]
}

@ -1,8 +1,5 @@
INFO:Detectors:
TxOrigin.bug0 uses tx.origin for authorization:
- require(bool)(tx.origin == owner) (tests/tx_origin.sol#10)
TxOrigin.bug2 uses tx.origin for authorization:
- tx.origin != owner (tests/tx_origin.sol#14-16)
TxOrigin.bug0 uses tx.origin for authorization: "require(bool)(tx.origin == owner)" (tests/tx_origin.sol#10)
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

@ -6,8 +6,71 @@
"check": "unchecked-lowlevel",
"impact": "Medium",
"confidence": "Medium",
"description": "MyConc.bad (tests/unchecked_lowlevel-0.5.1.sol#2-4) does not use the value returned by low-level calls:\n\t-dst.call.value(msg.value)() (tests/unchecked_lowlevel-0.5.1.sol#3)\n",
"description": "MyConc.bad (tests/unchecked_lowlevel-0.5.1.sol#2-4) ignores return value by low-level calls \"dst.call.value(msg.value)()\" (tests/unchecked_lowlevel-0.5.1.sol#3)\n",
"elements": [
{
"type": "node",
"name": "dst.call.value(msg.value)()",
"source_mapping": {
"start": 81,
"length": 29,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_relative": "tests/unchecked_lowlevel-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_short": "tests/unchecked_lowlevel-0.5.1.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 38
},
"function": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 21,
"length": 96,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_relative": "tests/unchecked_lowlevel-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_short": "tests/unchecked_lowlevel-0.5.1.sol",
"lines": [
2,
3,
4
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "MyConc",
"source_mapping": {
"start": 0,
"length": 274,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_relative": "tests/unchecked_lowlevel-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_short": "tests/unchecked_lowlevel-0.5.1.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"name": "bad",
@ -53,23 +116,6 @@
"ending_column": 2
}
}
},
{
"type": "expression",
"expression": "dst.call.value(msg.value)()",
"source_mapping": {
"start": 81,
"length": 29,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_relative": "tests/unchecked_lowlevel-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel-0.5.1.sol",
"filename_short": "tests/unchecked_lowlevel-0.5.1.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 38
}
}
]
}

@ -1,5 +1,4 @@
INFO:Detectors:
MyConc.bad (tests/unchecked_lowlevel-0.5.1.sol#2-4) does not use the value returned by low-level calls:
-dst.call.value(msg.value)() (tests/unchecked_lowlevel-0.5.1.sol#3)
MyConc.bad (tests/unchecked_lowlevel-0.5.1.sol#2-4) ignores return value by low-level calls "dst.call.value(msg.value)()" (tests/unchecked_lowlevel-0.5.1.sol#3)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level
INFO:Slither:tests/unchecked_lowlevel-0.5.1.sol analyzed (1 contracts), 1 result(s) found

@ -6,8 +6,70 @@
"check": "unchecked-lowlevel",
"impact": "Medium",
"confidence": "Medium",
"description": "MyConc.bad (tests/unchecked_lowlevel.sol#2-4) does not use the value returned by low-level calls:\n\t-dst.call.value(msg.value)() (tests/unchecked_lowlevel.sol#3)\n",
"description": "MyConc.bad (tests/unchecked_lowlevel.sol#2-4) ignores return value by low-level calls \"dst.call.value(msg.value)()\" (tests/unchecked_lowlevel.sol#3)\n",
"elements": [
{
"type": "node",
"name": "dst.call.value(msg.value)()",
"source_mapping": {
"start": 73,
"length": 29,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_relative": "tests/unchecked_lowlevel.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_short": "tests/unchecked_lowlevel.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 38
},
"function": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 21,
"length": 88,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_relative": "tests/unchecked_lowlevel.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_short": "tests/unchecked_lowlevel.sol",
"lines": [
2,
3,
4
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "MyConc",
"source_mapping": {
"start": 0,
"length": 214,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_relative": "tests/unchecked_lowlevel.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_short": "tests/unchecked_lowlevel.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"name": "bad",
@ -52,23 +114,6 @@
"ending_column": 2
}
}
},
{
"type": "expression",
"expression": "dst.call.value(msg.value)()",
"source_mapping": {
"start": 73,
"length": 29,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_relative": "tests/unchecked_lowlevel.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_lowlevel.sol",
"filename_short": "tests/unchecked_lowlevel.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 38
}
}
]
}

@ -1,5 +1,4 @@
INFO:Detectors:
MyConc.bad (tests/unchecked_lowlevel.sol#2-4) does not use the value returned by low-level calls:
-dst.call.value(msg.value)() (tests/unchecked_lowlevel.sol#3)
MyConc.bad (tests/unchecked_lowlevel.sol#2-4) ignores return value by low-level calls "dst.call.value(msg.value)()" (tests/unchecked_lowlevel.sol#3)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level
INFO:Slither:tests/unchecked_lowlevel.sol analyzed (1 contracts), 1 result(s) found

@ -6,8 +6,78 @@
"check": "unchecked-send",
"impact": "Medium",
"confidence": "Medium",
"description": "MyConc.bad (tests/unchecked_send-0.5.1.sol#2-4) does not use the value returned by send calls:\n\t-dst.send(msg.value) (tests/unchecked_send-0.5.1.sol#3)\n",
"description": "MyConc.bad (tests/unchecked_send-0.5.1.sol#2-4) ignores return value by send calls \"dst.send(msg.value)\" (tests/unchecked_send-0.5.1.sol#3)\n",
"elements": [
{
"type": "node",
"name": "dst.send(msg.value)",
"source_mapping": {
"start": 81,
"length": 19,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_relative": "tests/unchecked_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_short": "tests/unchecked_send-0.5.1.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 28
},
"function": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 21,
"length": 86,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_relative": "tests/unchecked_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_short": "tests/unchecked_send-0.5.1.sol",
"lines": [
2,
3,
4
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "MyConc",
"source_mapping": {
"start": 0,
"length": 419,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_relative": "tests/unchecked_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_short": "tests/unchecked_send-0.5.1.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"name": "bad",
@ -60,23 +130,6 @@
"ending_column": 2
}
}
},
{
"type": "expression",
"expression": "dst.send(msg.value)",
"source_mapping": {
"start": 81,
"length": 19,
"filename_used": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_relative": "tests/unchecked_send-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unchecked_send-0.5.1.sol",
"filename_short": "tests/unchecked_send-0.5.1.sol",
"lines": [
3
],
"starting_column": 9,
"ending_column": 28
}
}
]
}

@ -1,5 +1,4 @@
INFO:Detectors:
MyConc.bad (tests/unchecked_send-0.5.1.sol#2-4) does not use the value returned by send calls:
-dst.send(msg.value) (tests/unchecked_send-0.5.1.sol#3)
MyConc.bad (tests/unchecked_send-0.5.1.sol#2-4) ignores return value by send calls "dst.send(msg.value)" (tests/unchecked_send-0.5.1.sol#3)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send
INFO:Slither:tests/unchecked_send-0.5.1.sol analyzed (1 contracts), 1 result(s) found

@ -23,6 +23,31 @@
],
"starting_column": 5,
"ending_column": 32
},
"contract": {
"type": "contract",
"name": "Uninitialized",
"source_mapping": {
"start": 25,
"length": 148,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_relative": "tests/uninitialized-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_short": "tests/uninitialized-0.5.1.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -92,6 +117,36 @@
],
"starting_column": 5,
"ending_column": 39
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 176,
"length": 349,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_relative": "tests/uninitialized-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_short": "tests/uninitialized-0.5.1.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -167,6 +222,39 @@
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "Test2",
"source_mapping": {
"start": 672,
"length": 373,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_relative": "tests/uninitialized-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_short": "tests/uninitialized-0.5.1.sol",
"lines": [
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -245,6 +333,39 @@
],
"starting_column": 5,
"ending_column": 11
},
"contract": {
"type": "contract",
"name": "Test2",
"source_mapping": {
"start": 672,
"length": 373,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_relative": "tests/uninitialized-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized-0.5.1.sol",
"filename_short": "tests/uninitialized-0.5.1.sol",
"lines": [
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
}
},
{

@ -8,5 +8,4 @@ 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

@ -23,6 +23,31 @@
],
"starting_column": 5,
"ending_column": 24
},
"contract": {
"type": "contract",
"name": "Uninitialized",
"source_mapping": {
"start": 26,
"length": 140,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_relative": "tests/uninitialized.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_short": "tests/uninitialized.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -92,6 +117,36 @@
],
"starting_column": 5,
"ending_column": 39
},
"contract": {
"type": "contract",
"name": "Test",
"source_mapping": {
"start": 169,
"length": 332,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_relative": "tests/uninitialized.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_short": "tests/uninitialized.sol",
"lines": [
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -167,6 +222,39 @@
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "Test2",
"source_mapping": {
"start": 641,
"length": 354,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_relative": "tests/uninitialized.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_short": "tests/uninitialized.sol",
"lines": [
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
@ -245,6 +333,39 @@
],
"starting_column": 5,
"ending_column": 11
},
"contract": {
"type": "contract",
"name": "Test2",
"source_mapping": {
"start": 641,
"length": 354,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_relative": "tests/uninitialized.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized.sol",
"filename_short": "tests/uninitialized.sol",
"lines": [
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58
],
"starting_column": 1,
"ending_column": 2
}
}
},
{

@ -8,5 +8,4 @@ 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

@ -23,6 +23,52 @@
],
"starting_column": 9,
"ending_column": 27
},
"function": {
"type": "function",
"name": "func",
"source_mapping": {
"start": 29,
"length": 143,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized_local_variable.sol",
"filename_relative": "tests/uninitialized_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized_local_variable.sol",
"filename_short": "tests/uninitialized_local_variable.sol",
"lines": [
3,
4,
5,
6,
7
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Uninitialized",
"source_mapping": {
"start": 0,
"length": 179,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized_local_variable.sol",
"filename_relative": "tests/uninitialized_local_variable.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized_local_variable.sol",
"filename_short": "tests/uninitialized_local_variable.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{

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

@ -23,6 +23,58 @@
],
"starting_column": 9,
"ending_column": 18
},
"function": {
"type": "function",
"name": "func",
"source_mapping": {
"start": 67,
"length": 143,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized_storage_pointer.sol",
"filename_relative": "tests/uninitialized_storage_pointer.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized_storage_pointer.sol",
"filename_short": "tests/uninitialized_storage_pointer.sol",
"lines": [
7,
8,
9,
10,
11,
12
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "Uninitialized",
"source_mapping": {
"start": 0,
"length": 217,
"filename_used": "/home/travis/build/crytic/slither/tests/uninitialized_storage_pointer.sol",
"filename_relative": "tests/uninitialized_storage_pointer.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/uninitialized_storage_pointer.sol",
"filename_short": "tests/uninitialized_storage_pointer.sol",
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{

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

@ -6,8 +6,88 @@
"check": "unused-return",
"impact": "Medium",
"confidence": "Medium",
"description": "User.test (tests/unused_return.sol#17-29) does not use the value returned by external calls:\n\t-t.f() (tests/unused_return.sol#18)\n\t-a.add(0) (tests/unused_return.sol#22)\n",
"description": "User.test (tests/unused_return.sol#17-29) ignores return value by external calls \"t.f()\" (tests/unused_return.sol#18)\n",
"elements": [
{
"type": "node",
"name": "t.f()",
"source_mapping": {
"start": 279,
"length": 5,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
18
],
"starting_column": 9,
"ending_column": 14
},
"function": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 239,
"length": 354,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "User",
"source_mapping": {
"start": 189,
"length": 406,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "function",
"name": "test",
@ -70,39 +150,156 @@
"ending_column": 2
}
}
},
}
]
},
{
"check": "unused-return",
"impact": "Medium",
"confidence": "Medium",
"description": "User.test (tests/unused_return.sol#17-29) ignores return value by external calls \"a.add(0)\" (tests/unused_return.sol#22)\n",
"elements": [
{
"type": "expression",
"expression": "t.f()",
"type": "node",
"name": "a.add(0)",
"source_mapping": {
"start": 279,
"length": 5,
"start": 353,
"length": 8,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
18
22
],
"starting_column": 9,
"ending_column": 14
"ending_column": 17
},
"function": {
"type": "function",
"name": "test",
"source_mapping": {
"start": 239,
"length": 354,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "User",
"source_mapping": {
"start": 189,
"length": 406,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "expression",
"expression": "a.add(0)",
"type": "function",
"name": "test",
"source_mapping": {
"start": 353,
"length": 8,
"start": 239,
"length": 354,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
22
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29
],
"starting_column": 9,
"ending_column": 17
"starting_column": 5,
"ending_column": 6
},
"contract": {
"type": "contract",
"name": "User",
"source_mapping": {
"start": 189,
"length": 406,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_relative": "tests/unused_return.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_return.sol",
"filename_short": "tests/unused_return.sol",
"lines": [
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30
],
"starting_column": 1,
"ending_column": 2
}
}
}
]

@ -1,7 +1,5 @@
INFO:Detectors:
User.test (tests/unused_return.sol#17-29) does not use the value returned by external calls:
-t.f() (tests/unused_return.sol#18)
-a.add(0) (tests/unused_return.sol#22)
User.test (tests/unused_return.sol#17-29) ignores return value by external calls "t.f()" (tests/unused_return.sol#18)
User.test (tests/unused_return.sol#17-29) ignores return value by external calls "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
INFO:Slither:tests/unused_return.sol analyzed (3 contracts), 2 result(s) found

@ -23,6 +23,261 @@
],
"starting_column": 5,
"ending_column": 19
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 28,
"length": 114,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "B",
"source_mapping": {
"start": 144,
"length": 78,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
]
},
{
"check": "unused-state",
"impact": "Informational",
"confidence": "High",
"description": "A.unused2 (tests/unused_state.sol#5) is never used in B\n",
"elements": [
{
"type": "variable",
"name": "unused2",
"source_mapping": {
"start": 64,
"length": 15,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
5
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 28,
"length": 114,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "B",
"source_mapping": {
"start": 144,
"length": 78,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
]
},
{
"check": "unused-state",
"impact": "Informational",
"confidence": "High",
"description": "A.unused3 (tests/unused_state.sol#6) is never used in B\n",
"elements": [
{
"type": "variable",
"name": "unused3",
"source_mapping": {
"start": 85,
"length": 15,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
6
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 28,
"length": 114,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "B",
"source_mapping": {
"start": 144,
"length": 78,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
]
},
{
"check": "unused-state",
"impact": "Informational",
"confidence": "High",
"description": "A.unused4 (tests/unused_state.sol#7) is never used in B\n",
"elements": [
{
"type": "variable",
"name": "unused4",
"source_mapping": {
"start": 106,
"length": 15,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
7
],
"starting_column": 5,
"ending_column": 20
},
"contract": {
"type": "contract",
"name": "A",
"source_mapping": {
"start": 28,
"length": 114,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
3,
4,
5,
6,
7,
8,
9
],
"starting_column": 1,
"ending_column": 2
}
}
},
{
"type": "contract",
"name": "B",
"source_mapping": {
"start": 144,
"length": 78,
"filename_used": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_relative": "tests/unused_state.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/unused_state.sol",
"filename_short": "tests/unused_state.sol",
"lines": [
11,
12,
13,
14,
15,
16
],
"starting_column": 1,
"ending_column": 2
}
}
]

@ -1,5 +1,7 @@
INFO:Detectors:
A.unused (tests/unused_state.sol#4) is never used in B
A.unused2 (tests/unused_state.sol#5) is never used in B
A.unused3 (tests/unused_state.sol#6) is never used in B
A.unused4 (tests/unused_state.sol#7) 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
INFO:Slither:tests/unused_state.sol analyzed (2 contracts), 4 result(s) found

Loading…
Cancel
Save