mirror of https://github.com/crytic/slither
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.
208 lines
9.9 KiB
208 lines
9.9 KiB
4 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "bad1",
|
||
|
"source_mapping": {
|
||
|
"start": 162,
|
||
|
"length": 84,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
9,
|
||
|
10,
|
||
|
11
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "MyConc",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 923,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25,
|
||
|
26,
|
||
|
27,
|
||
|
28,
|
||
|
29,
|
||
|
30,
|
||
|
31,
|
||
|
32,
|
||
|
33,
|
||
|
34,
|
||
|
35,
|
||
|
36,
|
||
|
37,
|
||
|
38,
|
||
|
39,
|
||
|
40,
|
||
|
41,
|
||
|
42,
|
||
|
43,
|
||
|
44,
|
||
|
45,
|
||
|
46,
|
||
|
47
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad1(bool)"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "node",
|
||
|
"name": "(b || true)",
|
||
|
"source_mapping": {
|
||
|
"start": 221,
|
||
|
"length": 18,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
10
|
||
|
],
|
||
|
"starting_column": 9,
|
||
|
"ending_column": 27
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "function",
|
||
|
"name": "bad1",
|
||
|
"source_mapping": {
|
||
|
"start": 162,
|
||
|
"length": 84,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
9,
|
||
|
10,
|
||
|
11
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "MyConc",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 923,
|
||
|
"filename_used": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_relative": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
4 years ago
|
"filename_short": "tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25,
|
||
|
26,
|
||
|
27,
|
||
|
28,
|
||
|
29,
|
||
|
30,
|
||
|
31,
|
||
|
32,
|
||
|
33,
|
||
|
34,
|
||
|
35,
|
||
|
36,
|
||
|
37,
|
||
|
38,
|
||
|
39,
|
||
|
40,
|
||
|
41,
|
||
|
42,
|
||
|
43,
|
||
|
44,
|
||
|
45,
|
||
|
46,
|
||
|
47
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 0
|
||
|
}
|
||
|
},
|
||
|
"signature": "bad1(bool)"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
4 years ago
|
"description": "MyConc.bad1(bool) (tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol#9-11) uses a Boolean constant improperly:\n\t-(b || true) (tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol#10)\n",
|
||
|
"markdown": "[MyConc.bad1(bool)](tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol#L9-L11) uses a Boolean constant improperly:\n\t-[(b || true)](tests/detectors/boolean-constant-misuse/0.7.6/boolean-constant-misuse.sol#L10)\n",
|
||
|
"id": "a7e009ec0e6c5e4bf5dd828bcbeff63d020b9e2a10ad7ad350c13ad8cd277697",
|
||
4 years ago
|
"check": "boolean-cst",
|
||
|
"impact": "Medium",
|
||
|
"confidence": "Medium"
|
||
|
}
|
||
|
]
|
||
|
]
|