mirror of https://github.com/crytic/slither
commit
fda131811e
@ -0,0 +1,21 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
||||||
|
### Install requisites |
||||||
|
|
||||||
|
pip3.6 install pybind11 |
||||||
|
pip3.6 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip |
||||||
|
|
||||||
|
### Test slither-simil |
||||||
|
|
||||||
|
DIR_TESTS="tests/simil" |
||||||
|
slither-simil info "" --filename $DIR_TESTS/../complex_func.sol --fname Complex.complexExternalWrites --solc solc-0.4.25 > test_1.txt 2>&1 |
||||||
|
DIFF=$(diff test_1.txt "$DIR_TESTS/test_1.txt") |
||||||
|
if [ "$DIFF" != "" ] |
||||||
|
then |
||||||
|
echo "slither-simil failed" |
||||||
|
cat test_1.txt |
||||||
|
cat "$DIR_TESTS/test_1.txt" |
||||||
|
exit -1 |
||||||
|
fi |
||||||
|
|
||||||
|
rm test_1.txt |
@ -0,0 +1,13 @@ |
|||||||
|
|
||||||
|
class ChildInheritance: |
||||||
|
|
||||||
|
def __init__(self): |
||||||
|
super(ChildInheritance, self).__init__() |
||||||
|
self._contract_declarer = None |
||||||
|
|
||||||
|
def set_contract_declarer(self, contract): |
||||||
|
self._contract_declarer = contract |
||||||
|
|
||||||
|
@property |
||||||
|
def contract_declarer(self): |
||||||
|
return self._contract_declarer |
@ -0,0 +1,23 @@ |
|||||||
|
from slither.core.solidity_types.type import Type |
||||||
|
|
||||||
|
# Use to model the Type(X) function, which returns an undefined type |
||||||
|
# https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#type-information |
||||||
|
class TypeInformation(Type): |
||||||
|
def __init__(self, c): |
||||||
|
from slither.core.declarations.contract import Contract |
||||||
|
|
||||||
|
assert isinstance(c, (Contract)) |
||||||
|
super(TypeInformation, self).__init__() |
||||||
|
self._type = c |
||||||
|
|
||||||
|
@property |
||||||
|
def type(self): |
||||||
|
return self._type |
||||||
|
|
||||||
|
def __str__(self): |
||||||
|
return f'type({self.type.name})' |
||||||
|
|
||||||
|
def __eq__(self, other): |
||||||
|
if not isinstance(other, TypeInformation): |
||||||
|
return False |
||||||
|
return self.type == other.type |
@ -1,56 +1,61 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "backdoor", |
{ |
||||||
"impact": "High", |
"check": "backdoor", |
||||||
"confidence": "High", |
"impact": "High", |
||||||
"description": "Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)\n", |
"confidence": "High", |
||||||
"elements": [ |
"description": "Backdoor function found in C.i_am_a_backdoor (tests/backdoor.sol#4-6)\n", |
||||||
{ |
"elements": [ |
||||||
"type": "function", |
{ |
||||||
"name": "i_am_a_backdoor", |
"type": "function", |
||||||
"source_mapping": { |
"name": "i_am_a_backdoor", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 1, |
"start": 18, |
||||||
"length": 94, |
"length": 74, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
"filename_relative": "tests/backdoor.sol", |
"filename_relative": "tests/backdoor.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
"filename_short": "tests/backdoor.sol", |
"filename_short": "tests/backdoor.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
2, |
|
||||||
3, |
|
||||||
4, |
4, |
||||||
5, |
5, |
||||||
6, |
6 |
||||||
7, |
|
||||||
8 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "C", |
||||||
|
"source_mapping": { |
||||||
|
"start": 1, |
||||||
|
"length": 94, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
|
"filename_relative": "tests/backdoor.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
|
"filename_short": "tests/backdoor.sol", |
||||||
|
"lines": [ |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "i_am_a_backdoor()" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
@ -1,56 +1,61 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "suicidal", |
{ |
||||||
"impact": "High", |
"check": "suicidal", |
||||||
"confidence": "High", |
"impact": "High", |
||||||
"description": "C.i_am_a_backdoor (tests/backdoor.sol#4-6) allows anyone to destruct the contract\n", |
"confidence": "High", |
||||||
"elements": [ |
"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", |
"type": "function", |
||||||
"source_mapping": { |
"name": "i_am_a_backdoor", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 1, |
"start": 18, |
||||||
"length": 94, |
"length": 74, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
"filename_relative": "tests/backdoor.sol", |
"filename_relative": "tests/backdoor.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
"filename_short": "tests/backdoor.sol", |
"filename_short": "tests/backdoor.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
2, |
|
||||||
3, |
|
||||||
4, |
4, |
||||||
5, |
5, |
||||||
6, |
6 |
||||||
7, |
|
||||||
8 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "C", |
||||||
|
"source_mapping": { |
||||||
|
"start": 1, |
||||||
|
"length": 94, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
|
"filename_relative": "tests/backdoor.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||||
|
"filename_short": "tests/backdoor.sol", |
||||||
|
"lines": [ |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "i_am_a_backdoor()" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
@ -1,348 +1,362 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "constable-states", |
{ |
||||||
"impact": "Informational", |
"check": "constable-states", |
||||||
"confidence": "High", |
"impact": "Informational", |
||||||
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n", |
"confidence": "High", |
||||||
"elements": [ |
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n", |
||||||
{ |
"elements": [ |
||||||
"type": "variable", |
{ |
||||||
"name": "myFriendsAddress", |
"type": "variable", |
||||||
"source_mapping": { |
"name": "myFriendsAddress", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "A", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 29, |
"start": 132, |
||||||
"length": 441, |
"length": 76, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
4, |
7 |
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 81 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "A", |
||||||
|
"source_mapping": { |
||||||
|
"start": 29, |
||||||
|
"length": 441, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "constable-states", |
||||||
"check": "constable-states", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n", |
||||||
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "variable", |
||||||
"type": "variable", |
"name": "test", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "A", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 29, |
"start": 237, |
||||||
"length": 441, |
"length": 20, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
4, |
10 |
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 25 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "A", |
||||||
|
"source_mapping": { |
||||||
|
"start": 29, |
||||||
|
"length": 441, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "constable-states", |
||||||
"check": "constable-states", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n", |
||||||
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "variable", |
||||||
"type": "variable", |
"name": "text2", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "A", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 29, |
"start": 333, |
||||||
"length": 441, |
"length": 20, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
4, |
14 |
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 25 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "A", |
||||||
|
"source_mapping": { |
||||||
|
"start": 29, |
||||||
|
"length": 441, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "constable-states", |
||||||
"check": "constable-states", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", |
||||||
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "variable", |
||||||
"type": "variable", |
"name": "mySistersAddress", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "B", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 473, |
"start": 496, |
||||||
"length": 271, |
"length": 76, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
24, |
26 |
||||||
25, |
|
||||||
26, |
|
||||||
27, |
|
||||||
28, |
|
||||||
29, |
|
||||||
30, |
|
||||||
31, |
|
||||||
32, |
|
||||||
33, |
|
||||||
34, |
|
||||||
35, |
|
||||||
36, |
|
||||||
37 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 81 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "B", |
||||||
|
"source_mapping": { |
||||||
|
"start": 473, |
||||||
|
"length": 271, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
24, |
||||||
|
25, |
||||||
|
26, |
||||||
|
27, |
||||||
|
28, |
||||||
|
29, |
||||||
|
30, |
||||||
|
31, |
||||||
|
32, |
||||||
|
33, |
||||||
|
34, |
||||||
|
35, |
||||||
|
36, |
||||||
|
37 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "constable-states", |
||||||
"check": "constable-states", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\n", |
||||||
"description": "MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "variable", |
||||||
"type": "variable", |
"name": "should_be_constant", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "MyConc", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 746, |
"start": 793, |
||||||
"length": 342, |
"length": 42, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
39, |
42 |
||||||
40, |
|
||||||
41, |
|
||||||
42, |
|
||||||
43, |
|
||||||
44, |
|
||||||
45, |
|
||||||
46, |
|
||||||
47, |
|
||||||
48, |
|
||||||
49, |
|
||||||
50, |
|
||||||
51, |
|
||||||
52 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 47 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "MyConc", |
||||||
|
"source_mapping": { |
||||||
|
"start": 746, |
||||||
|
"length": 342, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
39, |
||||||
|
40, |
||||||
|
41, |
||||||
|
42, |
||||||
|
43, |
||||||
|
44, |
||||||
|
45, |
||||||
|
46, |
||||||
|
47, |
||||||
|
48, |
||||||
|
49, |
||||||
|
50, |
||||||
|
51, |
||||||
|
52 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "constable-states", |
||||||
"check": "constable-states", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n", |
||||||
"description": "MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "variable", |
||||||
"type": "variable", |
"name": "should_be_constant_2", |
||||||
"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 |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "MyConc", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 746, |
"start": 841, |
||||||
"length": 342, |
"length": 33, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
"filename_short": "tests/const_state_variables.sol", |
"filename_short": "tests/const_state_variables.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
39, |
43 |
||||||
40, |
|
||||||
41, |
|
||||||
42, |
|
||||||
43, |
|
||||||
44, |
|
||||||
45, |
|
||||||
46, |
|
||||||
47, |
|
||||||
48, |
|
||||||
49, |
|
||||||
50, |
|
||||||
51, |
|
||||||
52 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 38 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "MyConc", |
||||||
|
"source_mapping": { |
||||||
|
"start": 746, |
||||||
|
"length": 342, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_relative": "tests/const_state_variables.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||||
|
"filename_short": "tests/const_state_variables.sol", |
||||||
|
"lines": [ |
||||||
|
39, |
||||||
|
40, |
||||||
|
41, |
||||||
|
42, |
||||||
|
43, |
||||||
|
44, |
||||||
|
45, |
||||||
|
46, |
||||||
|
47, |
||||||
|
48, |
||||||
|
49, |
||||||
|
50, |
||||||
|
51, |
||||||
|
52 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
@ -1,70 +1,75 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "constant-function", |
{ |
||||||
"impact": "Medium", |
"check": "constant-function", |
||||||
"confidence": "Medium", |
"impact": "Medium", |
||||||
"description": "Constant.test_assembly_bug (tests/constant-0.5.1.sol#15-17) is declared view but contains assembly code\n", |
"confidence": "Medium", |
||||||
"elements": [ |
"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", |
"type": "function", |
||||||
"source_mapping": { |
"name": "test_assembly_bug", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 185, |
||||||
"length": 253, |
"length": 66, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||||
"filename_relative": "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_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||||
"filename_short": "tests/constant-0.5.1.sol", |
"filename_short": "tests/constant-0.5.1.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
|
||||||
2, |
|
||||||
3, |
|
||||||
4, |
|
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
15, |
||||||
16, |
16, |
||||||
17, |
17 |
||||||
18 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 253, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||||
|
"filename_relative": "tests/constant-0.5.1.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||||
|
"filename_short": "tests/constant-0.5.1.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "test_assembly_bug()" |
||||||
} |
} |
||||||
} |
} |
||||||
|
], |
||||||
|
"additional_fields": { |
||||||
|
"contains_assembly": true |
||||||
} |
} |
||||||
], |
|
||||||
"additional_fields": { |
|
||||||
"contains_assembly": true |
|
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
@ -1,335 +1,350 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "constant-function", |
{ |
||||||
"impact": "Medium", |
"check": "constant-function", |
||||||
"confidence": "Medium", |
"impact": "Medium", |
||||||
"description": "Constant.test_view_bug (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a\n", |
"confidence": "Medium", |
||||||
"elements": [ |
"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", |
"type": "function", |
||||||
"source_mapping": { |
"name": "test_view_bug", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 45, |
||||||
"length": 392, |
"length": 58, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_relative": "tests/constant.sol", |
"filename_relative": "tests/constant.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_short": "tests/constant.sol", |
"filename_short": "tests/constant.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
|
||||||
2, |
|
||||||
3, |
|
||||||
4, |
|
||||||
5, |
5, |
||||||
6, |
6, |
||||||
7, |
7 |
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21, |
|
||||||
22, |
|
||||||
23, |
|
||||||
24, |
|
||||||
25 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 392, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_relative": "tests/constant.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_short": "tests/constant.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21, |
||||||
|
22, |
||||||
|
23, |
||||||
|
24, |
||||||
|
25 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "test_view_bug()" |
||||||
} |
} |
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
"type": "variable", |
|
||||||
"name": "a", |
|
||||||
"source_mapping": { |
|
||||||
"start": 28, |
|
||||||
"length": 6, |
|
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
|
||||||
"filename_relative": "tests/constant.sol", |
|
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
|
||||||
"filename_short": "tests/constant.sol", |
|
||||||
"lines": [ |
|
||||||
3 |
|
||||||
], |
|
||||||
"starting_column": 5, |
|
||||||
"ending_column": 11 |
|
||||||
}, |
}, |
||||||
"contract": { |
{ |
||||||
"type": "contract", |
"type": "variable", |
||||||
"name": "Constant", |
"name": "a", |
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 28, |
||||||
"length": 392, |
"length": 6, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_relative": "tests/constant.sol", |
"filename_relative": "tests/constant.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_short": "tests/constant.sol", |
"filename_short": "tests/constant.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
3 |
||||||
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, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 11 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 392, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_relative": "tests/constant.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_short": "tests/constant.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21, |
||||||
|
22, |
||||||
|
23, |
||||||
|
24, |
||||||
|
25 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
], |
||||||
|
"additional_fields": { |
||||||
|
"contains_assembly": false |
||||||
} |
} |
||||||
], |
}, |
||||||
"additional_fields": { |
{ |
||||||
"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", |
||||||
"check": "constant-function", |
"elements": [ |
||||||
"impact": "Medium", |
{ |
||||||
"confidence": "Medium", |
"type": "function", |
||||||
"description": "Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a\n", |
"name": "test_constant_bug", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 113, |
||||||
"length": 392, |
"length": 66, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_relative": "tests/constant.sol", |
"filename_relative": "tests/constant.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_short": "tests/constant.sol", |
"filename_short": "tests/constant.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
|
||||||
2, |
|
||||||
3, |
|
||||||
4, |
|
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
9, |
||||||
10, |
10, |
||||||
11, |
11 |
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21, |
|
||||||
22, |
|
||||||
23, |
|
||||||
24, |
|
||||||
25 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 392, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_relative": "tests/constant.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_short": "tests/constant.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21, |
||||||
|
22, |
||||||
|
23, |
||||||
|
24, |
||||||
|
25 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "test_constant_bug()" |
||||||
} |
} |
||||||
} |
|
||||||
}, |
|
||||||
{ |
|
||||||
"type": "variable", |
|
||||||
"name": "a", |
|
||||||
"source_mapping": { |
|
||||||
"start": 28, |
|
||||||
"length": 6, |
|
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
|
||||||
"filename_relative": "tests/constant.sol", |
|
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
|
||||||
"filename_short": "tests/constant.sol", |
|
||||||
"lines": [ |
|
||||||
3 |
|
||||||
], |
|
||||||
"starting_column": 5, |
|
||||||
"ending_column": 11 |
|
||||||
}, |
}, |
||||||
"contract": { |
{ |
||||||
"type": "contract", |
"type": "variable", |
||||||
"name": "Constant", |
"name": "a", |
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 28, |
||||||
"length": 392, |
"length": 6, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_relative": "tests/constant.sol", |
"filename_relative": "tests/constant.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_short": "tests/constant.sol", |
"filename_short": "tests/constant.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
3 |
||||||
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, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 11 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 392, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_relative": "tests/constant.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_short": "tests/constant.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21, |
||||||
|
22, |
||||||
|
23, |
||||||
|
24, |
||||||
|
25 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
} |
} |
||||||
|
], |
||||||
|
"additional_fields": { |
||||||
|
"contains_assembly": false |
||||||
} |
} |
||||||
], |
}, |
||||||
"additional_fields": { |
{ |
||||||
"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", |
||||||
"check": "constant-function", |
"elements": [ |
||||||
"impact": "Medium", |
{ |
||||||
"confidence": "Medium", |
"type": "function", |
||||||
"description": "Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code\n", |
"name": "test_assembly_bug", |
||||||
"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": { |
"source_mapping": { |
||||||
"start": 0, |
"start": 324, |
||||||
"length": 392, |
"length": 66, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_relative": "tests/constant.sol", |
"filename_relative": "tests/constant.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
"filename_short": "tests/constant.sol", |
"filename_short": "tests/constant.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
1, |
|
||||||
2, |
|
||||||
3, |
|
||||||
4, |
|
||||||
5, |
|
||||||
6, |
|
||||||
7, |
|
||||||
8, |
|
||||||
9, |
|
||||||
10, |
|
||||||
11, |
|
||||||
12, |
|
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21, |
|
||||||
22, |
22, |
||||||
23, |
23, |
||||||
24, |
24 |
||||||
25 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 6 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "Constant", |
||||||
|
"source_mapping": { |
||||||
|
"start": 0, |
||||||
|
"length": 392, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_relative": "tests/constant.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||||
|
"filename_short": "tests/constant.sol", |
||||||
|
"lines": [ |
||||||
|
1, |
||||||
|
2, |
||||||
|
3, |
||||||
|
4, |
||||||
|
5, |
||||||
|
6, |
||||||
|
7, |
||||||
|
8, |
||||||
|
9, |
||||||
|
10, |
||||||
|
11, |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21, |
||||||
|
22, |
||||||
|
23, |
||||||
|
24, |
||||||
|
25 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "test_assembly_bug()" |
||||||
} |
} |
||||||
} |
} |
||||||
|
], |
||||||
|
"additional_fields": { |
||||||
|
"contains_assembly": true |
||||||
} |
} |
||||||
], |
|
||||||
"additional_fields": { |
|
||||||
"contains_assembly": true |
|
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
File diff suppressed because it is too large
Load Diff
@ -1,222 +1,236 @@ |
|||||||
{ |
{ |
||||||
"success": true, |
"success": true, |
||||||
"error": null, |
"error": null, |
||||||
"results": [ |
"results": { |
||||||
{ |
"detectors": [ |
||||||
"check": "erc20-indexed", |
{ |
||||||
"impact": "Informational", |
"check": "erc20-indexed", |
||||||
"confidence": "High", |
"impact": "Informational", |
||||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n", |
"confidence": "High", |
||||||
"elements": [ |
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n", |
||||||
{ |
"elements": [ |
||||||
"type": "event", |
{ |
||||||
"name": "Transfer", |
"type": "event", |
||||||
"source_mapping": { |
"name": "Transfer", |
||||||
"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 |
|
||||||
}, |
|
||||||
"additional_fields": { |
|
||||||
"parameter_name": "from" |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "IERC20Bad", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 622, |
"start": 1090, |
||||||
"length": 587, |
"length": 53, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_relative": "tests/erc20_indexed.sol", |
"filename_relative": "tests/erc20_indexed.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_short": "tests/erc20_indexed.sol", |
"filename_short": "tests/erc20_indexed.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
12, |
19 |
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 58 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "IERC20Bad", |
||||||
|
"source_mapping": { |
||||||
|
"start": 622, |
||||||
|
"length": 587, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_relative": "tests/erc20_indexed.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_short": "tests/erc20_indexed.sol", |
||||||
|
"lines": [ |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "Transfer(address,address,uint256)" |
||||||
|
}, |
||||||
|
"additional_fields": { |
||||||
|
"parameter_name": "from" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "erc20-indexed", |
||||||
"check": "erc20-indexed", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n", |
||||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "event", |
||||||
"type": "event", |
"name": "Transfer", |
||||||
"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 |
|
||||||
}, |
|
||||||
"additional_fields": { |
|
||||||
"parameter_name": "to" |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "IERC20Bad", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 622, |
"start": 1090, |
||||||
"length": 587, |
"length": 53, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_relative": "tests/erc20_indexed.sol", |
"filename_relative": "tests/erc20_indexed.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_short": "tests/erc20_indexed.sol", |
"filename_short": "tests/erc20_indexed.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
12, |
19 |
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 58 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "IERC20Bad", |
||||||
|
"source_mapping": { |
||||||
|
"start": 622, |
||||||
|
"length": 587, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_relative": "tests/erc20_indexed.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_short": "tests/erc20_indexed.sol", |
||||||
|
"lines": [ |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "Transfer(address,address,uint256)" |
||||||
|
}, |
||||||
|
"additional_fields": { |
||||||
|
"parameter_name": "to" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "erc20-indexed", |
||||||
"check": "erc20-indexed", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n", |
||||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "event", |
||||||
"type": "event", |
"name": "Approval", |
||||||
"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 |
|
||||||
}, |
|
||||||
"additional_fields": { |
|
||||||
"parameter_name": "owner" |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "IERC20Bad", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 622, |
"start": 1148, |
||||||
"length": 587, |
"length": 59, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_relative": "tests/erc20_indexed.sol", |
"filename_relative": "tests/erc20_indexed.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_short": "tests/erc20_indexed.sol", |
"filename_short": "tests/erc20_indexed.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
12, |
20 |
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 64 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "IERC20Bad", |
||||||
|
"source_mapping": { |
||||||
|
"start": 622, |
||||||
|
"length": 587, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_relative": "tests/erc20_indexed.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_short": "tests/erc20_indexed.sol", |
||||||
|
"lines": [ |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "Approval(address,address,uint256)" |
||||||
|
}, |
||||||
|
"additional_fields": { |
||||||
|
"parameter_name": "owner" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
}, |
||||||
}, |
{ |
||||||
{ |
"check": "erc20-indexed", |
||||||
"check": "erc20-indexed", |
"impact": "Informational", |
||||||
"impact": "Informational", |
"confidence": "High", |
||||||
"confidence": "High", |
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n", |
||||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n", |
"elements": [ |
||||||
"elements": [ |
{ |
||||||
{ |
"type": "event", |
||||||
"type": "event", |
"name": "Approval", |
||||||
"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 |
|
||||||
}, |
|
||||||
"additional_fields": { |
|
||||||
"parameter_name": "spender" |
|
||||||
}, |
|
||||||
"contract": { |
|
||||||
"type": "contract", |
|
||||||
"name": "IERC20Bad", |
|
||||||
"source_mapping": { |
"source_mapping": { |
||||||
"start": 622, |
"start": 1148, |
||||||
"length": 587, |
"length": 59, |
||||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_relative": "tests/erc20_indexed.sol", |
"filename_relative": "tests/erc20_indexed.sol", |
||||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
"filename_short": "tests/erc20_indexed.sol", |
"filename_short": "tests/erc20_indexed.sol", |
||||||
"lines": [ |
"lines": [ |
||||||
12, |
20 |
||||||
13, |
|
||||||
14, |
|
||||||
15, |
|
||||||
16, |
|
||||||
17, |
|
||||||
18, |
|
||||||
19, |
|
||||||
20, |
|
||||||
21 |
|
||||||
], |
], |
||||||
"starting_column": 1, |
"starting_column": 5, |
||||||
"ending_column": 2 |
"ending_column": 64 |
||||||
|
}, |
||||||
|
"type_specific_fields": { |
||||||
|
"parent": { |
||||||
|
"type": "contract", |
||||||
|
"name": "IERC20Bad", |
||||||
|
"source_mapping": { |
||||||
|
"start": 622, |
||||||
|
"length": 587, |
||||||
|
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_relative": "tests/erc20_indexed.sol", |
||||||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||||
|
"filename_short": "tests/erc20_indexed.sol", |
||||||
|
"lines": [ |
||||||
|
12, |
||||||
|
13, |
||||||
|
14, |
||||||
|
15, |
||||||
|
16, |
||||||
|
17, |
||||||
|
18, |
||||||
|
19, |
||||||
|
20, |
||||||
|
21 |
||||||
|
], |
||||||
|
"starting_column": 1, |
||||||
|
"ending_column": 2 |
||||||
|
} |
||||||
|
}, |
||||||
|
"signature": "Approval(address,address,uint256)" |
||||||
|
}, |
||||||
|
"additional_fields": { |
||||||
|
"parameter_name": "spender" |
||||||
} |
} |
||||||
} |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
] |
||||||
] |
} |
||||||
} |
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue