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, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"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", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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": 1, |
||||
"length": 94, |
||||
"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": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
6 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "i_am_a_backdoor()" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
] |
||||
} |
||||
] |
||||
} |
||||
} |
@ -1,56 +1,61 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"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", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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": 1, |
||||
"length": 94, |
||||
"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": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
6 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "C", |
||||
"source_mapping": { |
||||
"start": 1, |
||||
"length": 94, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_relative": "tests/backdoor.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/backdoor.sol", |
||||
"filename_short": "tests/backdoor.sol", |
||||
"lines": [ |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "i_am_a_backdoor()" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
] |
||||
} |
||||
] |
||||
} |
||||
} |
@ -1,348 +1,362 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "myFriendsAddress", |
||||
"source_mapping": { |
||||
"start": 132, |
||||
"length": 76, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
7 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.myFriendsAddress should be constant (tests/const_state_variables.sol#7)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "myFriendsAddress", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"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": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
7 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"start": 237, |
||||
"length": 20, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
10 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.test should be constant (tests/const_state_variables.sol#10)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "test", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"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": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
10 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "text2", |
||||
"source_mapping": { |
||||
"start": 333, |
||||
"length": 20, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
14 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "A.text2 should be constant (tests/const_state_variables.sol#14)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "text2", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"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": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
14 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 25 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "A", |
||||
"source_mapping": { |
||||
"start": 29, |
||||
"length": 441, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "mySistersAddress", |
||||
"source_mapping": { |
||||
"start": 496, |
||||
"length": 76, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
26 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "B", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "B.mySistersAddress should be constant (tests/const_state_variables.sol#26)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "mySistersAddress", |
||||
"source_mapping": { |
||||
"start": 473, |
||||
"length": 271, |
||||
"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": [ |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37 |
||||
26 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 81 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "B", |
||||
"source_mapping": { |
||||
"start": 473, |
||||
"length": 271, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
24, |
||||
25, |
||||
26, |
||||
27, |
||||
28, |
||||
29, |
||||
30, |
||||
31, |
||||
32, |
||||
33, |
||||
34, |
||||
35, |
||||
36, |
||||
37 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant", |
||||
"source_mapping": { |
||||
"start": 793, |
||||
"length": 42, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
42 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 47 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "MyConc", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "MyConc.should_be_constant should be constant (tests/const_state_variables.sol#42)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant", |
||||
"source_mapping": { |
||||
"start": 746, |
||||
"length": 342, |
||||
"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": [ |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52 |
||||
42 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 47 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "MyConc", |
||||
"source_mapping": { |
||||
"start": 746, |
||||
"length": 342, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant_2", |
||||
"source_mapping": { |
||||
"start": 841, |
||||
"length": 33, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
43 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 38 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "MyConc", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "constable-states", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "MyConc.should_be_constant_2 should be constant (tests/const_state_variables.sol#43)\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "variable", |
||||
"name": "should_be_constant_2", |
||||
"source_mapping": { |
||||
"start": 746, |
||||
"length": 342, |
||||
"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": [ |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52 |
||||
43 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 38 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "MyConc", |
||||
"source_mapping": { |
||||
"start": 746, |
||||
"length": 342, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_relative": "tests/const_state_variables.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/const_state_variables.sol", |
||||
"filename_short": "tests/const_state_variables.sol", |
||||
"lines": [ |
||||
39, |
||||
40, |
||||
41, |
||||
42, |
||||
43, |
||||
44, |
||||
45, |
||||
46, |
||||
47, |
||||
48, |
||||
49, |
||||
50, |
||||
51, |
||||
52 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
] |
||||
} |
||||
] |
||||
} |
||||
} |
@ -1,70 +1,75 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"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", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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": 0, |
||||
"length": 253, |
||||
"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": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18 |
||||
17 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 253, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_relative": "tests/constant-0.5.1.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant-0.5.1.sol", |
||||
"filename_short": "tests/constant-0.5.1.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "test_assembly_bug()" |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
} |
||||
] |
||||
] |
||||
} |
||||
} |
@ -1,335 +1,350 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"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", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"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": 0, |
||||
"length": 392, |
||||
"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": [ |
||||
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 |
||||
7 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "test_view_bug()" |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"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": [ |
||||
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 |
||||
3 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": false |
||||
} |
||||
], |
||||
"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", |
||||
"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", |
||||
}, |
||||
{ |
||||
"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": 0, |
||||
"length": 392, |
||||
"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": [ |
||||
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 |
||||
11 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "test_constant_bug()" |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 28, |
||||
"length": 6, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
3 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
{ |
||||
"type": "variable", |
||||
"name": "a", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"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": [ |
||||
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 |
||||
3 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 11 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": false |
||||
} |
||||
], |
||||
"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", |
||||
"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", |
||||
}, |
||||
{ |
||||
"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": 0, |
||||
"length": 392, |
||||
"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": [ |
||||
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 |
||||
24 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 6 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "Constant", |
||||
"source_mapping": { |
||||
"start": 0, |
||||
"length": 392, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_relative": "tests/constant.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol", |
||||
"filename_short": "tests/constant.sol", |
||||
"lines": [ |
||||
1, |
||||
2, |
||||
3, |
||||
4, |
||||
5, |
||||
6, |
||||
7, |
||||
8, |
||||
9, |
||||
10, |
||||
11, |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21, |
||||
22, |
||||
23, |
||||
24, |
||||
25 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "test_assembly_bug()" |
||||
} |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
], |
||||
"additional_fields": { |
||||
"contains_assembly": true |
||||
} |
||||
} |
||||
] |
||||
] |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,222 +1,236 @@ |
||||
{ |
||||
"success": true, |
||||
"error": null, |
||||
"results": [ |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"start": 1090, |
||||
"length": 53, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "from" |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"results": { |
||||
"detectors": [ |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'from'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
19 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Transfer(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "from" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"start": 1090, |
||||
"length": 53, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
19 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "to" |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Transfer (tests/erc20_indexed.sol#19) does not index parameter 'to'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Transfer", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
19 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 58 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Transfer(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "to" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"start": 1148, |
||||
"length": 59, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "owner" |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'owner'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
20 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Approval(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "owner" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"start": 1148, |
||||
"length": 59, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
20 |
||||
], |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "spender" |
||||
}, |
||||
"contract": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
] |
||||
}, |
||||
{ |
||||
"check": "erc20-indexed", |
||||
"impact": "Informational", |
||||
"confidence": "High", |
||||
"description": "ERC20 event IERC20Bad.Approval (tests/erc20_indexed.sol#20) does not index parameter 'spender'\n", |
||||
"elements": [ |
||||
{ |
||||
"type": "event", |
||||
"name": "Approval", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"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": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
20 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
"starting_column": 5, |
||||
"ending_column": 64 |
||||
}, |
||||
"type_specific_fields": { |
||||
"parent": { |
||||
"type": "contract", |
||||
"name": "IERC20Bad", |
||||
"source_mapping": { |
||||
"start": 622, |
||||
"length": 587, |
||||
"filename_used": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_relative": "tests/erc20_indexed.sol", |
||||
"filename_absolute": "/home/travis/build/crytic/slither/tests/erc20_indexed.sol", |
||||
"filename_short": "tests/erc20_indexed.sol", |
||||
"lines": [ |
||||
12, |
||||
13, |
||||
14, |
||||
15, |
||||
16, |
||||
17, |
||||
18, |
||||
19, |
||||
20, |
||||
21 |
||||
], |
||||
"starting_column": 1, |
||||
"ending_column": 2 |
||||
} |
||||
}, |
||||
"signature": "Approval(address,address,uint256)" |
||||
}, |
||||
"additional_fields": { |
||||
"parameter_name": "spender" |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
] |
||||
] |
||||
} |
||||
] |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue