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.
456 lines
22 KiB
456 lines
22 KiB
[
|
|
[
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 47,
|
|
"length": 70,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
4,
|
|
5,
|
|
6
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "require(bool)(block.timestamp == 0)",
|
|
"source_mapping": {
|
|
"start": 81,
|
|
"length": 29,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
5
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 38
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad0",
|
|
"source_mapping": {
|
|
"start": 47,
|
|
"length": 70,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
4,
|
|
5,
|
|
6
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad0()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Timestamp.bad0() (tests/detectors/timestamp/0.4.25/timestamp.sol#4-6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(block.timestamp == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#5)\n",
|
|
"markdown": "[Timestamp.bad0()](tests/detectors/timestamp/0.4.25/timestamp.sol#L4-L6) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(block.timestamp == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L5)\n",
|
|
"id": "9d7c44d1a332d53aacc312d316891fc85c62db8b5a5a638a64cdb718c9f20029",
|
|
"check": "timestamp",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 126,
|
|
"length": 96,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
8,
|
|
9,
|
|
10,
|
|
11
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad1()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "require(bool)(time == 0)",
|
|
"source_mapping": {
|
|
"start": 197,
|
|
"length": 18,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
10
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 27
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad1",
|
|
"source_mapping": {
|
|
"start": 126,
|
|
"length": 96,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
8,
|
|
9,
|
|
10,
|
|
11
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad1()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Timestamp.bad1() (tests/detectors/timestamp/0.4.25/timestamp.sol#8-11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- require(bool)(time == 0) (tests/detectors/timestamp/0.4.25/timestamp.sol#10)\n",
|
|
"markdown": "[Timestamp.bad1()](tests/detectors/timestamp/0.4.25/timestamp.sol#L8-L11) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [require(bool)(time == 0)](tests/detectors/timestamp/0.4.25/timestamp.sol#L10)\n",
|
|
"id": "d2f6167c2351e267210692e16350d8426db102519fe3eaeeadb6d17d2445dbbd",
|
|
"check": "timestamp",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
},
|
|
{
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 231,
|
|
"length": 79,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
13,
|
|
14,
|
|
15
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad2()"
|
|
}
|
|
},
|
|
{
|
|
"type": "node",
|
|
"name": "block.timestamp > 0",
|
|
"source_mapping": {
|
|
"start": 279,
|
|
"length": 24,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
14
|
|
],
|
|
"starting_column": 9,
|
|
"ending_column": 33
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "function",
|
|
"name": "bad2",
|
|
"source_mapping": {
|
|
"start": 231,
|
|
"length": 79,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
13,
|
|
14,
|
|
15
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"type_specific_fields": {
|
|
"parent": {
|
|
"type": "contract",
|
|
"name": "Timestamp",
|
|
"source_mapping": {
|
|
"start": 0,
|
|
"length": 402,
|
|
"filename_used": "/GENERIC_PATH",
|
|
"filename_relative": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"filename_absolute": "/GENERIC_PATH",
|
|
"filename_short": "tests/detectors/timestamp/0.4.25/timestamp.sol",
|
|
"is_dependency": false,
|
|
"lines": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9,
|
|
10,
|
|
11,
|
|
12,
|
|
13,
|
|
14,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20
|
|
],
|
|
"starting_column": 1,
|
|
"ending_column": 2
|
|
}
|
|
},
|
|
"signature": "bad2()"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Timestamp.bad2() (tests/detectors/timestamp/0.4.25/timestamp.sol#13-15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- block.timestamp > 0 (tests/detectors/timestamp/0.4.25/timestamp.sol#14)\n",
|
|
"markdown": "[Timestamp.bad2()](tests/detectors/timestamp/0.4.25/timestamp.sol#L13-L15) uses timestamp for comparisons\n\tDangerous comparisons:\n\t- [block.timestamp > 0](tests/detectors/timestamp/0.4.25/timestamp.sol#L14)\n",
|
|
"id": "2182d79d032d47fdf8137bc06dd7d4c1796356e19fab558e282f5d596391ec58",
|
|
"check": "timestamp",
|
|
"impact": "Low",
|
|
"confidence": "Medium"
|
|
}
|
|
]
|
|
] |