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