mirror of https://github.com/crytic/slither
commit
0158705616
@ -0,0 +1,5 @@ |
||||
CURRENT_PATH=$(pwd) |
||||
TRAVIS_PATH='/home/travis/build/crytic/slither' |
||||
for f in tests/expected_json/*json; do |
||||
sed "s|$CURRENT_PATH|$TRAVIS_PATH|g" "$f" -i |
||||
done |
@ -0,0 +1,24 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test |
||||
|
||||
slither "tests/*.json" --solc-ast --ignore-return-value |
||||
|
||||
if [ $? -ne 0 ]; then |
||||
echo "--solc-ast failed" |
||||
exit 1 |
||||
fi |
||||
|
||||
slither "tests/*0.5*.sol" --solc-disable-warnings --ignore-return-value |
||||
|
||||
if [ $? -ne 0 ]; then |
||||
echo "--solc-disable-warnings failed" |
||||
exit 1 |
||||
fi |
||||
|
||||
slither "tests/*0.5*.sol" --disable-color --ignore-return-value |
||||
|
||||
if [ $? -ne 0 ]; then |
||||
echo "--disable-color failed" |
||||
exit 1 |
||||
fi |
@ -0,0 +1,23 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test Dapp integration |
||||
|
||||
mkdir test_dapp |
||||
cd test_dapp |
||||
|
||||
curl https://nixos.org/nix/install | sh |
||||
. "$HOME/.nix-profile/etc/profile.d/nix.sh" |
||||
git clone --recursive https://github.com/dapphub/dapptools $HOME/.dapp/dapptools |
||||
nix-env -f $HOME/.dapp/dapptools -iA dapp seth solc hevm ethsign |
||||
|
||||
dapp init |
||||
|
||||
slither . |
||||
|
||||
if [ $? -eq 21 ] |
||||
then |
||||
exit 0 |
||||
fi |
||||
|
||||
echo "Truffle test failed" |
||||
exit -1 |
@ -0,0 +1,23 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test etherlime integration |
||||
|
||||
mkdir test_etherlime |
||||
cd test_etherlime |
||||
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash |
||||
source ~/.nvm/nvm.sh |
||||
nvm install --lts |
||||
nvm use --lts |
||||
|
||||
npm i -g etherlime |
||||
etherlime init |
||||
slither . |
||||
|
||||
if [ $? -eq 6 ] |
||||
then |
||||
exit 0 |
||||
fi |
||||
|
||||
echo "Etherlime test failed" |
||||
exit -1 |
@ -0,0 +1,26 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test etherscan integration |
||||
|
||||
mkdir etherscan |
||||
cd etherscan |
||||
|
||||
wget -O solc-0.4.25 https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux |
||||
chmod +x solc-0.4.25 |
||||
|
||||
slither 0x7F37f78cBD74481E593F9C737776F7113d76B315 --solc "./solc-0.4.25" |
||||
|
||||
if [ $? -ne 5 ] |
||||
then |
||||
echo "Etherscan test failed" |
||||
exit -1 |
||||
fi |
||||
|
||||
slither rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --solc "./solc-0.4.25" |
||||
|
||||
if [ $? -ne 68 ] |
||||
then |
||||
echo "Etherscan test failed" |
||||
exit -1 |
||||
fi |
||||
|
@ -0,0 +1,11 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test printer |
||||
|
||||
slither "tests/*.json" --print all |
||||
|
||||
if [ $? -ne 0 ]; then |
||||
echo "Printer tests failed" |
||||
exit 1 |
||||
fi |
||||
|
@ -0,0 +1,11 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
### Test |
||||
|
||||
slither "tests/*.json" --config "tests/config/slither.config.json" |
||||
|
||||
if [ $? -ne 0 ]; then |
||||
echo "Config failed" |
||||
exit 1 |
||||
fi |
||||
|
@ -0,0 +1,96 @@ |
||||
""" |
||||
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.has_an_erc721_function() or not contract.has_an_erc20_function(): |
||||
return [] |
||||
|
||||
functions = [f for f in contract.functions 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.contracts: |
||||
functions = IncorrectERC721InterfaceDetection.detect_incorrect_erc721_interface(c) |
||||
if functions: |
||||
info = "{} ({}) has incorrect ERC721 function interface(s):\n" |
||||
info = info.format(c.name, |
||||
c.source_mapping_str) |
||||
for function in functions: |
||||
info += "\t-{} ({})\n".format(function.name, function.source_mapping_str) |
||||
json = self.generate_json_result(info) |
||||
self.add_functions_to_json(functions, json) |
||||
results.append(json) |
||||
|
||||
return results |
@ -0,0 +1,80 @@ |
||||
""" |
||||
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: |
||||
info = '{}.{} ({}) uses literals with too many digits:'.format(f.contract.name, |
||||
f.name, |
||||
f.source_mapping_str) |
||||
for node in ret: |
||||
info += '\n\t- {}'.format(node.expression) |
||||
info += '\n\tUse the proper denomination (ether-unit, time-unit,' |
||||
info += 'or the scientific notation\n' |
||||
|
||||
# Add the result in result |
||||
json = self.generate_json_result(info) |
||||
self.add_nodes_to_json(ret, json) |
||||
results.append(json) |
||||
|
||||
return results |
@ -0,0 +1,31 @@ |
||||
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 |
||||
|
||||
|
@ -0,0 +1,6 @@ |
||||
{ |
||||
"detectors_to_run": "all", |
||||
"exclude_informational": true, |
||||
"exclude_low": true, |
||||
"ignore_return_value": true |
||||
} |
@ -1 +1,204 @@ |
||||
[{"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": "tests/arbitrary_send-0.5.1.sol", "lines": [11, 12, 13]}, "contract": {"type": "contract", "name": "Test", "source_mapping": {"start": 0, "length": 884, "filename": "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]}}}, {"type": "expression", "expression": "msg.sender.send(address(this).balance)", "source_mapping": {"start": 196, "length": 38, "filename": "tests/arbitrary_send-0.5.1.sol", "lines": [12]}}]}, {"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": "tests/arbitrary_send-0.5.1.sol", "lines": [19, 20, 21]}, "contract": {"type": "contract", "name": "Test", "source_mapping": {"start": 0, "length": 884, "filename": "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]}}}, {"type": "expression", "expression": "destination.send(address(this).balance)", "source_mapping": {"start": 352, "length": 39, "filename": "tests/arbitrary_send-0.5.1.sol", "lines": [20]}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 +1,204 @@ |
||||
[{"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": "tests/arbitrary_send.sol", "lines": [11, 12, 13]}, "contract": {"type": "contract", "name": "Test", "source_mapping": {"start": 0, "length": 869, "filename": "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]}}}, {"type": "expression", "expression": "msg.sender.send(address(this).balance)", "source_mapping": {"start": 181, "length": 38, "filename": "tests/arbitrary_send.sol", "lines": [12]}}]}, {"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": "tests/arbitrary_send.sol", "lines": [19, 20, 21]}, "contract": {"type": "contract", "name": "Test", "source_mapping": {"start": 0, "length": 869, "filename": "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]}}}, {"type": "expression", "expression": "destination.send(address(this).balance)", "source_mapping": {"start": 337, "length": 39, "filename": "tests/arbitrary_send.sol", "lines": [20]}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 +1,52 @@ |
||||
[{"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": "tests/backdoor.sol", "lines": [4, 5, 6]}, "contract": {"type": "contract", "name": "C", "source_mapping": {"start": 1, "length": 94, "filename": "tests/backdoor.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,52 @@ |
||||
[{"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": "tests/backdoor.sol", "lines": [4, 5, 6]}, "contract": {"type": "contract", "name": "C", "source_mapping": {"start": 1, "length": 94, "filename": "tests/backdoor.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,112 @@ |
||||
[{"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": [{"type": "variable", "name": "myFriendsAddress", "source_mapping": {"start": 132, "length": 76, "filename": "tests/const_state_variables.sol", "lines": [7]}}, {"type": "variable", "name": "mySistersAddress", "source_mapping": {"start": 496, "length": 76, "filename": "tests/const_state_variables.sol", "lines": [26]}}, {"type": "variable", "name": "should_be_constant", "source_mapping": {"start": 793, "length": 42, "filename": "tests/const_state_variables.sol", "lines": [42]}}, {"type": "variable", "name": "should_be_constant_2", "source_mapping": {"start": 841, "length": 33, "filename": "tests/const_state_variables.sol", "lines": [43]}}, {"type": "variable", "name": "test", "source_mapping": {"start": 237, "length": 20, "filename": "tests/const_state_variables.sol", "lines": [10]}}, {"type": "variable", "name": "text2", "source_mapping": {"start": 333, "length": 20, "filename": "tests/const_state_variables.sol", "lines": [14]}}]}] |
||||
[ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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": "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": "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": "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": "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": "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 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,67 @@ |
||||
[{"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": "info", "contains_assembly": true}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": true |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,252 @@ |
||||
[{"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": "tests/constant.sol", "lines": [5, 6, 7]}, "contract": {"type": "contract", "name": "Constant", "source_mapping": {"start": 0, "length": 392, "filename": "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]}}}, {"type": "variable", "name": "a", "source_mapping": {"start": 28, "length": 6, "filename": "tests/constant.sol", "lines": [3]}}, {"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": "tests/constant.sol", "lines": [9, 10, 11]}, "contract": {"type": "contract", "name": "Constant", "source_mapping": {"start": 0, "length": 392, "filename": "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]}}}, {"type": "variable", "name": "a", "source_mapping": {"start": 28, "length": 6, "filename": "tests/constant.sol", "lines": [3]}}, {"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": "info", "contains_assembly": true}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "info", |
||||
"contains_assembly": true |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,173 @@ |
||||
[{"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": [{"type": "function", "name": "bad_delegate_call", "source_mapping": {"start": 101, "length": 134, "filename": "tests/controlled_delegatecall.sol", "lines": [8, 9, 10, 11]}, "contract": {"type": "contract", "name": "C", "source_mapping": {"start": 0, "length": 585, "filename": "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]}}}, {"type": "expression", "expression": "addr_bad.delegatecall(data)", "source_mapping": {"start": 201, "length": 27, "filename": "tests/controlled_delegatecall.sol", "lines": [10]}}]}, {"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": "tests/controlled_delegatecall.sol", "lines": [18, 19, 20]}, "contract": {"type": "contract", "name": "C", "source_mapping": {"start": 0, "length": 585, "filename": "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]}}}, {"type": "expression", "expression": "addr_bad.delegatecall(abi.encode(func_id,data))", "source_mapping": {"start": 400, "length": 48, "filename": "tests/controlled_delegatecall.sol", "lines": [19]}}]}] |
||||
[ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "bad_delegate_call", |
||||
"source_mapping": { |
||||
"start": 101, |
||||
"length": 134, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol", |
||||
"filename_relative": "tests/controlled_delegatecall.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol", |
||||
"filename_short": "tests/controlled_delegatecall.sol", |
||||
"lines": [ |
||||
8, |
||||
9, |
||||
10, |
||||
11 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 585, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol", |
||||
"filename_relative": "tests/controlled_delegatecall.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/controlled_delegatecall.sol", |
||||
"filename_short": "tests/controlled_delegatecall.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 +1,180 @@ |
||||
[{"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": "tests/deprecated_calls.sol", "lines": [2]}}]}, {"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": "expression", "expression": "msg.gas == msg.value", "source_mapping": {"start": 258, "length": 107, "filename": "tests/deprecated_calls.sol", "lines": [7, 8, 9, 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": [{"type": "expression", "expression": "None", "source_mapping": {"start": 349, "length": 5, "filename": "tests/deprecated_calls.sol", "lines": [9]}}]}, {"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": "expression", "expression": "sha3Result = sha3()(test deprecated sha3 usage)", "source_mapping": {"start": 542, "length": 55, "filename": "tests/deprecated_calls.sol", "lines": [16]}}]}, {"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": "expression", "expression": "blockHashResult = block.blockhash(0)", "source_mapping": {"start": 671, "length": 44, "filename": "tests/deprecated_calls.sol", "lines": [19]}}]}, {"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": "expression", "expression": "address(this).callcode()", "source_mapping": {"start": 785, "length": 24, "filename": "tests/deprecated_calls.sol", "lines": [22]}}]}, {"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": "expression", "expression": "suicide(address)(address(0))", "source_mapping": {"start": 878, "length": 19, "filename": "tests/deprecated_calls.sol", "lines": [25]}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"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": "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": [ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,182 @@ |
||||
[{"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": [{"type": "function", "name": "Approval", "source_mapping": {"start": 1148, "length": 59, "filename": "tests/erc20_indexed.sol", "lines": [20]}, "contract": {"type": "contract", "name": "IERC20Bad", "source_mapping": {"start": 622, "length": 587, "filename": "tests/erc20_indexed.sol", "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, {"type": "function", "name": "Approval", "source_mapping": {"start": 1148, "length": 59, "filename": "tests/erc20_indexed.sol", "lines": [20]}, "contract": {"type": "contract", "name": "IERC20Bad", "source_mapping": {"start": 622, "length": 587, "filename": "tests/erc20_indexed.sol", "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, {"type": "function", "name": "Transfer", "source_mapping": {"start": 1090, "length": 53, "filename": "tests/erc20_indexed.sol", "lines": [19]}, "contract": {"type": "contract", "name": "IERC20Bad", "source_mapping": {"start": 622, "length": 587, "filename": "tests/erc20_indexed.sol", "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, {"type": "function", "name": "Transfer", "source_mapping": {"start": 1090, "length": 53, "filename": "tests/erc20_indexed.sol", "lines": [19]}, "contract": {"type": "contract", "name": "IERC20Bad", "source_mapping": {"start": 622, "length": 587, "filename": "tests/erc20_indexed.sol", "lines": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}]}] |
||||
[ |
||||
{ |
||||
"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": [ |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"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 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,246 @@ |
||||
[{"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": "tests/external_function.sol", "lines": [13, 14, 15]}, "contract": {"type": "contract", "name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 213, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}]}, {"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": "tests/external_function.sol", "lines": [17, 18, 19]}, "contract": {"type": "contract", "name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 213, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}]}, {"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": "tests/external_function.sol", "lines": [21, 22, 23]}, "contract": {"type": "contract", "name": "ContractWithFunctionNotCalled", "source_mapping": {"start": 213, "length": 258, "filename": "tests/external_function.sol", "lines": [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]}}}]}, {"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": "tests/external_function.sol", "lines": [32, 33, 34, 35, 36, 37, 38, 39]}, "contract": {"type": "contract", "name": "ContractWithFunctionNotCalled2", "source_mapping": {"start": 473, "length": 408, "filename": "tests/external_function.sol", "lines": [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]}}}]}] |
||||
[ |
||||
{ |
||||
"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 |
||||
}, |
||||
"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 |
||||
}, |
||||
"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 |
||||
}, |
||||
"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": "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 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -0,0 +1 @@ |
||||
INFO:Slither:tests/external_function_2.sol analyzed (4 contracts), 0 result(s) found |
File diff suppressed because one or more lines are too long
@ -1 +1,256 @@ |
||||
[{"check": "erc20-interface", "impact": "Medium", "confidence": "High", "description": "Token (tests/incorrect_erc20_interface.sol#3-7) has incorrect ERC20 function interface(s):\n\t-transfer (tests/incorrect_erc20_interface.sol#5)\n", "elements": [{"type": "function", "name": "transfer", "source_mapping": {"start": 47, "length": 51, "filename": "tests/incorrect_erc20_interface.sol", "lines": [5]}, "contract": {"type": "contract", "name": "Token", "source_mapping": {"start": 26, "length": 75, "filename": "tests/incorrect_erc20_interface.sol", "lines": [3, 4, 5, 6, 7]}}}]}] |
||||
[ |
||||
{ |
||||
"check": "erc20-interface", |
||||
"impact": "Medium", |
||||
"confidence": "High", |
||||
"description": "Token (tests/incorrect_erc20_interface.sol#3-10) has incorrect ERC20 function interface(s):\n\t-transfer (tests/incorrect_erc20_interface.sol#4)\n\t-approve (tests/incorrect_erc20_interface.sol#5)\n\t-transferFrom (tests/incorrect_erc20_interface.sol#6)\n\t-totalSupply (tests/incorrect_erc20_interface.sol#7)\n\t-balanceOf (tests/incorrect_erc20_interface.sol#8)\n\t-allowance (tests/incorrect_erc20_interface.sol#9)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "allowance", |
||||
"source_mapping": { |
||||
"start": 319, |
||||
"length": 60, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
9 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 65 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "approve", |
||||
"source_mapping": { |
||||
"start": 102, |
||||
"length": 55, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
5 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 60 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "balanceOf", |
||||
"source_mapping": { |
||||
"start": 273, |
||||
"length": 41, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
8 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 46 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "totalSupply", |
||||
"source_mapping": { |
||||
"start": 236, |
||||
"length": 32, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 37 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "transfer", |
||||
"source_mapping": { |
||||
"start": 46, |
||||
"length": 51, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
4 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 56 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "transferFrom", |
||||
"source_mapping": { |
||||
"start": 162, |
||||
"length": 69, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 74 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 355, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc20_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc20_interface.sol", |
||||
"filename_short": "tests/incorrect_erc20_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -0,0 +1,442 @@ |
||||
[ |
||||
{ |
||||
"check": "erc721-interface", |
||||
"impact": "Medium", |
||||
"confidence": "High", |
||||
"description": "Token (tests/incorrect_erc721_interface.sol#6-16) has incorrect ERC721 function interface(s):\n\t-supportsInterface (tests/incorrect_erc721_interface.sol#4)\n\t-balanceOf (tests/incorrect_erc721_interface.sol#7)\n\t-ownerOf (tests/incorrect_erc721_interface.sol#8)\n\t-safeTransferFrom (tests/incorrect_erc721_interface.sol#9)\n\t-safeTransferFrom (tests/incorrect_erc721_interface.sol#10)\n\t-transferFrom (tests/incorrect_erc721_interface.sol#11)\n\t-approve (tests/incorrect_erc721_interface.sol#12)\n\t-setApprovalForAll (tests/incorrect_erc721_interface.sol#13)\n\t-getApproved (tests/incorrect_erc721_interface.sol#14)\n\t-isApprovedForAll (tests/incorrect_erc721_interface.sol#15)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "approve", |
||||
"source_mapping": { |
||||
"start": 549, |
||||
"length": 78, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
12 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 83 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "balanceOf", |
||||
"source_mapping": { |
||||
"start": 140, |
||||
"length": 44, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 49 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "getApproved", |
||||
"source_mapping": { |
||||
"start": 723, |
||||
"length": 48, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
14 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 53 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "isApprovedForAll", |
||||
"source_mapping": { |
||||
"start": 776, |
||||
"length": 70, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
15 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 75 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "ownerOf", |
||||
"source_mapping": { |
||||
"start": 189, |
||||
"length": 44, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
8 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 49 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "safeTransferFrom", |
||||
"source_mapping": { |
||||
"start": 238, |
||||
"length": 108, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
9 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 113 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "safeTransferFrom", |
||||
"source_mapping": { |
||||
"start": 351, |
||||
"length": 96, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 101 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "setApprovalForAll", |
||||
"source_mapping": { |
||||
"start": 632, |
||||
"length": 86, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
13 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 91 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "supportsInterface", |
||||
"source_mapping": { |
||||
"start": 50, |
||||
"length": 56, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
4 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 61 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC165", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 82, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "function", |
||||
"name": "transferFrom", |
||||
"source_mapping": { |
||||
"start": 452, |
||||
"length": 92, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
11 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 97 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Token", |
||||
"source_mapping": { |
||||
"start": 109, |
||||
"length": 739, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_relative": "tests/incorrect_erc721_interface.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_erc721_interface.sol", |
||||
"filename_short": "tests/incorrect_erc721_interface.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,104 @@ |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "GetCode.at uses assembly (tests/inline_assembly_contract-0.5.1.sol#6-20)\n\t- tests/inline_assembly_contract-0.5.1.sol#7-20\n", "elements": [{"type": "function", "name": "at", "source_mapping": {"start": 119, "length": 707, "filename": "tests/inline_assembly_contract-0.5.1.sol", "lines": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, "contract": {"type": "contract", "name": "GetCode", "source_mapping": {"start": 97, "length": 731, "filename": "tests/inline_assembly_contract-0.5.1.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 198, "length": 628, "filename": "tests/inline_assembly_contract-0.5.1.sol", "lines": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}}]}] |
||||
[ |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "GetCode.at uses assembly (tests/inline_assembly_contract-0.5.1.sol#6-20)\n\t- tests/inline_assembly_contract-0.5.1.sol#7-20\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "at", |
||||
"source_mapping": { |
||||
"start": 119, |
||||
"length": 707, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "GetCode", |
||||
"source_mapping": { |
||||
"start": 97, |
||||
"length": 731, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 198, |
||||
"length": 628, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_contract-0.5.1.sol", |
||||
"lines": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,104 @@ |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20)\n\t- tests/inline_assembly_contract.sol#7-20\n", "elements": [{"type": "function", "name": "at", "source_mapping": {"start": 119, "length": 700, "filename": "tests/inline_assembly_contract.sol", "lines": [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, "contract": {"type": "contract", "name": "GetCode", "source_mapping": {"start": 97, "length": 724, "filename": "tests/inline_assembly_contract.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 191, "length": 628, "filename": "tests/inline_assembly_contract.sol", "lines": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}}]}] |
||||
[ |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "GetCode.at uses assembly (tests/inline_assembly_contract.sol#6-20)\n\t- tests/inline_assembly_contract.sol#7-20\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "at", |
||||
"source_mapping": { |
||||
"start": 119, |
||||
"length": 700, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_relative": "tests/inline_assembly_contract.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_short": "tests/inline_assembly_contract.sol", |
||||
"lines": [ |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "GetCode", |
||||
"source_mapping": { |
||||
"start": 97, |
||||
"length": 724, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_relative": "tests/inline_assembly_contract.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_short": "tests/inline_assembly_contract.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 191, |
||||
"length": 628, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_relative": "tests/inline_assembly_contract.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_contract.sol", |
||||
"filename_short": "tests/inline_assembly_contract.sol", |
||||
"lines": [ |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,258 @@ |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#16-22)\n\t- tests/inline_assembly_library-0.5.1.sol#18-21\n", "elements": [{"type": "function", "name": "sumAsm", "source_mapping": {"start": 599, "length": 254, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [16, 17, 18, 19, 20, 21, 22]}, "contract": {"type": "contract", "name": "VectorSum", "source_mapping": {"start": 97, "length": 1602, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 733, "length": 114, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [18, 19, 20, 21]}}]}, {"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#25-47)\n\t- tests/inline_assembly_library-0.5.1.sol#26-47\n", "elements": [{"type": "function", "name": "sumPureAsm", "source_mapping": {"start": 936, "length": 761, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}, "contract": {"type": "contract", "name": "VectorSum", "source_mapping": {"start": 97, "length": 1602, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 1020, "length": 677, "filename": "tests/inline_assembly_library-0.5.1.sol", "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}}]}] |
||||
[ |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "VectorSum.sumAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#16-22)\n\t- tests/inline_assembly_library-0.5.1.sol#18-21\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "sumAsm", |
||||
"source_mapping": { |
||||
"start": 599, |
||||
"length": 254, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "VectorSum", |
||||
"source_mapping": { |
||||
"start": 97, |
||||
"length": 1602, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 733, |
||||
"length": 114, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 10 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library-0.5.1.sol#25-47)\n\t- tests/inline_assembly_library-0.5.1.sol#26-47\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "sumPureAsm", |
||||
"source_mapping": { |
||||
"start": 936, |
||||
"length": 761, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "VectorSum", |
||||
"source_mapping": { |
||||
"start": 97, |
||||
"length": 1602, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 1020, |
||||
"length": 677, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_relative": "tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library-0.5.1.sol", |
||||
"filename_short": "tests/inline_assembly_library-0.5.1.sol", |
||||
"lines": [ |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,258 @@ |
||||
[{"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumAsm uses assembly (tests/inline_assembly_library.sol#16-22)\n\t- tests/inline_assembly_library.sol#18-21\n", "elements": [{"type": "function", "name": "sumAsm", "source_mapping": {"start": 593, "length": 247, "filename": "tests/inline_assembly_library.sol", "lines": [16, 17, 18, 19, 20, 21, 22]}, "contract": {"type": "contract", "name": "VectorSum", "source_mapping": {"start": 98, "length": 1581, "filename": "tests/inline_assembly_library.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 720, "length": 114, "filename": "tests/inline_assembly_library.sol", "lines": [18, 19, 20, 21]}}]}, {"check": "assembly", "impact": "Informational", "confidence": "High", "description": "VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library.sol#25-47)\n\t- tests/inline_assembly_library.sol#26-47\n", "elements": [{"type": "function", "name": "sumPureAsm", "source_mapping": {"start": 923, "length": 754, "filename": "tests/inline_assembly_library.sol", "lines": [25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}, "contract": {"type": "contract", "name": "VectorSum", "source_mapping": {"start": 98, "length": 1581, "filename": "tests/inline_assembly_library.sol", "lines": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}}, {"type": "expression", "expression": "None", "source_mapping": {"start": 1000, "length": 677, "filename": "tests/inline_assembly_library.sol", "lines": [26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}}]}] |
||||
[ |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "VectorSum.sumAsm uses assembly (tests/inline_assembly_library.sol#16-22)\n\t- tests/inline_assembly_library.sol#18-21\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "sumAsm", |
||||
"source_mapping": { |
||||
"start": 593, |
||||
"length": 247, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "VectorSum", |
||||
"source_mapping": { |
||||
"start": 98, |
||||
"length": 1581, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 720, |
||||
"length": 114, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 10 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "assembly", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "VectorSum.sumPureAsm uses assembly (tests/inline_assembly_library.sol#25-47)\n\t- tests/inline_assembly_library.sol#26-47\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "sumPureAsm", |
||||
"source_mapping": { |
||||
"start": 923, |
||||
"length": 754, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "VectorSum", |
||||
"source_mapping": { |
||||
"start": 98, |
||||
"length": 1581, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "None", |
||||
"source_mapping": { |
||||
"start": 1000, |
||||
"length": 677, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_relative": "tests/inline_assembly_library.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/inline_assembly_library.sol", |
||||
"filename_short": "tests/inline_assembly_library.sol", |
||||
"lines": [ |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,69 @@ |
||||
[{"check": "locked-ether", "impact": "Medium", "confidence": "High", "description": "Contract locking ether found in tests/locked_ether-0.5.1.sol:\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether-0.5.1.sol#4-6)\n\tBut has not function to withdraw the ether\n", "elements": [{"type": "function", "name": "receive", "source_mapping": {"start": 46, "length": 72, "filename": "tests/locked_ether-0.5.1.sol", "lines": [4, 5, 6]}, "contract": {"type": "contract", "name": "Locked", "source_mapping": {"start": 24, "length": 97, "filename": "tests/locked_ether-0.5.1.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}, {"type": "contract", "name": "OnlyLocked", "source_mapping": {"start": 375, "length": 32, "filename": "tests/locked_ether-0.5.1.sol", "lines": [26]}}]}] |
||||
[ |
||||
{ |
||||
"check": "locked-ether", |
||||
"impact": "Medium", |
||||
"confidence": "High", |
||||
"description": "Contract locking ether found in :\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether-0.5.1.sol#4-6)\n\tBut does not have a function to withdraw the ether\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "receive", |
||||
"source_mapping": { |
||||
"start": 46, |
||||
"length": 72, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_relative": "tests/locked_ether-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_short": "tests/locked_ether-0.5.1.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Locked", |
||||
"source_mapping": { |
||||
"start": 24, |
||||
"length": 97, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_relative": "tests/locked_ether-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_short": "tests/locked_ether-0.5.1.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "contract", |
||||
"name": "OnlyLocked", |
||||
"source_mapping": { |
||||
"start": 375, |
||||
"length": 32, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_relative": "tests/locked_ether-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether-0.5.1.sol", |
||||
"filename_short": "tests/locked_ether-0.5.1.sol", |
||||
"lines": [ |
||||
26 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 33 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,69 @@ |
||||
[{"check": "locked-ether", "impact": "Medium", "confidence": "High", "description": "Contract locking ether found in tests/locked_ether.sol:\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether.sol#4-6)\n\tBut has not function to withdraw the ether\n", "elements": [{"type": "function", "name": "receive", "source_mapping": {"start": 47, "length": 72, "filename": "tests/locked_ether.sol", "lines": [4, 5, 6]}, "contract": {"type": "contract", "name": "Locked", "source_mapping": {"start": 25, "length": 97, "filename": "tests/locked_ether.sol", "lines": [2, 3, 4, 5, 6, 7, 8]}}}, {"type": "contract", "name": "OnlyLocked", "source_mapping": {"start": 368, "length": 32, "filename": "tests/locked_ether.sol", "lines": [26]}}]}] |
||||
[ |
||||
{ |
||||
"check": "locked-ether", |
||||
"impact": "Medium", |
||||
"confidence": "High", |
||||
"description": "Contract locking ether found in :\n\tContract OnlyLocked has payable functions:\n\t - receive (tests/locked_ether.sol#4-6)\n\tBut does not have a function to withdraw the ether\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "receive", |
||||
"source_mapping": { |
||||
"start": 47, |
||||
"length": 72, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_relative": "tests/locked_ether.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_short": "tests/locked_ether.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Locked", |
||||
"source_mapping": { |
||||
"start": 25, |
||||
"length": 97, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_relative": "tests/locked_ether.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_short": "tests/locked_ether.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "contract", |
||||
"name": "OnlyLocked", |
||||
"source_mapping": { |
||||
"start": 368, |
||||
"length": 32, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_relative": "tests/locked_ether.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/locked_ether.sol", |
||||
"filename_short": "tests/locked_ether.sol", |
||||
"lines": [ |
||||
26 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 33 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,67 @@ |
||||
[{"check": "low-level-calls", "impact": "Informational", "confidence": "High", "description": "Low level call in Sender.send (tests/low_level_calls.sol#5-7):\n\t-_receiver.call.value(msg.value).gas(7777)() tests/low_level_calls.sol#6\n", "elements": [{"type": "function", "name": "send", "source_mapping": {"start": 51, "length": 112, "filename": "tests/low_level_calls.sol", "lines": [5, 6, 7]}, "contract": {"type": "contract", "name": "Sender", "source_mapping": {"start": 29, "length": 136, "filename": "tests/low_level_calls.sol", "lines": [4, 5, 6, 7, 8]}}}, {"type": "expression", "expression": "_receiver.call.value(msg.value).gas(7777)()", "source_mapping": {"start": 111, "length": 45, "filename": "tests/low_level_calls.sol", "lines": [6]}}]}] |
||||
[ |
||||
{ |
||||
"check": "low-level-calls", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Low level call in Sender.send (tests/low_level_calls.sol#5-7):\n\t-_receiver.call.value(msg.value).gas(7777)() tests/low_level_calls.sol#6\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "send", |
||||
"source_mapping": { |
||||
"start": 51, |
||||
"length": 112, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_relative": "tests/low_level_calls.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_short": "tests/low_level_calls.sol", |
||||
"lines": [ |
||||
5, |
||||
6, |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Sender", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 136, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_relative": "tests/low_level_calls.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_short": "tests/low_level_calls.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "_receiver.call.value(msg.value).gas(7777)()", |
||||
"source_mapping": { |
||||
"start": 111, |
||||
"length": 45, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_relative": "tests/low_level_calls.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/low_level_calls.sol", |
||||
"filename_short": "tests/low_level_calls.sol", |
||||
"lines": [ |
||||
6 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 54 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,79 @@ |
||||
[{"check": "calls-loop", "impact": "Low", "confidence": "Medium", "description": "CallInLoop.bad has external calls inside a loop:\n\t- destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11)\n", "elements": [{"type": "function", "name": "bad", "source_mapping": {"start": 153, "length": 135, "filename": "tests/multiple_calls_in_loop.sol", "lines": [9, 10, 11, 12, 13]}, "contract": {"type": "contract", "name": "CallInLoop", "source_mapping": {"start": 0, "length": 291, "filename": "tests/multiple_calls_in_loop.sol", "lines": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]}}}, {"type": "expression", "expression": "destinations[i].transfer(i)", "source_mapping": {"start": 244, "length": 27, "filename": "tests/multiple_calls_in_loop.sol", "lines": [11]}}]}] |
||||
[ |
||||
{ |
||||
"check": "calls-loop", |
||||
"impact": "Low", |
||||
"confidence": "Medium", |
||||
"description": "CallInLoop.bad has external calls inside a loop:\n\t- destinations[i].transfer(i) (tests/multiple_calls_in_loop.sol#11)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "bad", |
||||
"source_mapping": { |
||||
"start": 153, |
||||
"length": 135, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_relative": "tests/multiple_calls_in_loop.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_short": "tests/multiple_calls_in_loop.sol", |
||||
"lines": [ |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "CallInLoop", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 291, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_relative": "tests/multiple_calls_in_loop.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_short": "tests/multiple_calls_in_loop.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "destinations[i].transfer(i)", |
||||
"source_mapping": { |
||||
"start": 244, |
||||
"length": 27, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_relative": "tests/multiple_calls_in_loop.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/multiple_calls_in_loop.sol", |
||||
"filename_short": "tests/multiple_calls_in_loop.sol", |
||||
"lines": [ |
||||
11 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 40 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,366 @@ |
||||
[{"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Contract 'naming' (tests/naming_convention.sol#3-48) is not in CapWords\n", "elements": [{"target": "contract", "convention": "CapWords", "name": "naming", "source_mapping": {"start": 28, "length": 642, "filename": "tests/naming_convention.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Struct 'naming.test' (tests/naming_convention.sol#14-16) is not in CapWords\n", "elements": [{"target": "structure", "convention": "CapWords", "name": "test", "source_mapping": {"start": 229, "length": 35, "filename": "tests/naming_convention.sol", "lines": [14, 15, 16]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Event 'naming.event_' (tests/naming_convention.sol#23) is not in CapWords\n", "elements": [{"target": "event", "convention": "CapWords", "name": "event_", "source_mapping": {"start": 335, "length": 19, "filename": "tests/naming_convention.sol", "lines": [23]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Function 'naming.GetOne' (tests/naming_convention.sol#30-33) is not in mixedCase\n", "elements": [{"target": "function", "convention": "mixedCase", "name": "GetOne", "source_mapping": {"start": 440, "length": 75, "filename": "tests/naming_convention.sol", "lines": [30, 31, 32, 33]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Parameter 'Number2' of naming.setInt (tests/naming_convention.sol#35) is not in mixedCase\n", "elements": [{"target": "parameter", "convention": "mixedCase", "name": "Number2", "source_mapping": {"start": 551, "length": 12, "filename": "tests/naming_convention.sol", "lines": [35]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Constant 'naming.MY_other_CONSTANT' (tests/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", "elements": [{"target": "variable_constant", "convention": "UPPER_CASE_WITH_UNDERSCORES", "name": "MY_other_CONSTANT", "source_mapping": {"start": 143, "length": 35, "filename": "tests/naming_convention.sol", "lines": [9]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Variable 'naming.Var_One' (tests/naming_convention.sol#11) is not in mixedCase\n", "elements": [{"target": "variable", "convention": "mixedCase", "name": "Var_One", "source_mapping": {"start": 185, "length": 16, "filename": "tests/naming_convention.sol", "lines": [11]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Enum 'naming.numbers' (tests/naming_convention.sol#6) is not in CapWords\n", "elements": [{"target": "enum", "convention": "CapWords", "name": "numbers", "source_mapping": {"start": 79, "length": 23, "filename": "tests/naming_convention.sol", "lines": [6]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Modifier 'naming.CantDo' (tests/naming_convention.sol#41-43) is not in mixedCase\n", "elements": [{"target": "modifier", "convention": "mixedCase", "name": "CantDo", "source_mapping": {"start": 591, "length": 36, "filename": "tests/naming_convention.sol", "lines": [41, 42, 43]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Parameter '_used' of T.test (tests/naming_convention.sol#59) is not in mixedCase\n", "elements": [{"target": "parameter", "convention": "mixedCase", "name": "_used", "source_mapping": {"start": 794, "length": 10, "filename": "tests/naming_convention.sol", "lines": [59]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Variable 'T._myPublicVar' (tests/naming_convention.sol#56) is not in mixedCase\n", "elements": [{"target": "variable", "convention": "mixedCase", "name": "_myPublicVar", "source_mapping": {"start": 741, "length": 17, "filename": "tests/naming_convention.sol", "lines": [56]}}]}, {"check": "naming-convention", "impact": "Informational", "confidence": "High", "description": "Variable 'T.l' (tests/naming_convention.sol#67) used l, O, I, which should not be used\n", "elements": [{"target": "variable", "convention": "l_O_I_should_not_be_used", "name": "l", "source_mapping": {"start": 900, "length": 10, "filename": "tests/naming_convention.sol", "lines": [67]}}]}] |
||||
[ |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Contract 'naming' (tests/naming_convention.sol#3-48) is not in CapWords\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "contract", |
||||
"convention": "CapWords", |
||||
"name": "naming", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 642, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Struct 'naming.test' (tests/naming_convention.sol#14-16) is not in CapWords\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "structure", |
||||
"convention": "CapWords", |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"start": 229, |
||||
"length": 35, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Event 'naming.event_' (tests/naming_convention.sol#23) is not in CapWords\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "event", |
||||
"convention": "CapWords", |
||||
"name": "event_", |
||||
"source_mapping": { |
||||
"start": 335, |
||||
"length": 19, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
23 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 24 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Function 'naming.GetOne' (tests/naming_convention.sol#30-33) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "function", |
||||
"convention": "mixedCase", |
||||
"name": "GetOne", |
||||
"source_mapping": { |
||||
"start": 440, |
||||
"length": 75, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
30, |
||||
31, |
||||
32, |
||||
33 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Parameter 'Number2' of naming.setInt (tests/naming_convention.sol#35) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "parameter", |
||||
"convention": "mixedCase", |
||||
"name": "Number2", |
||||
"source_mapping": { |
||||
"start": 551, |
||||
"length": 12, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
35 |
||||
], |
||||
"starting_column": 35, |
||||
"ending_column": 47 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Constant 'naming.MY_other_CONSTANT' (tests/naming_convention.sol#9) is not in UPPER_CASE_WITH_UNDERSCORES\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "variable_constant", |
||||
"convention": "UPPER_CASE_WITH_UNDERSCORES", |
||||
"name": "MY_other_CONSTANT", |
||||
"source_mapping": { |
||||
"start": 143, |
||||
"length": 35, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
9 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 40 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Variable 'naming.Var_One' (tests/naming_convention.sol#11) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "variable", |
||||
"convention": "mixedCase", |
||||
"name": "Var_One", |
||||
"source_mapping": { |
||||
"start": 185, |
||||
"length": 16, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
11 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 21 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Enum 'naming.numbers' (tests/naming_convention.sol#6) is not in CapWords\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "enum", |
||||
"convention": "CapWords", |
||||
"name": "numbers", |
||||
"source_mapping": { |
||||
"start": 79, |
||||
"length": 23, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
6 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 28 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Modifier 'naming.CantDo' (tests/naming_convention.sol#41-43) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "modifier", |
||||
"convention": "mixedCase", |
||||
"name": "CantDo", |
||||
"source_mapping": { |
||||
"start": 591, |
||||
"length": 36, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
41, |
||||
42, |
||||
43 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Parameter '_used' of T.test (tests/naming_convention.sol#59) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "parameter", |
||||
"convention": "mixedCase", |
||||
"name": "_used", |
||||
"source_mapping": { |
||||
"start": 794, |
||||
"length": 10, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
59 |
||||
], |
||||
"starting_column": 33, |
||||
"ending_column": 43 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Variable 'T._myPublicVar' (tests/naming_convention.sol#56) is not in mixedCase\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "variable", |
||||
"convention": "mixedCase", |
||||
"name": "_myPublicVar", |
||||
"source_mapping": { |
||||
"start": 741, |
||||
"length": 17, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
56 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 22 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "naming-convention", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Variable 'T.l' (tests/naming_convention.sol#67) used l, O, I, which should not be used\n", |
||||
"elements": [ |
||||
{ |
||||
"target": "variable", |
||||
"convention": "l_O_I_should_not_be_used", |
||||
"name": "l", |
||||
"source_mapping": { |
||||
"start": 900, |
||||
"length": 10, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_relative": "tests/naming_convention.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/naming_convention.sol", |
||||
"filename_short": "tests/naming_convention.sol", |
||||
"lines": [ |
||||
67 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 15 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,25 @@ |
||||
[{"check": "solc-version", "impact": "Informational", "confidence": "High", "description": "Detected issues with version pragma in tests/old_solc.sol.json:\n\t- pragma solidity0.4.21 (old_solc.sol): it allows old versions\n", "elements": [{"type": "expression", "expression": "0.4.21", "source_mapping": {"start": 0, "length": 23, "filename": "old_solc.sol", "lines": []}}]}] |
||||
[ |
||||
{ |
||||
"check": "solc-version", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Detected issues with version pragma in tests/old_solc.sol.json:\n\t- pragma solidity0.4.21 (None): it allows old versions\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "expression", |
||||
"expression": "0.4.21", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 23, |
||||
"filename_used": "old_solc.sol", |
||||
"filename_relative": null, |
||||
"filename_absolute": null, |
||||
"filename_short": null, |
||||
"lines": [], |
||||
"starting_column": null, |
||||
"ending_column": null |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -1 +1,44 @@ |
||||
[{"check": "pragma", "impact": "Informational", "confidence": "High", "description": "Different versions of Solidity is used in tests/pragma.0.4.24.sol:\n\t- Version used: ['^0.4.23', '^0.4.24']\n\t- tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23\n\t- tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24\n", "elements": [{"type": "expression", "expression": "^0.4.23", "source_mapping": {"start": 0, "length": 24, "filename": "tests/pragma.0.4.23.sol", "lines": [1]}}, {"type": "expression", "expression": "^0.4.24", "source_mapping": {"start": 0, "length": 24, "filename": "tests/pragma.0.4.24.sol", "lines": [1]}}]}] |
||||
[ |
||||
{ |
||||
"check": "pragma", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "Different versions of Solidity is used in :\n\t- Version used: ['^0.4.23', '^0.4.24']\n\t- tests/pragma.0.4.23.sol#1 declares pragma solidity^0.4.23\n\t- tests/pragma.0.4.24.sol#1 declares pragma solidity^0.4.24\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "expression", |
||||
"expression": "^0.4.23", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 24, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/pragma.0.4.23.sol", |
||||
"filename_relative": "tests/pragma.0.4.23.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/pragma.0.4.23.sol", |
||||
"filename_short": "tests/pragma.0.4.23.sol", |
||||
"lines": [ |
||||
1 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 25 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "expression", |
||||
"expression": "^0.4.24", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 24, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/pragma.0.4.24.sol", |
||||
"filename_relative": "tests/pragma.0.4.24.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/pragma.0.4.24.sol", |
||||
"filename_short": "tests/pragma.0.4.24.sol", |
||||
"lines": [ |
||||
1 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 25 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -0,0 +1,8 @@ |
||||
ERROR:Slither:Invalid compilation |
||||
ERROR:Slither:Invalid solc compilation tests/pragma.0.4.23.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.5.1+commit.c8a2cb62.Linux.g++ - note that nightly builds are considered to be strictly less than the released version |
||||
pragma solidity ^0.4.23; |
||||
^----------------------^ |
||||
tests/pragma.0.4.24.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.5.1+commit.c8a2cb62.Linux.g++ - note that nightly builds are considered to be strictly less than the released version |
||||
pragma solidity ^0.4.24; |
||||
^----------------------^ |
||||
|
@ -1 +1,275 @@ |
||||
[{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium", "description": "Reentrancy in Reentrancy.withdrawBalance (tests/reentrancy-0.5.1.sol#14-22):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/reentrancy-0.5.1.sol#17)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy-0.5.1.sol#21)\n", "elements": [{"type": "function", "name": "withdrawBalance", "source_mapping": {"start": 298, "length": 357, "filename": "tests/reentrancy-0.5.1.sol", "lines": [14, 15, 16, 17, 18, 19, 20, 21, 22]}, "contract": {"type": "contract", "name": "Reentrancy", "source_mapping": {"start": 25, "length": 1807, "filename": "tests/reentrancy-0.5.1.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54]}}}, {"type": "external_calls", "expression": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", "source_mapping": {"start": 477, "length": 81, "filename": "tests/reentrancy-0.5.1.sol", "lines": [17]}}, {"type": "variables_written", "name": "userBalance", "expression": "userBalance[msg.sender] = 0", "source_mapping": {"start": 621, "length": 27, "filename": "tests/reentrancy-0.5.1.sol", "lines": [21]}}]}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium", "description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3 (tests/reentrancy-0.5.1.sol#44-53):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/reentrancy-0.5.1.sol#49)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy-0.5.1.sol#51)\n", "elements": [{"type": "function", "name": "withdrawBalance_fixed_3", "source_mapping": {"start": 1434, "length": 393, "filename": "tests/reentrancy-0.5.1.sol", "lines": [44, 45, 46, 47, 48, 49, 50, 51, 52, 53]}, "contract": {"type": "contract", "name": "Reentrancy", "source_mapping": {"start": 25, "length": 1807, "filename": "tests/reentrancy-0.5.1.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54]}}}, {"type": "external_calls", "expression": "(ret,mem) = msg.sender.call.value(amount)()", "source_mapping": {"start": 1679, "length": 64, "filename": "tests/reentrancy-0.5.1.sol", "lines": [49]}}, {"type": "variables_written", "name": "userBalance", "expression": "userBalance[msg.sender] = amount", "source_mapping": {"start": 1778, "length": 32, "filename": "tests/reentrancy-0.5.1.sol", "lines": [51]}}]}] |
||||
[ |
||||
{ |
||||
"check": "reentrancy-eth", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Reentrancy in Reentrancy.withdrawBalance (tests/reentrancy-0.5.1.sol#14-22):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(userBalance[msg.sender])() (tests/reentrancy-0.5.1.sol#17)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy-0.5.1.sol#21)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "withdrawBalance", |
||||
"source_mapping": { |
||||
"start": 298, |
||||
"length": 357, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Reentrancy", |
||||
"source_mapping": { |
||||
"start": 25, |
||||
"length": 1807, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52, |
||||
53, |
||||
54 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "external_calls", |
||||
"expression": "(ret,mem) = msg.sender.call.value(userBalance[msg.sender])()", |
||||
"source_mapping": { |
||||
"start": 477, |
||||
"length": 81, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
17 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 90 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variables_written", |
||||
"name": "userBalance", |
||||
"expression": "userBalance[msg.sender] = 0", |
||||
"source_mapping": { |
||||
"start": 621, |
||||
"length": 27, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
21 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 36 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "reentrancy-eth", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Reentrancy in Reentrancy.withdrawBalance_fixed_3 (tests/reentrancy-0.5.1.sol#44-53):\n\tExternal calls:\n\t- (ret,mem) = msg.sender.call.value(amount)() (tests/reentrancy-0.5.1.sol#49)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy-0.5.1.sol#51)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "withdrawBalance_fixed_3", |
||||
"source_mapping": { |
||||
"start": 1434, |
||||
"length": 393, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52, |
||||
53 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Reentrancy", |
||||
"source_mapping": { |
||||
"start": 25, |
||||
"length": 1807, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52, |
||||
53, |
||||
54 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "external_calls", |
||||
"expression": "(ret,mem) = msg.sender.call.value(amount)()", |
||||
"source_mapping": { |
||||
"start": 1679, |
||||
"length": 64, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
49 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 73 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variables_written", |
||||
"name": "userBalance", |
||||
"expression": "userBalance[msg.sender] = amount", |
||||
"source_mapping": { |
||||
"start": 1778, |
||||
"length": 32, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_relative": "tests/reentrancy-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy-0.5.1.sol", |
||||
"filename_short": "tests/reentrancy-0.5.1.sol", |
||||
"lines": [ |
||||
51 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 45 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
@ -0,0 +1,10 @@ |
||||
Traceback (most recent call last): |
||||
File "/home/monty/Envs/slither/bin/slither", line 11, in <module> |
||||
load_entry_point('slither-analyzer', 'console_scripts', 'slither')() |
||||
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 469, in main |
||||
main_impl(all_detector_classes=detectors, all_printer_classes=printers) |
||||
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 483, in main_impl |
||||
detector_classes = choose_detectors(args, all_detector_classes) |
||||
File "/home/monty/Private/tob/tools/slither-public/slither/__main__.py", line 176, in choose_detectors |
||||
raise Exception('Error: {} is not a detector'.format(d)) |
||||
Exception: Error: reentrancy is not a detector |
@ -1 +1,309 @@ |
||||
[{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium", "description": "Reentrancy in Reentrancy.withdrawBalance (tests/reentrancy.sol#14-21):\n\tExternal calls:\n\t- ! (msg.sender.call.value(userBalance[msg.sender])()) (tests/reentrancy.sol#17-19)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy.sol#20)\n", "elements": [{"type": "function", "name": "withdrawBalance", "source_mapping": {"start": 299, "length": 314, "filename": "tests/reentrancy.sol", "lines": [14, 15, 16, 17, 18, 19, 20, 21]}, "contract": {"type": "contract", "name": "Reentrancy", "source_mapping": {"start": 26, "length": 2334, "filename": "tests/reentrancy.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72]}}}, {"type": "external_calls", "expression": "! (msg.sender.call.value(userBalance[msg.sender])())", "source_mapping": {"start": 478, "length": 92, "filename": "tests/reentrancy.sol", "lines": [17, 18, 19]}}, {"type": "variables_written", "name": "userBalance", "expression": "userBalance[msg.sender] = 0", "source_mapping": {"start": 579, "length": 27, "filename": "tests/reentrancy.sol", "lines": [20]}}]}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium", "description": "Reentrancy in Reentrancy.withdrawBalance_nested (tests/reentrancy.sol#64-70):\n\tExternal calls:\n\t- msg.sender.call.value(amount / 2)() (tests/reentrancy.sol#67)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy.sol#68)\n", "elements": [{"type": "function", "name": "withdrawBalance_nested", "source_mapping": {"start": 2108, "length": 246, "filename": "tests/reentrancy.sol", "lines": [64, 65, 66, 67, 68, 69, 70]}, "contract": {"type": "contract", "name": "Reentrancy", "source_mapping": {"start": 26, "length": 2334, "filename": "tests/reentrancy.sol", "lines": [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72]}}}, {"type": "external_calls", "expression": "msg.sender.call.value(amount / 2)()", "source_mapping": {"start": 2263, "length": 33, "filename": "tests/reentrancy.sol", "lines": [67]}}, {"type": "variables_written", "name": "userBalance", "expression": "userBalance[msg.sender] = 0", "source_mapping": {"start": 2310, "length": 27, "filename": "tests/reentrancy.sol", "lines": [68]}}]}] |
||||
[ |
||||
{ |
||||
"check": "reentrancy-eth", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Reentrancy in Reentrancy.withdrawBalance (tests/reentrancy.sol#14-21):\n\tExternal calls:\n\t- ! (msg.sender.call.value(userBalance[msg.sender])()) (tests/reentrancy.sol#17-19)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy.sol#20)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "withdrawBalance", |
||||
"source_mapping": { |
||||
"start": 299, |
||||
"length": 314, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Reentrancy", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 2334, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52, |
||||
53, |
||||
54, |
||||
55, |
||||
56, |
||||
57, |
||||
58, |
||||
59, |
||||
60, |
||||
61, |
||||
62, |
||||
63, |
||||
64, |
||||
65, |
||||
66, |
||||
67, |
||||
68, |
||||
69, |
||||
70, |
||||
71, |
||||
72 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "external_calls", |
||||
"expression": "! (msg.sender.call.value(userBalance[msg.sender])())", |
||||
"source_mapping": { |
||||
"start": 478, |
||||
"length": 92, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
17, |
||||
18, |
||||
19 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 10 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variables_written", |
||||
"name": "userBalance", |
||||
"expression": "userBalance[msg.sender] = 0", |
||||
"source_mapping": { |
||||
"start": 579, |
||||
"length": 27, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
20 |
||||
], |
||||
"starting_column": 9, |
||||
"ending_column": 36 |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "reentrancy-eth", |
||||
"impact": "High", |
||||
"confidence": "Medium", |
||||
"description": "Reentrancy in Reentrancy.withdrawBalance_nested (tests/reentrancy.sol#64-70):\n\tExternal calls:\n\t- msg.sender.call.value(amount / 2)() (tests/reentrancy.sol#67)\n\tState variables written after the call(s):\n\t- userBalance (tests/reentrancy.sol#68)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "function", |
||||
"name": "withdrawBalance_nested", |
||||
"source_mapping": { |
||||
"start": 2108, |
||||
"length": 246, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
64, |
||||
65, |
||||
66, |
||||
67, |
||||
68, |
||||
69, |
||||
70 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Reentrancy", |
||||
"source_mapping": { |
||||
"start": 26, |
||||
"length": 2334, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37, |
||||
38, |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52, |
||||
53, |
||||
54, |
||||
55, |
||||
56, |
||||
57, |
||||
58, |
||||
59, |
||||
60, |
||||
61, |
||||
62, |
||||
63, |
||||
64, |
||||
65, |
||||
66, |
||||
67, |
||||
68, |
||||
69, |
||||
70, |
||||
71, |
||||
72 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "external_calls", |
||||
"expression": "msg.sender.call.value(amount / 2)()", |
||||
"source_mapping": { |
||||
"start": 2263, |
||||
"length": 33, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
67 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 46 |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variables_written", |
||||
"name": "userBalance", |
||||
"expression": "userBalance[msg.sender] = 0", |
||||
"source_mapping": { |
||||
"start": 2310, |
||||
"length": 27, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_relative": "tests/reentrancy.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/reentrancy.sol", |
||||
"filename_short": "tests/reentrancy.sol", |
||||
"lines": [ |
||||
68 |
||||
], |
||||
"starting_column": 13, |
||||
"ending_column": 40 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue