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/tx_origin-0.5.1.tx-origin.json

328 lines
11 KiB

{
"success": true,
"error": null,
"results": {
"detectors": [
{
"elements": [
{
"type": "function",
"name": "bug0",
"source_mapping": {
"start": 127,
"length": 66,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bug0()"
}
},
{
"type": "node",
"name": "require(bool)(tx.origin == owner)",
"source_mapping": {
"start": 159,
"length": 27,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
10
],
"starting_column": 9,
"ending_column": 36
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bug0",
"source_mapping": {
"start": 127,
"length": 66,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bug0()"
}
}
}
}
],
"description": "TxOrigin.bug0() (tests/tx_origin-0.5.1.sol#9-11) uses tx.origin for authorization: require(bool)(tx.origin == owner) (tests/tx_origin-0.5.1.sol#10)\n",
"markdown": "[TxOrigin.bug0()](tests/tx_origin-0.5.1.sol#L9-L11) uses tx.origin for authorization: [require(bool)(tx.origin == owner)](tests/tx_origin-0.5.1.sol#L10)\n",
"id": "a0c994da7e4fde05152f6b40d0db7741dc9154c0c27417d123775a43017fbd0c",
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium"
},
{
"elements": [
{
"type": "function",
"name": "bug2",
"source_mapping": {
"start": 199,
"length": 95,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bug2()"
}
},
{
"type": "node",
"name": "tx.origin != owner",
"source_mapping": {
"start": 235,
"length": 18,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
14
],
"starting_column": 13,
"ending_column": 31
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bug2",
"source_mapping": {
"start": 199,
"length": 95,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
13,
14,
15,
16,
17
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "TxOrigin",
"source_mapping": {
"start": 25,
"length": 442,
"filename_used": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_relative": "tests/tx_origin-0.5.1.sol",
"filename_absolute": "/home/travis/build/crytic/slither/tests/tx_origin-0.5.1.sol",
"filename_short": "tests/tx_origin-0.5.1.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bug2()"
}
}
}
}
],
"description": "TxOrigin.bug2() (tests/tx_origin-0.5.1.sol#13-17) uses tx.origin for authorization: tx.origin != owner (tests/tx_origin-0.5.1.sol#14)\n",
"markdown": "[TxOrigin.bug2()](tests/tx_origin-0.5.1.sol#L13-L17) uses tx.origin for authorization: [tx.origin != owner](tests/tx_origin-0.5.1.sol#L14)\n",
"id": "d7ce45ed56ab8579d6a9e88b9d57b5a3847a0925e3dd18dcb4a2f85b75bd7540",
"check": "tx-origin",
"impact": "Medium",
"confidence": "Medium"
}
]
}
}