Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/expected_json/incorrect_equality.incorrec...

2580 lines
84 KiB

{
"success": true,
"error": null,
"results": {
"detectors": [
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "ERC20TestBalance.bad0(ERC20Function) (tests/incorrect_equality.sol#21-23) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(address(this)) == 10)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(erc.balanceOf(address(this)) == 10)",
"source_mapping": {
"start": 455,
"length": 43,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
22
],
"starting_column": 9,
"ending_column": 52
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 404,
"length": 101,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
21,
22,
23
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ERC20TestBalance",
"source_mapping": {
"start": 165,
"length": 445,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0(ERC20Function)"
}
}
}
},
{
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 404,
"length": 101,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
21,
22,
23
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ERC20TestBalance",
"source_mapping": {
"start": 165,
"length": 445,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0(ERC20Function)"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "ERC20TestBalance.bad1(ERC20Variable) (tests/incorrect_equality.sol#25-27) uses a dangerous strict equality:\n\t- require(bool)(erc.balanceOf(msg.sender) == 10)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(erc.balanceOf(msg.sender) == 10)",
"source_mapping": {
"start": 562,
"length": 39,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
26
],
"starting_column": 9,
"ending_column": 48
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 511,
"length": 97,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
25,
26,
27
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ERC20TestBalance",
"source_mapping": {
"start": 165,
"length": 445,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(ERC20Variable)"
}
}
}
},
{
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 511,
"length": 97,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
25,
26,
27
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "ERC20TestBalance",
"source_mapping": {
"start": 165,
"length": 445,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1(ERC20Variable)"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad0() (tests/incorrect_equality.sol#32-35) uses a dangerous strict equality:\n\t- require(bool)(address(address(this)).balance == 10000000000000000000)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(address(address(this)).balance == 10000000000000000000)",
"source_mapping": {
"start": 683,
"length": 51,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
33
],
"starting_column": 9,
"ending_column": 60
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 648,
"length": 133,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
32,
33,
34,
35
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
}
},
{
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 648,
"length": 133,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
32,
33,
34,
35
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad1() (tests/incorrect_equality.sol#37-40) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(address(this)).balance)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(10000000000000000000 == address(address(this)).balance)",
"source_mapping": {
"start": 822,
"length": 51,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
38
],
"starting_column": 9,
"ending_column": 60
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 787,
"length": 133,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
37,
38,
39,
40
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1()"
}
}
}
},
{
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 787,
"length": 133,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
37,
38,
39,
40
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad2() (tests/incorrect_equality.sol#42-45) uses a dangerous strict equality:\n\t- require(bool)(address(this).balance == 10000000000000000000)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(address(this).balance == 10000000000000000000)",
"source_mapping": {
"start": 961,
"length": 42,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
43
],
"starting_column": 9,
"ending_column": 51
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad2",
"source_mapping": {
"start": 926,
"length": 124,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
42,
43,
44,
45
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad2()"
}
}
}
},
{
"type": "function",
"name": "bad2",
"source_mapping": {
"start": 926,
"length": 124,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
42,
43,
44,
45
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad2()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad3() (tests/incorrect_equality.sol#47-50) uses a dangerous strict equality:\n\t- require(bool)(10000000000000000000 == address(this).balance)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(10000000000000000000 == address(this).balance)",
"source_mapping": {
"start": 1091,
"length": 42,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
48
],
"starting_column": 9,
"ending_column": 51
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad3",
"source_mapping": {
"start": 1056,
"length": 124,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
47,
48,
49,
50
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad3()"
}
}
}
},
{
"type": "function",
"name": "bad3",
"source_mapping": {
"start": 1056,
"length": 124,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
47,
48,
49,
50
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad3()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad4() (tests/incorrect_equality.sol#52-57) uses a dangerous strict equality:\n\t- balance == 10000000000000000000\n",
"elements": [
{
"type": "node",
"name": "balance == 10000000000000000000",
"source_mapping": {
"start": 1274,
"length": 19,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
54
],
"starting_column": 13,
"ending_column": 32
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad4",
"source_mapping": {
"start": 1186,
"length": 170,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
52,
53,
54,
55,
56,
57
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad4()"
}
}
}
},
{
"type": "function",
"name": "bad4",
"source_mapping": {
"start": 1186,
"length": 170,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
52,
53,
54,
55,
56,
57
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad4()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad5() (tests/incorrect_equality.sol#59-64) uses a dangerous strict equality:\n\t- 10000000000000000000 == balance\n",
"elements": [
{
"type": "node",
"name": "10000000000000000000 == balance",
"source_mapping": {
"start": 1450,
"length": 19,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
61
],
"starting_column": 13,
"ending_column": 32
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad5",
"source_mapping": {
"start": 1362,
"length": 170,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
59,
60,
61,
62,
63,
64
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad5()"
}
}
}
},
{
"type": "function",
"name": "bad5",
"source_mapping": {
"start": 1362,
"length": 170,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
59,
60,
61,
62,
63,
64
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad5()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestContractBalance.bad6() (tests/incorrect_equality.sol#66-71) uses a dangerous strict equality:\n\t- balance == 10000000000000000000\n",
"elements": [
{
"type": "node",
"name": "balance == 10000000000000000000",
"source_mapping": {
"start": 1635,
"length": 19,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
68
],
"starting_column": 13,
"ending_column": 32
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad6",
"source_mapping": {
"start": 1538,
"length": 179,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
66,
67,
68,
69,
70,
71
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad6()"
}
}
}
},
{
"type": "function",
"name": "bad6",
"source_mapping": {
"start": 1538,
"length": 179,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
66,
67,
68,
69,
70,
71
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestContractBalance",
"source_mapping": {
"start": 612,
"length": 1754,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad6()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestSolidityKeyword.bad0() (tests/incorrect_equality.sol#123-125) uses a dangerous strict equality:\n\t- require(bool)(now == 0)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(now == 0)",
"source_mapping": {
"start": 2969,
"length": 18,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
124
],
"starting_column": 9,
"ending_column": 27
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 2935,
"length": 59,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
123,
124,
125
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
}
},
{
"type": "function",
"name": "bad0",
"source_mapping": {
"start": 2935,
"length": 59,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
123,
124,
125
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad0()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestSolidityKeyword.bad1() (tests/incorrect_equality.sol#127-129) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(block.number == 0)",
"source_mapping": {
"start": 3034,
"length": 25,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
128
],
"starting_column": 9,
"ending_column": 34
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 3000,
"length": 66,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
127,
128,
129
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1()"
}
}
}
},
{
"type": "function",
"name": "bad1",
"source_mapping": {
"start": 3000,
"length": 66,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
127,
128,
129
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad1()"
}
}
]
},
{
"check": "incorrect-equality",
"impact": "Medium",
"confidence": "High",
"description": "TestSolidityKeyword.bad2() (tests/incorrect_equality.sol#131-133) uses a dangerous strict equality:\n\t- require(bool)(block.number == 0)\n",
"elements": [
{
"type": "node",
"name": "require(bool)(block.number == 0)",
"source_mapping": {
"start": 3106,
"length": 26,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
132
],
"starting_column": 9,
"ending_column": 35
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad2",
"source_mapping": {
"start": 3072,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
131,
132,
133
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad2()"
}
}
}
},
{
"type": "function",
"name": "bad2",
"source_mapping": {
"start": 3072,
"length": 67,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
131,
132,
133
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TestSolidityKeyword",
"source_mapping": {
"start": 2368,
"length": 774,
"filename_used": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_relative": "tests/incorrect_equality.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/incorrect_equality.sol",
"filename_short": "tests/incorrect_equality.sol",
"is_dependency": false,
"lines": [
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad2()"
}
}
]
}
]
}
}