Closed tagomaru closed 5 years ago
I found probally bug regarding counting the number of issues.
Issues (vulnerabilities) are included like below.
{ "issues": [ { "issues": [ { "swcID": "SWC-106", "swcTitle": "Unprotected SELFDESTRUCT Instruction", "description": { "head": "The contract can be killed by anyone.", "tail": "Arbitrary senders can kill this contract and withdraw its balance to their own account." }, "severity": "High", "locations": [ { "sourceMap": "112:24:0" } ], "extra": { "testCase": { "initialState": { "accounts": null }, "steps": null } } }, { "swcID": "SWC-103", "swcTitle": "Floating Pragma", "description": { "head": "A floating pragma is set.", "tail": "It is recommended to make a conscious choice on what version of Solidity is used for compilation. Currently any version equal or greater than \"0.5.3\" is allowed." }, "severity": "Medium", "locations": [ { "sourceMap": "0:23:1" } ], "extra": { "testCase": { "initialState": { "accounts": null }, "steps": null } } } ], "sourceType": "solidity-file", "sourceFormat": "text", "sourceList": [ "test/contracts/vulnerable.sol", "/test/contracts/vulnerable.sol" ], "meta": { "coveredInstructions": 96, "coveredPaths": 6, "selectedCompiler": "0.5.3" } } ], "uuid": "54972960-1dc2-45f7-8f64-6fafcb46b39b" }
That is why it should get the number with issues.issues[0].issues.length.
issues.issues[0].issues.length
This looks good
I found probally bug regarding counting the number of issues.
Issues (vulnerabilities) are included like below.
That is why it should get the number with
issues.issues[0].issues.length
.