cleanunicorn / mythos

CLI client for the MythX API
https://mythx.io/
20 stars 6 forks source link

Add analysis-results command #22

Closed tagomaru closed 5 years ago

tagomaru commented 5 years ago

This PR addresses #16. Could you check it to satisfy you ?

tagomaru commented 5 years ago

The below is the sample result.

$ mythos analysis-results 867a8082-28ed-4374-beeb-dcc9f92eae30
Retrieving analysis results: 867a8082-28ed-4374-beeb-dcc9f92eae30... done
Report found 2 issues
Title: Unprotected SELFDESTRUCT Instruction
Severity: High
Head: The contract can be killed by anyone.
Description: Arbitrary senders can kill this contract and withdraw its balance to their own account.
Source code:

test/contracts/vulnerable.sol 7:8
--------------------------------------------------
selfdestruct(msg.sender)
--------------------------------------------------

==================================================

Title: Floating Pragma
Severity: Medium
Head: A floating pragma is set.
Description: 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.
Source code:

test/contracts/vulnerable.sol 1:0
--------------------------------------------------
pragma solidity ^0.5.3;
--------------------------------------------------

==================================================

Done
tagomaru commented 5 years ago

Ah - sorry. I have to check status from MythX. Just a moment pls.

tagomaru commented 5 years ago

I have to check status from MythX.

I did with https://github.com/cleanunicorn/mythos/pull/22/commits/de2b2ec4e2358a6262e7d1d9f67cda8ff88323ab

cleanunicorn commented 5 years ago

Sweet!

I'll accept this.

I might rename analysis-results to a verb.