A command line interface for the MythX smart contract security analysis API
Project description
A PythX-driven CLI for MythX
This package aims to provide a simple to use command line interface for the MythX smart contract security analysis API. It’s main purpose is to demonstrate how advanced features can be implemented using the PythX Python language bindings for MythX to simplify API interaction.
What is MythX?
MythX is a security analysis API that allows anyone to create purpose-built security tools for smart contract developers. Tools built on MythX integrate seamlessly into the development environments and continuous integration pipelines used throughout the Ethereum ecosystem.
Usage
$ mythx
Usage: mythx [OPTIONS] COMMAND [ARGS]...
Your CLI for interacting with https://mythx.io/
Options:
--debug Provide additional debug output
--api-key TEXT Your MythX API key from the dashboard
--username TEXT Your MythX account's username
--password TEXT Your MythX account's password
--format [simple|json|json-pretty|table]
The format to display the results in
--ci Return exit code 1 if high-severity issue is
found
-y, --yes Do not prompt for any confirmations
-o, --output TEXT Output file to write the results into
-c, --config PATH YAML config file for default parameters
--stdout Force printing to stdout
--table-sort-key [line|title|severity|description]
The column to sort the default table output
by
--help Show this message and exit.
Commands:
analysis Get information on running and finished analyses.
analyze Analyze the given directory or arguments with MythX.
group Create, modify, and view analysis groups.
render Render an analysis job or group report as HTML.
version Display API version information.
Installation
The MythX CLI runs on Python 3.6+, including 3.8 and pypy3.
To get started, simply run
$ pip3 install mythx-cli
Alternatively, clone the repository and run
$ pip3 install .
Or directly through Python’s setuptools:
$ python3 setup.py install
Free software: MIT license
Documentation: https://mythx-cli.readthedocs.io.
History
0.6.23 (2022-04-07)
Add compatibility fix for Scribble compilation artifacts processing (prior
eth-scribble@0.3.5)Fix
MarkupSafeto 2.0.1 due to breaking changes (https://github.com/pallets/markupsafe/pull/261)
0.6.22 (2020-10-05)
Catch AttributeError on faulty Truffle artifact schema
Update
pytestto 6.1.1Update
isortto 5.5.4
0.6.21 (2020-09-18)
Fix bug in render command analysis list pagination query
Update
isortto 5.5.2Update
pytestto 6.0.2Update :code`coverage` to 5.3
0.6.20 (2020-09-05)
Add table sort key parameter
Fix bug where payloads were unnecessarily duplicated before filtering
Improve custom rendering documentation
Improve HTML/MD default template styles
Refactor and speed up template rendering routines
Add file-indexed formatting/rendering data structures
Add Scribble middleware to support Solidity and Truffle
Add Scribble JSON support for Solidity jobs
Refactor Solidity payload job
Add truffle payload context generation
Remove deprecated Sonarqube formatter
Update
py-solc-xto 1.0.0Update
pytestto 6.0.1Update
pytest-covto 2.10.1Update
coverallsto 2.1.2Update
coverageto 5.2.1Update
sphinxto 3.2.1Update
isortto 5.5.1Update
toxto 3.20.0Update
watchdogto 0.10.3Update
twineto 3.2.0
0.6.19 (2020-06-23)
Add
--stdoutflag to override YAML-definedoutput
0.6.18 (2020-06-16)
Update
pythxto 1.6.1 to fix validation errors
0.6.17 (2020-06-16)
Add experimental Scribble integration for property validation
Remove bytecode payload option due to lack of usage
Require users to explicitly consent to analysis submission
Add feature that allows users to force a certain analysis scenario
Clean up code into payload-related job objects
Fix issue where pypy7.1.1-beta0 doesn’t support PathLike in os.chdir
Slim down Solidity file walking logic
Refresh payload documentation
Refactor payload-related tests
Update
py-solc-xto 0.9.0Update
sphinxto 3.1.1Update
pytest-covto 2.10.0Update
toxto 3.15.2
0.6.16 (2020-05-15)
Whitelist OSX solc installations in
py-solc-xUpdate
bumpversionto 0.6.0
0.6.15 (2020-05-12)
Fix bug where payload path prefix trimming was incorrect
Generate source list from Truffle artifact files
Improve Solidity file walk performance
Refactor payloads submodule
Update
toxto 3.15.0Update
pytestto 5.4.2Update
py-solc-xto 0.8.2
0.6.14 (2020-04-30)
Fix bug where location offsets were incorrectly displayed in reports
Fix bug where whitespace was incorrectly rendered in HTML reports
Clean up HTML report layout template code
Update
clickto 7.1.2
0.6.13 (2020-04-27)
Add property verification flag docs
Add property checking flag to analyze command
Update
sphinxto 3.0.3
0.6.12 (2020-04-20)
Fix bug where new line characters were incorrectly sent on Windows OS
Fix bug where group creation from config was not triggered
Update
sphinxto 3.0.2Update
coverageto 5.1Update
Jinjato 2.11.2
0.6.11 (2020-04-08)
Use solc JSON stdin for compilation
Update
sphinxto 3.0.0Update
coverallsto 2.0.0
0.6.10 (2020-04-03)
Add
--api/--selfversion command switchAdd explicit yaml config override feature
Documentation updates
Update
toxto 3.14.6Update
py-solc-xto 0.8.1
0.6.9 (2020-03-24)
Fix issue where request source list was malformed
0.6.8 (2020-03-23)
Add support for
.mythx.ymlconfig filesAllow pwd definitions in solc import remappings
Fix bug in Solidity file walking routine
Add additional tox checks for documentation and formatting
0.6.7 (2020-03-19)
Fix issue where render templates were not correctly added to manifest.
0.6.6 (2020-03-19)
Refactor commands into dedicated packages
Fix bug where click commands were not picked up by autodoc
Fix bug where
rendercommand log cluttered report stdoutAdd support for upper case targets in
rendercommandAdd more verbose debug logging across package
0.6.5 (2020-03-17)
Add optional contract name specification for Solidity files
Revise usage and advanced usage docs for solc compilation
Add
--remap-importparameter for solc import remappingsUpdate
coverageto 5.0.4
0.6.4 (2020-03-15)
Add
--includeflag toanalyzesubcommandFix minor bug in package description content type definition
Update
toxto 3.14.5Update
sphinxto 2.4.4Update
py-solc-xto 0.8.0Update
clickto 7.1.1Update
pytest5.4.1
0.6.3 (2020-02-15)
Update
sphinxto 2.4.1Improved Usage Guide documentation
Added more verbose descriptions in Advanced Usage guide
Add improved Python docstrings, enforce formatting
Add more precise type hints across the code base
Fix bug where Solidity payloads were truncated
Add
mythx render --markdownparameter for md reportsAdd
rglobblacklist to excludenode_modulesduring .sol directory walks
0.6.2 (2020-02-08)
Update
pytestto 5.3.5Add
mythx rendersubcommand for HTML report renderingVarious HTML template improvements
Add
Jinja2andhtmlmindependenciesAdd documentation for custom template creation
Add filtering of Solidity payloads without compiled code (e.g. interfaces)
0.6.0 & 0.6.1 (2020-01-29)
Add unified reports (e.g.
jsonoutput of multiple reports in a single JSON object)Add SWC ID whitelist parameter to report filter
Integrate report filters with
--ciflagAdd advanced usage guide to documentation
Improved messaging across CLI
Update
pytestto 5.3.4Improve test suite assertion diff display
0.5.3 (2020-01-16)
Bump
py-solc-xto 0.7.0
0.5.2 (2020-01-16)
Fix merge release mistake (yeah, sorry.)
0.5.1 (2020-01-16)
Add support for new modes (quick, standard, deep)
Fix issue where Truffle address placeholders resulted in invalid bytecode
0.5.0 (2020-01-14)
Add
--create-groupflag to analyze subcommandAdd privacy feature to truncate paths in submission
Support Truffle projects as target directories
Add SonarQube output format option
Revamp usage documentation
Update coverage to 5.0.3
Update package details
0.4.1 (2020-01-03)
Add batch directory submission feature
Add a
--yesflag to skip confirmation messages
0.4.0 (2020-01-02)
Add
--outputflag to print to fileRefactor test suite
Update coverage to 5.0.1
Update Sphinx to 2.3.1
Update tox to 3.14.3
0.3.0 (2019-12-16)
Add links to MythX dashboard in formatters
Add support for analysis groups
Split up logic in subcommands (analysis and group)
Add CI flag to return 1 on high-severity issues
Add parameter to blacklist SWC IDs
Fix bug where
--solc-versionparameter did not workRefactor test suite
Update pytest to 5.3.1
Update Sphinx to 2.3.0
0.2.1 (2019-10-04)
Update PythX to 1.3.2
0.2.0 (2019-10-04)
Update PythX to 1.3.1
Add tabular format option as new pretty default
Update pytest to 5.2.0
Various bugfixes
0.1.8 (2019-09-16)
Update dependencies to account for new submodules
0.1.7 (2019-09-16)
Update pythx from 1.2.4 to 1.2.5
Clean stale imports, fix formatting issues
0.1.6 (2019-09-15)
Improve CLI docstrings
Add more formatter-related documentation
0.1.5 (2019-09-15)
Add autodoc to Sphinx setup
Add middleware for tool name field
Enable pypy3 support
Add more verbose documentation
Allow username/password login
0.1.4 (2019-09-13)
Fix Atom’s automatic Python import sorting (broke docs)
0.1.3 (2019-09-13)
Fix faulty version generated by bumpversion
0.1.2 (2019-09-13)
Fix bumpversion regex issue
0.1.1 (2019-09-13)
Initial implementation
Integrated Travis, PyUp, PyPI upload
0.1.0 (2019-08-31)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mythx_cli-0.7.3.tar.gz.
File metadata
- Download URL: mythx_cli-0.7.3.tar.gz
- Upload date:
- Size: 189.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.8.3 requests/2.25.1 setuptools/65.3.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9e163cc53b5dbf660f0bd359fe50e39e824f031d665c86ea0e55dc290e22234
|
|
| MD5 |
70218384acd3b3f23c175f692c90d95a
|
|
| BLAKE2b-256 |
0715e4508c92151ad997e50bf8d91391bdace007f10c5454812935c6351ea1c4
|
File details
Details for the file mythx_cli-0.7.3-py2.py3-none-any.whl.
File metadata
- Download URL: mythx_cli-0.7.3-py2.py3-none-any.whl
- Upload date:
- Size: 48.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.8.3 requests/2.25.1 setuptools/65.3.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43f38218a6491f78a66112266ef396ce57281850a8d85a3b1b828b6b76096902
|
|
| MD5 |
3ccb9972d6b513837a75d71e4be777ba
|
|
| BLAKE2b-256 |
7b452e66527db8cc326074bc10786efaba6e2552cfad8adce6cfbd651681bcf6
|