mirror of https://github.com/crytic/slither
Conflicts: slither/core/declarations/structure.py slither/core/variables/state_variable.py slither/detectors/abstract_detector.py slither/detectors/attributes/const_functions.py slither/detectors/erc/incorrect_erc20_interface.py slither/detectors/erc/unindexed_event_parameters.py slither/detectors/naming_convention/naming_convention.py slither/detectors/operations/unused_return_values.py slither/detectors/statements/calls_in_loop.py slither/detectors/statements/incorrect_strict_equality.py slither/detectors/statements/tx_origin.py slither/detectors/variables/possible_const_state_variables.py slither/detectors/variables/unused_state_variables.py slither/slithir/convert.pypull/213/head
commit
9439ed65e2
@ -0,0 +1,21 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Install requisites |
||||
|
||||
pip3.6 install pybind11 |
||||
pip3.6 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip |
||||
|
||||
### Test slither-simil |
||||
|
||||
DIR_TESTS="tests/simil" |
||||
slither-simil info "" --filename $DIR_TESTS/../complex_func.sol --fname Complex.complexExternalWrites --solc solc-0.4.25 > test_1.txt 2>&1 |
||||
DIFF=$(diff test_1.txt "$DIR_TESTS/test_1.txt") |
||||
if [ "$DIFF" != "" ] |
||||
then |
||||
echo "slither-simil failed" |
||||
cat test_1.txt |
||||
cat "$DIR_TESTS/test_1.txt" |
||||
exit -1 |
||||
fi |
||||
|
||||
rm test_1.txt |
@ -0,0 +1,7 @@ |
||||
""" |
||||
This module import all slither exceptions |
||||
""" |
||||
from slither.slithir.exceptions import SlithIRError |
||||
from slither.solc_parsing.exceptions import ParsingError, ParsingContractNotFound, ParsingNameReuse, VariableNotFound |
||||
from slither.core.exceptions import SlitherCoreError |
||||
from slither.exceptions import SlitherException |
@ -0,0 +1,3 @@ |
||||
from slither.exceptions import SlitherException |
||||
|
||||
class SlitherCoreError(SlitherException): pass |
@ -0,0 +1,23 @@ |
||||
from slither.core.solidity_types.type import Type |
||||
|
||||
# Use to model the Type(X) function, which returns an undefined type |
||||
# https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#type-information |
||||
class TypeInformation(Type): |
||||
def __init__(self, c): |
||||
from slither.core.declarations.contract import Contract |
||||
|
||||
assert isinstance(c, (Contract)) |
||||
super(TypeInformation, self).__init__() |
||||
self._type = c |
||||
|
||||
@property |
||||
def type(self): |
||||
return self._type |
||||
|
||||
def __str__(self): |
||||
return f'type({self.type.name})' |
||||
|
||||
def __eq__(self, other): |
||||
if not isinstance(other, TypeInformation): |
||||
return False |
||||
return self.type == other.type |
@ -0,0 +1,97 @@ |
||||
""" |
||||
Detect incorrect erc721 interface. |
||||
""" |
||||
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification |
||||
|
||||
|
||||
class IncorrectERC721InterfaceDetection(AbstractDetector): |
||||
""" |
||||
Incorrect ERC721 Interface |
||||
""" |
||||
|
||||
ARGUMENT = 'erc721-interface' |
||||
HELP = 'Incorrect ERC721 interfaces' |
||||
IMPACT = DetectorClassification.MEDIUM |
||||
CONFIDENCE = DetectorClassification.HIGH |
||||
|
||||
WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-erc721-interface' |
||||
|
||||
WIKI_TITLE = 'Incorrect erc721 interface' |
||||
WIKI_DESCRIPTION = 'Incorrect return values for ERC721 functions. A contract compiled with solidity > 0.4.22 interacting with these functions will fail to execute them, as the return value is missing.' |
||||
WIKI_EXPLOIT_SCENARIO = ''' |
||||
```solidity |
||||
contract Token{ |
||||
function ownerOf(uint256 _tokenId) external view returns (bool); |
||||
//... |
||||
} |
||||
``` |
||||
`Token.ownerOf` does not return an address as ERC721 expects. Bob deploys the token. Alice creates a contract that interacts with it but assumes a correct ERC721 interface implementation. Alice's contract is unable to interact with Bob's contract.''' |
||||
|
||||
WIKI_RECOMMENDATION = 'Set the appropriate return values and value-types for the defined ERC721 functions.' |
||||
|
||||
@staticmethod |
||||
def incorrect_erc721_interface(signature): |
||||
(name, parameters, returnVars) = signature |
||||
|
||||
# ERC721 |
||||
if name == 'balanceOf' and parameters == ['address'] and returnVars != ['uint256']: |
||||
return True |
||||
if name == 'ownerOf' and parameters == ['uint256'] and returnVars != ['address']: |
||||
return True |
||||
if name == 'safeTransferFrom' and parameters == ['address', 'address', 'uint256', 'bytes'] and returnVars != []: |
||||
return True |
||||
if name == 'safeTransferFrom' and parameters == ['address', 'address', 'uint256'] and returnVars != []: |
||||
return True |
||||
if name == 'transferFrom' and parameters == ['address', 'address', 'uint256'] and returnVars != []: |
||||
return True |
||||
if name == 'approve' and parameters == ['address', 'uint256'] and returnVars != []: |
||||
return True |
||||
if name == 'setApprovalForAll' and parameters == ['address', 'bool'] and returnVars != []: |
||||
return True |
||||
if name == 'getApproved' and parameters == ['uint256'] and returnVars != ['address']: |
||||
return True |
||||
if name == 'isApprovedForAll' and parameters == ['address', 'address'] and returnVars != ['bool']: |
||||
return True |
||||
|
||||
# ERC165 (dependency) |
||||
if name == 'supportsInterface' and parameters == ['bytes4'] and returnVars != ['bool']: |
||||
return True |
||||
|
||||
return False |
||||
|
||||
@staticmethod |
||||
def detect_incorrect_erc721_interface(contract): |
||||
""" Detect incorrect ERC721 interface |
||||
|
||||
Returns: |
||||
list(str) : list of incorrect function signatures |
||||
""" |
||||
|
||||
# Verify this is an ERC721 contract. |
||||
if not contract.is_possible_erc721() or not contract.is_possible_erc20(): |
||||
return [] |
||||
|
||||
funcs = contract.functions |
||||
functions = [f for f in funcs if IncorrectERC721InterfaceDetection.incorrect_erc721_interface(f.signature)] |
||||
return functions |
||||
|
||||
def _detect(self): |
||||
""" Detect incorrect erc721 interface |
||||
|
||||
Returns: |
||||
dict: [contract name] = set(str) events |
||||
""" |
||||
results = [] |
||||
for c in self.slither.contracts_derived: |
||||
functions = IncorrectERC721InterfaceDetection.detect_incorrect_erc721_interface(c) |
||||
if functions: |
||||
for function in functions: |
||||
info = "{} ({}) has incorrect ERC721 function interface: {} ({})\n".format(c.name, |
||||
c.source_mapping_str, |
||||
function.full_name, |
||||
function.source_mapping_str) |
||||
json = self.generate_json_result(info) |
||||
self.add_function_to_json(function, json) |
||||
results.append(json) |
||||
|
||||
return results |
@ -0,0 +1,43 @@ |
||||
""" |
||||
Module detecting unused return values from low level |
||||
""" |
||||
from slither.detectors.abstract_detector import DetectorClassification |
||||
from .unused_return_values import UnusedReturnValues |
||||
from slither.slithir.operations import LowLevelCall |
||||
|
||||
class UncheckedLowLevel(UnusedReturnValues): |
||||
""" |
||||
If the return value of a send is not checked, it might lead to losing ether |
||||
""" |
||||
|
||||
ARGUMENT = 'unchecked-lowlevel' |
||||
HELP = 'Unchecked low-level calls' |
||||
IMPACT = DetectorClassification.MEDIUM |
||||
CONFIDENCE = DetectorClassification.MEDIUM |
||||
|
||||
WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-low-level-calls' |
||||
|
||||
WIKI_TITLE = 'Unchecked low-level calls' |
||||
WIKI_DESCRIPTION = 'The return value of a low-level call is not checked.' |
||||
WIKI_EXPLOIT_SCENARIO = ''' |
||||
```solidity |
||||
contract MyConc{ |
||||
function my_func(address payable dst) public payable{ |
||||
dst.call.value(msg.value)(""); |
||||
} |
||||
} |
||||
``` |
||||
The return value of the low-level call is not checked. As a result if the callfailed, the ether will be locked in the contract. |
||||
If the low level is used to prevent blocking operations, consider logging failed calls. |
||||
''' |
||||
|
||||
WIKI_RECOMMENDATION = 'Ensure that the return value of low-level call is checked or logged.' |
||||
|
||||
_txt_description = "low-level calls" |
||||
|
||||
def _is_instance(self, ir): |
||||
return isinstance(ir, LowLevelCall) |
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,40 @@ |
||||
""" |
||||
Module detecting unused return values from send |
||||
""" |
||||
|
||||
from slither.detectors.abstract_detector import DetectorClassification |
||||
from .unused_return_values import UnusedReturnValues |
||||
from slither.slithir.operations import Send |
||||
|
||||
class UncheckedSend(UnusedReturnValues): |
||||
""" |
||||
If the return value of a send is not checked, it might lead to losing ether |
||||
""" |
||||
|
||||
ARGUMENT = 'unchecked-send' |
||||
HELP = 'Unchecked send' |
||||
IMPACT = DetectorClassification.MEDIUM |
||||
CONFIDENCE = DetectorClassification.MEDIUM |
||||
|
||||
WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#unchecked-send' |
||||
|
||||
WIKI_TITLE = 'Unchecked Send' |
||||
WIKI_DESCRIPTION = 'The return value of a send is not checked.' |
||||
WIKI_EXPLOIT_SCENARIO = ''' |
||||
```solidity |
||||
contract MyConc{ |
||||
function my_func(address payable dst) public payable{ |
||||
dst.send(msg.value); |
||||
} |
||||
} |
||||
``` |
||||
The return value of `send` is not checked. As a result if the send failed, the ether will be locked in the contract. |
||||
If `send` is used to prevent blocking operations, consider logging the failed sent. |
||||
''' |
||||
|
||||
WIKI_RECOMMENDATION = 'Ensure that the return value of send is checked or logged.' |
||||
|
||||
_txt_description = "send calls" |
||||
|
||||
def _is_instance(self, ir): |
||||
return isinstance(ir, Send) |
@ -0,0 +1,78 @@ |
||||
""" |
||||
Module detecting numbers with too many digits. |
||||
""" |
||||
|
||||
from slither.detectors.abstract_detector import AbstractDetector, DetectorClassification |
||||
from slither.slithir.variables import Constant |
||||
|
||||
class TooManyDigits(AbstractDetector): |
||||
""" |
||||
Detect numbers with too many digits |
||||
""" |
||||
|
||||
ARGUMENT = 'too-many-digits' |
||||
HELP = 'Conformance to numeric notation best practices' |
||||
IMPACT = DetectorClassification.INFORMATIONAL |
||||
CONFIDENCE = DetectorClassification.MEDIUM |
||||
|
||||
WIKI = 'https://github.com/crytic/slither/wiki/Detector-Documentation#too-many-digits' |
||||
WIKI_TITLE = 'Too many digits' |
||||
WIKI_DESCRIPTION = ''' |
||||
Literals with many digits are difficult to read and review. |
||||
''' |
||||
WIKI_EXPLOIT_SCENARIO = ''' |
||||
```solidity |
||||
contract MyContract{ |
||||
uint 1_ether = 10000000000000000000; |
||||
} |
||||
``` |
||||
|
||||
While `1_ether` looks like `1 ether`, it is `10 ether`. As a result, its usage is likely to be incorrect. |
||||
''' |
||||
WIKI_RECOMMENDATION = ''' |
||||
Use: |
||||
- [Ether suffix](https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#ether-units) |
||||
- [Time suffix](https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#time-units), or |
||||
- [The scientific notation](https://solidity.readthedocs.io/en/latest/types.html#rational-and-integer-literals) |
||||
''' |
||||
|
||||
@staticmethod |
||||
def _detect_too_many_digits(f): |
||||
ret = [] |
||||
for node in f.nodes: |
||||
# each node contains a list of IR instruction |
||||
for ir in node.irs: |
||||
# iterate over all the variables read by the IR |
||||
for read in ir.read: |
||||
# if the variable is a constant |
||||
if isinstance(read, Constant): |
||||
# read.value can return an int or a str. Convert it to str |
||||
value_as_str = read.original_value |
||||
line_of_code = str(node.expression) |
||||
if '00000' in value_as_str: |
||||
# Info to be printed |
||||
ret.append(node) |
||||
return ret |
||||
|
||||
def _detect(self): |
||||
results = [] |
||||
|
||||
# iterate over all contracts |
||||
for contract in self.slither.contracts_derived: |
||||
# iterate over all functions |
||||
for f in contract.functions: |
||||
# iterate over all the nodes |
||||
ret = self._detect_too_many_digits(f) |
||||
if ret: |
||||
func_info = '{}.{} ({}) uses literals with too many digits:'.format(f.contract.name, |
||||
f.name, |
||||
f.source_mapping_str) |
||||
for node in ret: |
||||
node_info = func_info + '\n\t- {}\n'.format(node.expression) |
||||
|
||||
# Add the result in result |
||||
json = self.generate_json_result(node_info) |
||||
self.add_node_to_json(node, json) |
||||
results.append(json) |
||||
|
||||
return results |
@ -0,0 +1,3 @@ |
||||
class SlitherException(Exception): pass |
||||
|
||||
class SlitherError(SlitherException): pass |
@ -0,0 +1,3 @@ |
||||
from slither.exceptions import SlitherException |
||||
|
||||
class SlithIRError(SlitherException): pass |
@ -0,0 +1,9 @@ |
||||
from slither.exceptions import SlitherException |
||||
|
||||
class ParsingError(SlitherException): pass |
||||
|
||||
class ParsingNameReuse(SlitherException): pass |
||||
|
||||
class ParsingContractNotFound(SlitherException): pass |
||||
|
||||
class VariableNotFound(SlitherException): pass |
@ -0,0 +1,69 @@ |
||||
|
||||
def erc_to_signatures(erc): |
||||
return [f'{e[0]}({",".join(e[1])})' for e in erc] |
||||
|
||||
|
||||
# Final |
||||
# https://eips.ethereum.org/EIPS/eip-20 |
||||
# name, symbolc, decimals are optionals |
||||
ERC20 = [('totalSupply', [], 'uint256'), |
||||
('balanceOf', ['address'], 'uint256'), |
||||
('transfer', ['address', 'uint256'], 'bool'), |
||||
('transferFrom', ['address', 'address', 'uint256'], 'bool'), |
||||
('approve', ['address', 'uint256'], 'bool'), |
||||
('allowance', ['address', 'address'], 'uint256')] |
||||
ERC20_signatures = erc_to_signatures(ERC20) |
||||
|
||||
# Draft |
||||
# https://github.com/ethereum/eips/issues/223 |
||||
ERC223 = [('name', [], 'string'), |
||||
('symbol', [], 'string'), |
||||
('decimals', [], 'uint8'), |
||||
('totalSupply', [], 'uint256'), |
||||
('balanceOf', ['address'], 'uint256'), |
||||
('transfer', ['address', 'uint256'], 'bool'), |
||||
('transfer', ['address', 'uint256', 'bytes'], 'bool'), |
||||
('transfer', ['address', 'uint256', 'bytes', 'string'], 'bool')] |
||||
ERC223_signatures = erc_to_signatures(ERC223) |
||||
|
||||
# Final |
||||
# https://eips.ethereum.org/EIPS/eip-165 |
||||
ERC165 = [('supportsInterface', ['bytes4'], 'bool')] |
||||
ERC165_signatures = erc_to_signatures(ERC165) |
||||
|
||||
# Final |
||||
# https://eips.ethereum.org/EIPS/eip-721 |
||||
# Must have ERC165 |
||||
# name, symbol, tokenURI are optionals |
||||
ERC721 = [('balanceOf', ['address'], 'uint256'), |
||||
('ownerOf', ['uint256'], 'address'), |
||||
('safeTransferFrom', ['address', 'address', 'uint256', 'bytes'], ''), |
||||
('safeTransferFrom', ['address', 'address', 'uint256'], ''), |
||||
('transferFrom', ['address', 'address', 'uint256'], ''), |
||||
('approve', ['address', 'uint256'], ''), |
||||
('setApprovalForAll', ['address', 'bool'], ''), |
||||
('getApproved', ['uint256'], 'address'), |
||||
('isApprovedForAll', ['address', 'address'], 'bool')] + ERC165 |
||||
ERC721_signatures = erc_to_signatures(ERC721) |
||||
|
||||
# Final |
||||
# https://eips.ethereum.org/EIPS/eip-1820 |
||||
ERC1820 = [('canImplementInterfaceForAddress', ['bytes32', 'address'], 'bytes32')] |
||||
ERC1820_signatures = erc_to_signatures(ERC1820) |
||||
|
||||
# Last Call |
||||
# https://eips.ethereum.org/EIPS/eip-777 |
||||
ERC777 = [('name', [], 'string'), |
||||
('symbol', [], 'string'), |
||||
('totalSupply', [], 'uint256'), |
||||
('balanceOf', ['address'], 'uint256'), |
||||
('granularity', [], 'uint256'), |
||||
('defaultOperators', [], 'address[]'), |
||||
('isOperatorFor', ['address', 'address'], 'bool'), |
||||
('authorizeOperator', ['address'], ''), |
||||
('revokeOperator', ['address'], ''), |
||||
('send', ['address', 'uint256', 'bytes'], ''), |
||||
('operatorSend', ['address', 'address', 'uint256', 'bytes', 'bytes'], ''), |
||||
('burn', ['uint256', 'bytes'] , ''), |
||||
('operatorBurn', ['address', 'uint256', 'bytes', 'bytes'] , '')] |
||||
ERC777_signatures = erc_to_signatures(ERC777) |
@ -0,0 +1,193 @@ |
||||
from pathlib import Path |
||||
|
||||
|
||||
libraries = { |
||||
'Openzeppelin-SafeMath': lambda x: is_openzepellin_safemath(x), |
||||
'Openzeppelin-ECRecovery': lambda x: is_openzepellin_ecrecovery(x), |
||||
'Openzeppelin-Ownable': lambda x: is_openzepellin_ownable(x), |
||||
'Openzeppelin-ERC20': lambda x: is_openzepellin_erc20(x), |
||||
'Openzeppelin-ERC721': lambda x: is_openzepellin_erc721(x), |
||||
'Zos-Upgrade': lambda x: is_zos_initializable(x), |
||||
'Dapphub-DSAuth': lambda x: is_dapphub_ds_auth(x), |
||||
'Dapphub-DSMath': lambda x: is_dapphub_ds_math(x), |
||||
'Dapphub-DSToken': lambda x: is_dapphub_ds_token(x), |
||||
'Dapphub-DSProxy': lambda x: is_dapphub_ds_proxy(x), |
||||
'Dapphub-DSGroup': lambda x: is_dapphub_ds_group(x), |
||||
} |
||||
|
||||
def is_standard_library(contract): |
||||
for name, is_lib in libraries.items(): |
||||
if is_lib(contract): |
||||
return name |
||||
return None |
||||
|
||||
|
||||
################################################################################### |
||||
################################################################################### |
||||
# region General libraries |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_openzepellin(contract): |
||||
if not contract.is_from_dependency(): |
||||
return False |
||||
return 'openzeppelin-solidity' in Path(contract.source_mapping['filename_absolute']).parts |
||||
|
||||
|
||||
def is_zos(contract): |
||||
if not contract.is_from_dependency(): |
||||
return False |
||||
return 'zos-lib' in Path(contract.source_mapping['filename_absolute']).parts |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region SafeMath |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_safemath(contract): |
||||
return contract.name == "SafeMath" |
||||
|
||||
|
||||
def is_openzepellin_safemath(contract): |
||||
return is_safemath(contract) and is_openzepellin(contract) |
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region ECRecovery |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_ecrecovery(contract): |
||||
return contract.name == 'ECRecovery' |
||||
|
||||
|
||||
def is_openzepellin_ecrecovery(contract): |
||||
return is_ecrecovery(contract) and is_openzepellin(contract) |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region Ownable |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_ownable(contract): |
||||
return contract.name == 'Ownable' |
||||
|
||||
|
||||
def is_openzepellin_ownable(contract): |
||||
return is_ownable(contract) and is_openzepellin(contract) |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region ERC20 |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_erc20(contract): |
||||
return contract.name == 'ERC20' |
||||
|
||||
|
||||
def is_openzepellin_erc20(contract): |
||||
return is_erc20(contract) and is_openzepellin(contract) |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region ERC721 |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_erc721(contract): |
||||
return contract.name == 'ERC721' |
||||
|
||||
|
||||
def is_openzepellin_erc721(contract): |
||||
return is_erc721(contract) and is_openzepellin(contract) |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region Zos Initializable |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
|
||||
def is_initializable(contract): |
||||
return contract.name == 'Initializable' |
||||
|
||||
|
||||
def is_zos_initializable(contract): |
||||
return is_initializable(contract) and is_zos(contract) |
||||
|
||||
|
||||
# endregion |
||||
################################################################################### |
||||
################################################################################### |
||||
# region DappHub |
||||
################################################################################### |
||||
################################################################################### |
||||
|
||||
dapphubs = { |
||||
'DSAuth': 'ds-auth', |
||||
'DSMath': 'ds-math', |
||||
'DSToken': 'ds-token', |
||||
'DSProxy': 'ds-proxy', |
||||
'DSGroup': 'ds-group', |
||||
} |
||||
|
||||
|
||||
def _is_ds(contract, name): |
||||
return contract.name == name |
||||
|
||||
def _is_dappdhub_ds(contract, name): |
||||
if not contract.is_from_dependency(): |
||||
return False |
||||
if not dapphubs[name] in Path(contract.source_mapping['filename_absolute']).parts: |
||||
return False |
||||
return _is_ds(contract, name) |
||||
|
||||
def is_ds_auth(contract): |
||||
return _is_ds(contract, 'DSAuth') |
||||
|
||||
def is_dapphub_ds_auth(contract): |
||||
return _is_dappdhub_ds(contract, 'DSAuth') |
||||
|
||||
def is_ds_math(contract): |
||||
return _is_ds(contract, 'DSMath') |
||||
|
||||
def is_dapphub_ds_math(contract): |
||||
return _is_dappdhub_ds(contract, 'DSMath') |
||||
|
||||
def is_ds_token(contract): |
||||
return _is_ds(contract, 'DSToken') |
||||
|
||||
def is_dapphub_ds_token(contract): |
||||
return _is_dappdhub_ds(contract, 'DSToken') |
||||
|
||||
def is_ds_proxy(contract): |
||||
return _is_ds(contract, 'DSProxy') |
||||
|
||||
def is_dapphub_ds_proxy(contract): |
||||
return _is_dappdhub_ds(contract, 'DSProxy') |
||||
|
||||
def is_ds_group(contract): |
||||
return _is_ds(contract, 'DSGroup') |
||||
|
||||
def is_dapphub_ds_group(contract): |
||||
return _is_dappdhub_ds(contract, 'DSGroup') |
@ -0,0 +1,34 @@ |
||||
from slither.core.solidity_types import (ArrayType, MappingType, ElementaryType) |
||||
|
||||
|
||||
def _add_mapping_parameter(t, l): |
||||
while isinstance(t, MappingType): |
||||
l.append(t.type_from) |
||||
t = t.type_to |
||||
_add_array_parameter(t, l) |
||||
|
||||
|
||||
def _add_array_parameter(t, l): |
||||
while isinstance(t, ArrayType): |
||||
l.append(ElementaryType('uint256')) |
||||
t = t.type |
||||
|
||||
|
||||
def export_nested_types_from_variable(variable): |
||||
""" |
||||
Export the list of nested types (mapping/array) |
||||
:param variable: |
||||
:return: list(Type) |
||||
""" |
||||
l = [] |
||||
if isinstance(variable.type, MappingType): |
||||
t = variable.type |
||||
_add_mapping_parameter(t, l) |
||||
|
||||
if isinstance(variable.type, ArrayType): |
||||
v = variable |
||||
_add_array_parameter(v.type, l) |
||||
|
||||
return l |
||||
|
||||
|
@ -1,204 +1,378 @@ |
||||
[ |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.direct (tests/arbitrary_send-0.5.1.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#12)\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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 |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.direct() (tests/arbitrary_send-0.5.1.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#12)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "direct()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "node", |
||||
"name": "msg.sender.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 196, |
||||
"length": 38, |
||||
"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": [ |
||||
12 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 47 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "direct()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "msg.sender.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 196, |
||||
"length": 38, |
||||
"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": [ |
||||
12 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 47 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.indirect (tests/arbitrary_send-0.5.1.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#20)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.indirect() (tests/arbitrary_send-0.5.1.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/arbitrary_send-0.5.1.sol#20)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "indirect()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "node", |
||||
"name": "destination.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 352, |
||||
"length": 39, |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 48 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "indirect()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "destination.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 352, |
||||
"length": 39, |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 48 |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,204 +1,378 @@ |
||||
[ |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.direct (tests/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/arbitrary_send.sol#12)\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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 |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.direct() (tests/arbitrary_send.sol#11-13) sends eth to arbitrary user\n\tDangerous calls:\n\t- msg.sender.send(address(this).balance) (tests/arbitrary_send.sol#12)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "direct()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "node", |
||||
"name": "msg.sender.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 181, |
||||
"length": 38, |
||||
"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": [ |
||||
12 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 47 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "direct()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "msg.sender.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 181, |
||||
"length": 38, |
||||
"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": [ |
||||
12 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 47 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.indirect (tests/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/arbitrary_send.sol#20)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
"check": "arbitrary-send", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Test.indirect() (tests/arbitrary_send.sol#19-21) sends eth to arbitrary user\n\tDangerous calls:\n\t- destination.send(address(this).balance) (tests/arbitrary_send.sol#20)\n", |
||||
"elements": [ |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "indirect()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "node", |
||||
"name": "destination.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 337, |
||||
"length": 39, |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 48 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "indirect()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "destination.send(address(this).balance)", |
||||
"source_mapping": { |
||||
"start": 337, |
||||
"length": 39, |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 48 |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,52 +1,61 @@ |
||||
[ |
||||
{ |
||||
"check": "backdoor", |
||||
"impact": "High", |
||||
"confidence": "High", |
||||
"description": "Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "i_am_a_backdoor", |
||||
"source_mapping": { |
||||
"start": 18, |
||||
"length": 74, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "backdoor", |
||||
"impact": "High", |
||||
"confidence": "High", |
||||
"description": "Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "i_am_a_backdoor", |
||||
"source_mapping": { |
||||
"start": 18, |
||||
"length": 74, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "i_am_a_backdoor()" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,52 +1,61 @@ |
||||
[ |
||||
{ |
||||
"check": "suicidal", |
||||
"impact": "High", |
||||
"confidence": "High", |
||||
"description": "C.i_am_a_backdoor (tests/backdoor.sol#4-6) allows anyone to destruct the contract\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "i_am_a_backdoor", |
||||
"source_mapping": { |
||||
"start": 18, |
||||
"length": 74, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "suicidal", |
||||
"impact": "High", |
||||
"confidence": "High", |
||||
"description": "C.i_am_a_backdoor() (tests/backdoor.sol#4-6) allows anyone to destruct the contract\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "i_am_a_backdoor", |
||||
"source_mapping": { |
||||
"start": 18, |
||||
"length": 74, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "i_am_a_backdoor()" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,112 +1,362 @@ |
||||
[ |
||||
{ |
||||
"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", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "myFriendsAddress", |
||||
"source_mapping": { |
||||
"start": 132, |
||||
"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": [ |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
} |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "myFriendsAddress", |
||||
"source_mapping": { |
||||
"start": 132, |
||||
"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": [ |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "mySistersAddress", |
||||
"source_mapping": { |
||||
"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": [ |
||||
26 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
} |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"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": [ |
||||
10 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant", |
||||
"source_mapping": { |
||||
"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": [ |
||||
42 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 47 |
||||
} |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "text2", |
||||
"source_mapping": { |
||||
"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": [ |
||||
14 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant_2", |
||||
"source_mapping": { |
||||
"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": [ |
||||
43 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 38 |
||||
} |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "mySistersAddress", |
||||
"source_mapping": { |
||||
"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": [ |
||||
26 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"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": [ |
||||
10 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
} |
||||
"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": "should_be_constant", |
||||
"source_mapping": { |
||||
"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": [ |
||||
42 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 47 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "text2", |
||||
"source_mapping": { |
||||
"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": [ |
||||
14 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
} |
||||
"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": "should_be_constant_2", |
||||
"source_mapping": { |
||||
"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": [ |
||||
43 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 38 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,67 +1,75 @@ |
||||
[ |
||||
{ |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_assembly_bug (tests/constant-0.5.1.sol#15-17) is declared view but contains assembly code\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_assembly_bug", |
||||
"source_mapping": { |
||||
"start": 185, |
||||
"length": 66, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_relative": "tests/constant-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_short": "tests/constant-0.5.1.sol", |
||||
"lines": [ |
||||
15, |
||||
16, |
||||
17 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 253, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_relative": "tests/constant-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_short": "tests/constant-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 |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_assembly_bug() (tests/constant-0.5.1.sol#15-17) is declared view but contains assembly code\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_assembly_bug", |
||||
"source_mapping": { |
||||
"start": 185, |
||||
"length": 66, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_relative": "tests/constant-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_short": "tests/constant-0.5.1.sol", |
||||
"lines": [ |
||||
15, |
||||
16, |
||||
17 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 253, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_relative": "tests/constant-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_short": "tests/constant-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 |
||||
} |
||||
}, |
||||
"signature": "test_assembly_bug()" |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": true |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,252 +1,350 @@ |
||||
[ |
||||
{ |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_view_bug (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_view_bug", |
||||
"source_mapping": { |
||||
"start": 45, |
||||
"length": 58, |
||||
"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": [ |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"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 |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_view_bug() (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_view_bug", |
||||
"source_mapping": { |
||||
"start": 45, |
||||
"length": 58, |
||||
"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": [ |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "test_view_bug()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"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": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": false |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"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": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": false |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_constant_bug", |
||||
"source_mapping": { |
||||
"start": 113, |
||||
"length": 66, |
||||
"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": [ |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"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 |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_constant_bug() (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_constant_bug", |
||||
"source_mapping": { |
||||
"start": 113, |
||||
"length": 66, |
||||
"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": [ |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "test_constant_bug()" |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"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": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": false |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"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": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": false |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_assembly_bug", |
||||
"source_mapping": { |
||||
"start": 324, |
||||
"length": 66, |
||||
"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": [ |
||||
22, |
||||
23, |
||||
24 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"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 |
||||
"check": "constant-function", |
||||
"impact": "Medium", |
||||
"confidence": "Medium", |
||||
"description": "Constant.test_assembly_bug() (tests/constant.sol#22-24) is declared view but contains assembly code\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "test_assembly_bug", |
||||
"source_mapping": { |
||||
"start": 324, |
||||
"length": 66, |
||||
"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": [ |
||||
22, |
||||
23, |
||||
24 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "test_assembly_bug()" |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": true |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,173 +1,316 @@ |
||||
[ |
||||
{ |
||||
"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", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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 |
||||
"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\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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "bad_delegate_call(bytes)" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "bad_delegate_call(bytes)" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "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 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"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", |
||||
"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\t- addr_bad.delegatecall(abi.encode(func_id,data)) (tests/controlled_delegatecall.sol#19)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "bad_delegate_call2(bytes)" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "bad_delegate_call2(bytes)" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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,180 +1,681 @@ |
||||
[ |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#2:\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "globalBlockHash", |
||||
"source_mapping": { |
||||
"start": 48, |
||||
"length": 44, |
||||
"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": [ |
||||
2 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 49 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#7-10:\n\t- Usage of \"msg.gas\" should be replaced with \"gasleft()\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#2:\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "globalBlockHash", |
||||
"source_mapping": { |
||||
"start": 48, |
||||
"length": 44, |
||||
"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": [ |
||||
2 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 49 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "msg.gas == msg.value", |
||||
"source_mapping": { |
||||
"start": 258, |
||||
"length": 107, |
||||
"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": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 10 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#9:\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#7-10:\n\t- Usage of \"msg.gas\" should be replaced with \"gasleft()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "msg.gas == msg.value", |
||||
"source_mapping": { |
||||
"start": 258, |
||||
"length": 107, |
||||
"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": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 10 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedThrow()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 349, |
||||
"length": 5, |
||||
"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": [ |
||||
9 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 18 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#16:\n\t- Usage of \"sha3()\" should be replaced with \"keccak256()\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#9:\n\t- Usage of \"throw\" should be replaced with \"revert()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "", |
||||
"source_mapping": { |
||||
"start": 349, |
||||
"length": 5, |
||||
"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": [ |
||||
9 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 18 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedThrow()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "sha3Result = sha3()(test deprecated sha3 usage)", |
||||
"source_mapping": { |
||||
"start": 542, |
||||
"length": 55, |
||||
"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": [ |
||||
16 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 64 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#19:\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#16:\n\t- Usage of \"sha3()\" should be replaced with \"keccak256()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "sha3Result = sha3()(test deprecated sha3 usage)", |
||||
"source_mapping": { |
||||
"start": 542, |
||||
"length": 55, |
||||
"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": [ |
||||
16 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 64 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedReferences()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "blockHashResult = block.blockhash(0)", |
||||
"source_mapping": { |
||||
"start": 671, |
||||
"length": 44, |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 53 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#22:\n\t- Usage of \"callcode\" should be replaced with \"delegatecall\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#19:\n\t- Usage of \"block.blockhash()\" should be replaced with \"blockhash()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "blockHashResult = block.blockhash(0)", |
||||
"source_mapping": { |
||||
"start": 671, |
||||
"length": 44, |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 53 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedReferences()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "address(this).callcode()", |
||||
"source_mapping": { |
||||
"start": 785, |
||||
"length": 24, |
||||
"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": [ |
||||
22 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 33 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#25:\n\t- Usage of \"suicide()\" should be replaced with \"selfdestruct()\"\n", |
||||
"elements": [ |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#22:\n\t- Usage of \"callcode\" should be replaced with \"delegatecall\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "address(this).callcode()", |
||||
"source_mapping": { |
||||
"start": 785, |
||||
"length": 24, |
||||
"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": [ |
||||
22 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 33 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedReferences()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "suicide(address)(address(0))", |
||||
"source_mapping": { |
||||
"start": 878, |
||||
"length": 19, |
||||
"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": [ |
||||
25 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 28 |
||||
} |
||||
"check": "deprecated-standards", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Deprecated standard detected @ tests/deprecated_calls.sol#25:\n\t- Usage of \"suicide()\" should be replaced with \"selfdestruct()\"\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "node", |
||||
"name": "suicide(address)(address(0))", |
||||
"source_mapping": { |
||||
"start": 878, |
||||
"length": 19, |
||||
"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": [ |
||||
25 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 28 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"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 |
||||
} |
||||
}, |
||||
"signature": "functionWithDeprecatedReferences()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,182 +1,236 @@ |
||||
[ |
||||
{ |
||||
"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", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Transfer(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "from" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"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": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Transfer(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "to" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"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": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Approval(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "owner" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"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": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"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": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"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": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Approval(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "spender" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
@ -1,246 +1,264 @@ |
||||
[ |
||||
{ |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled3 (tests/external_function.sol#13-15) should be declared external\n", |
||||
"elements": [ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled3", |
||||
"source_mapping": { |
||||
"start": 259, |
||||
"length": 41, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
13, |
||||
14, |
||||
15 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled3() (tests/external_function.sol#13-15) should be declared external\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled3", |
||||
"source_mapping": { |
||||
"start": 259, |
||||
"length": 41, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
13, |
||||
14, |
||||
15 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "funcNotCalled3()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled2 (tests/external_function.sol#17-19) should be declared external\n", |
||||
"elements": [ |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled2", |
||||
"source_mapping": { |
||||
"start": 306, |
||||
"length": 41, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled2() (tests/external_function.sol#17-19) should be declared external\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled2", |
||||
"source_mapping": { |
||||
"start": 306, |
||||
"length": 41, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "funcNotCalled2()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled (tests/external_function.sol#21-23) should be declared external\n", |
||||
"elements": [ |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"start": 353, |
||||
"length": 40, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
21, |
||||
22, |
||||
23 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled.funcNotCalled() (tests/external_function.sol#21-23) should be declared external\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"start": 353, |
||||
"length": 40, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
21, |
||||
22, |
||||
23 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled", |
||||
"source_mapping": { |
||||
"start": 213, |
||||
"length": 258, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "funcNotCalled()" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled2.funcNotCalled (tests/external_function.sol#32-39) should be declared external\n", |
||||
"elements": [ |
||||
] |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"start": 554, |
||||
"length": 325, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled2", |
||||
"source_mapping": { |
||||
"start": 473, |
||||
"length": 408, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"check": "external-function", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ContractWithFunctionNotCalled2.funcNotCalled() (tests/external_function.sol#32-39) should be declared external\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "funcNotCalled", |
||||
"source_mapping": { |
||||
"start": 554, |
||||
"length": 325, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "ContractWithFunctionNotCalled2", |
||||
"source_mapping": { |
||||
"start": 473, |
||||
"length": 408, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_relative": "tests/external_function.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/external_function.sol", |
||||
"filename_short": "tests/external_function.sol", |
||||
"lines": [ |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "funcNotCalled()" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
||||
] |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue