add generated expected json output of each test

pull/67/head
Alexander Remie 6 years ago
parent b7119f0460
commit 014bce3a85
  1. 26
      tests/arbitrary_send.arbitrary-send.json
  2. 1
      tests/backdoor.backdoor.json
  3. 1
      tests/backdoor.suicidal.json
  4. 64
      tests/const_state_variables.constable-states.json
  5. 46
      tests/external_function.external-function.json
  6. 11
      tests/inline_assembly_contract.assembly.json
  7. 20
      tests/inline_assembly_library.assembly.json
  8. 1
      tests/locked_ether.locked-ether.json
  9. 11
      tests/low_level_calls.low-level-calls.json
  10. 131
      tests/naming_convention.naming-convention.json
  11. 15
      tests/old_solc.sol.json.solc-version.json
  12. 1
      tests/pragma.0.4.24.pragma.json
  13. 26
      tests/reentrancy.reentrancy.json
  14. 20
      tests/tx_origin.tx-origin.json
  15. 86
      tests/uninitialized.uninitialized-state.json
  16. 21
      tests/uninitialized_storage_pointer.uninitialized-storage.json
  17. 1
      tests/unused_state.unused-state.json

@ -0,0 +1,26 @@
[
{
"vuln": "SuicidalFunc",
"sourceMapping": [
null
],
"filename": "tests/arbitrary_send.sol",
"contract": "Test",
"func": "direct",
"calls": [
"msg.sender.send(this.balance)"
]
},
{
"vuln": "SuicidalFunc",
"sourceMapping": [
null
],
"filename": "tests/arbitrary_send.sol",
"contract": "Test",
"func": "indirect",
"calls": [
"destination.send(this.balance)"
]
}
]

@ -0,0 +1,64 @@
[
{
"vuln": "ConstStateVariableCandidates",
"sourceMapping": [
{
"start": 130,
"length": 76,
"filename": "tests/const_state_variables.sol"
},
{
"start": 235,
"length": 20,
"filename": "tests/const_state_variables.sol"
},
{
"start": 331,
"length": 20,
"filename": "tests/const_state_variables.sol"
},
{
"start": 494,
"length": 76,
"filename": "tests/const_state_variables.sol"
}
],
"filename": "tests/const_state_variables.sol",
"contract": "B",
"unusedVars": [
"myFriendsAddress",
"test",
"text2"
]
},
{
"vuln": "ConstStateVariableCandidates",
"sourceMapping": [
{
"start": 130,
"length": 76,
"filename": "tests/const_state_variables.sol"
},
{
"start": 235,
"length": 20,
"filename": "tests/const_state_variables.sol"
},
{
"start": 331,
"length": 20,
"filename": "tests/const_state_variables.sol"
},
{
"start": 494,
"length": 76,
"filename": "tests/const_state_variables.sol"
}
],
"filename": "tests/const_state_variables.sol",
"contract": "B",
"unusedVars": [
"mySistersAddress"
]
}
]

@ -0,0 +1,46 @@
[
{
"vuln": "ExternalFunc",
"sourceMapping": {
"start": 257,
"length": 41,
"filename": "tests/external_function.sol"
},
"filename": "tests/external_function.sol",
"contract": "ContractWithFunctionNotCalled",
"func": "funcNotCalled3"
},
{
"vuln": "ExternalFunc",
"sourceMapping": {
"start": 304,
"length": 41,
"filename": "tests/external_function.sol"
},
"filename": "tests/external_function.sol",
"contract": "ContractWithFunctionNotCalled",
"func": "funcNotCalled2"
},
{
"vuln": "ExternalFunc",
"sourceMapping": {
"start": 351,
"length": 40,
"filename": "tests/external_function.sol"
},
"filename": "tests/external_function.sol",
"contract": "ContractWithFunctionNotCalled",
"func": "funcNotCalled"
},
{
"vuln": "ExternalFunc",
"sourceMapping": {
"start": 552,
"length": 304,
"filename": "tests/external_function.sol"
},
"filename": "tests/external_function.sol",
"contract": "ContractWithFunctionNotCalled2",
"func": "funcNotCalled"
}
]

@ -0,0 +1,11 @@
[
{
"vuln": "Assembly",
"sourceMapping": [
null
],
"filename": "tests/inline_assembly_contract.sol",
"contract": "GetCode",
"function_name": "at"
}
]

@ -0,0 +1,20 @@
[
{
"vuln": "Assembly",
"sourceMapping": [
null
],
"filename": "tests/inline_assembly_library.sol",
"contract": "VectorSum",
"function_name": "sumAsm"
},
{
"vuln": "Assembly",
"sourceMapping": [
null
],
"filename": "tests/inline_assembly_library.sol",
"contract": "VectorSum",
"function_name": "sumPureAsm"
}
]

@ -0,0 +1,11 @@
[
{
"vuln": "Low level call",
"sourceMapping": [
null
],
"filename": "tests/low_level_calls.sol",
"contract": "Sender",
"function_name": "send"
}
]

@ -0,0 +1,131 @@
[
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"sourceMapping": {
"start": 26,
"length": 598,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"struct": "test",
"sourceMapping": {
"start": 227,
"length": 20,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"event": "event_",
"sourceMapping": null
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"function": "GetOne",
"sourceMapping": {
"start": 405,
"length": 71,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"function": "setInt",
"argument": "Number2",
"sourceMapping": {
"start": 512,
"length": 12,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"constant": "MY_other_CONSTANT",
"sourceMapping": {
"start": 141,
"length": 35,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"variable": "Var_One",
"sourceMapping": {
"start": 183,
"length": 16,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"enum": "numbers",
"sourceMapping": {
"start": 77,
"length": 23,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "naming",
"modifier": "CantDo",
"sourceMapping": {
"start": 545,
"length": 36,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "T",
"function": "test",
"argument": "_used",
"sourceMapping": {
"start": 748,
"length": 10,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "T",
"variable": "_myPublicVar",
"sourceMapping": {
"start": 695,
"length": 17,
"filename": "tests/naming_convention.sol"
}
},
{
"vuln": "NamingConvention",
"filename": "tests/naming_convention.sol",
"contract": "T",
"constant": "l",
"sourceMapping": {
"start": 847,
"length": 10,
"filename": "tests/naming_convention.sol"
}
}
]

@ -0,0 +1,15 @@
[
{
"vuln": "OldPragma",
"pragma": [
"0.4.21"
],
"sourceMapping": [
{
"start": 0,
"length": 23,
"filename": "old_solc.sol"
}
]
}
]

@ -0,0 +1,26 @@
[
{
"vuln": "Reentrancy",
"sourceMapping": [
{
"start": 52,
"length": 37,
"filename": "tests/reentrancy.sol"
},
null,
null
],
"filename": "tests/reentrancy.sol",
"contract": "Reentrancy",
"function_name": "withdrawBalance()",
"calls": [
"! (msg.sender.call.value(userBalance[msg.sender])())"
],
"send_eth": [
"! (msg.sender.call.value(userBalance[msg.sender])())"
],
"varsWritten": [
"userBalance"
]
}
]

@ -0,0 +1,20 @@
[
{
"vuln": "TxOrigin",
"sourceMapping": [
null
],
"filename": "tests/tx_origin.sol",
"contract": "TxOrigin",
"function_name": "bug0"
},
{
"vuln": "TxOrigin",
"sourceMapping": [
null
],
"filename": "tests/tx_origin.sol",
"contract": "TxOrigin",
"function_name": "bug2"
}
]

@ -0,0 +1,86 @@
[
{
"vuln": "UninitializedStateVars",
"sourceMapping": [
{
"start": 55,
"length": 19,
"filename": "tests/uninitialized.sol"
},
{
"start": 81,
"length": 82,
"filename": "tests/uninitialized.sol"
}
],
"filename": "tests/uninitialized.sol",
"contract": "Uninitialized",
"functions": [
"transfer"
],
"variable": "destination"
},
{
"vuln": "UninitializedStateVars",
"sourceMapping": [
{
"start": 189,
"length": 34,
"filename": "tests/uninitialized.sol"
},
{
"start": 356,
"length": 143,
"filename": "tests/uninitialized.sol"
}
],
"filename": "tests/uninitialized.sol",
"contract": "Test",
"functions": [
"use"
],
"variable": "balances"
},
{
"vuln": "UninitializedStateVars",
"sourceMapping": [
{
"start": 695,
"length": 15,
"filename": "tests/uninitialized.sol"
},
{
"start": 875,
"length": 117,
"filename": "tests/uninitialized.sol"
}
],
"filename": "tests/uninitialized.sol",
"contract": "Test2",
"functions": [
"use"
],
"variable": "st"
},
{
"vuln": "UninitializedStateVars",
"sourceMapping": [
{
"start": 748,
"length": 6,
"filename": "tests/uninitialized.sol"
},
{
"start": 817,
"length": 52,
"filename": "tests/uninitialized.sol"
}
],
"filename": "tests/uninitialized.sol",
"contract": "Test2",
"functions": [
"init"
],
"variable": "v"
}
]

@ -0,0 +1,21 @@
[
{
"vuln": "UninitializedStorageVars",
"sourceMapping": [
{
"start": 67,
"length": 138,
"filename": "tests/uninitialized_storage_pointer.sol"
},
{
"start": 171,
"length": 9,
"filename": "tests/uninitialized_storage_pointer.sol"
}
],
"filename": "tests/uninitialized_storage_pointer.sol",
"contract": "Uninitialized",
"function": "func",
"variable": "st_bug"
}
]
Loading…
Cancel
Save