Consensys / mythril

Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Rootstock, Tron and other EVM-compatible blockchains.
https://mythx.io/
MIT License
3.84k stars 736 forks source link

Add mythril version number in JSON output #484

Closed rocky closed 5 years ago

rocky commented 6 years ago

Description

When mytrhil gives JSON output, it would be fantastic if it could include a version string

Background

In support of mythril-api [Include Mythril version used in the analysis in an analysis status(https://github.com/ConsenSys/mythril-api-support/issues/5), it would be helpul for this to be in JSON output.

Otherwise the API has to make two calls per analysis to do this. Or assume that the version doesn't change which might have problems.

It is pretty easy for Mythril just to add that in the JSON result.

Tests

$ myth -x -o json -c f6
{"
  error": null, 
  "issues": [], 
  "success": true,
  "version_str": "v0.18.11"
}

where the check just makes sure that version_str is there.

rocky commented 6 years ago

Another thought and variation on this is to have --version not exit if there are other options. This would be whether or not -o json is used.

JoranHonig commented 5 years ago

@rocky I'm closing this as I think this specific functionality isn't required anymore

rocky commented 5 years ago

Yep, we get it in status on MythX.