Skip to content

Commit

Permalink
update mythx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Feb 11, 2020
1 parent 51358b2 commit cb5f239
Showing 1 changed file with 15 additions and 38 deletions.
53 changes: 15 additions & 38 deletions docs/tests-security-analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
.. raw:: html

<style>
.green {background:#228822; color: #ffffff; padding: 2px 5px;}
.yellow {background:#ff9933; color: #ffffff; padding: 2px 5px;}
.orange {background:#ff3300; color: #ffffff; padding: 2px 5px;}
.red {background:#882222; color: #ffffff; padding: 2px 5px;}
</style>

.. role:: green
.. role:: yellow
.. role:: orange
.. role:: red
Expand All @@ -27,7 +25,22 @@ MythX is a smart contract security service that scans your project for vulnerabi

MythX offers both free and paid services. To learn more about how it works you may wish to read `MythX Pro Security Analysis Explained <https://blog.mythx.io/features/mythx-full-mode-security-analysis-explained/#more-37>`_ by Bernhard Mueller.

Authentication
==============

Before you can submit your contracts for analysis you must `sign up <https://dashboard.mythx.io/registration>`_ for a MythX account. Next, login to your account and obtain a JWT token so you can authenticate to the API.

The preferred way to pass your JWT token is via the ``MYTHX_API_KEY`` environment variable. You can set it with the following command:

::

$ export MYTHX_API_KEY=YourToken

If this is not possible, you may also pass it via the ``--api-key`` commandline option:

::

$ brownie analyze --api-key=<string>

Scanning for Vulnerabilities
============================
Expand All @@ -50,42 +63,6 @@ Note that a full scan requires authentication and takes approximately half an ho

If you include the ``--async`` flag Brownie will submit the job, output the pending ID and exit. You can view the finished report later through the MythX dashboard.

Authentication
==============

In order to perform a full scan or track your analysis history, you are required to authenticate. This can be done using either a JWT token obtained from the `MythX dashboard <https://dashboard.mythx.io/>`_, or with your username and password.

With a JWT Token
----------------

The preferred way to pass your JWT token is via the ``MYTHX_ACCESS_TOKEN`` environment variable. You can set it with the following command:

::

$ export MYTHX_ACCESS_TOKEN=YourToken

If this is not possible, you may also pass it via the ``--access-token`` commandline option:

::

$ brownie analyze --access-token=<string>

With your Username and Password
-------------------------------

The preferred way to pass your username and password is via the ``MYTHX_ETH_ADDRESS`` and ``MYTHX_PASSWORD`` environment variables. Set them with the following commands:

::

$ export MYTHX_ETH_ADDRESS=YourAddress
$ export MYTHX_PASSWORD=YourPassword

If this is not possible, you may also pass them via the commandline:

::

$ brownie analyze --eth-address=<string> --password=<string>

Viewing Analysis Results
========================

Expand Down

0 comments on commit cb5f239

Please sign in to comment.