Skip to content

Commit f8f59df

Browse files
authored
Update docs and Add tutorial (#1664)
* Add exit code * Update docs with tutorial * Fix docs * Reformat
1 parent aa0f1d1 commit f8f59df

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1474
-447
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ or perhaps:
3737
4. See error
3838
3939
40-
If there is a Solidity source code, a truffle project, or bytecode
40+
If there is a Solidity source code or a bytecode
4141
that is involved, please provide that or links to it.
4242
4343
-->

all_tests.sh

-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ assert sys.version_info[0:2] >= (3,5), \
77
"""Please make sure you are using Python 3.5 or later.
88
You ran with {}""".format(sys.version)' || exit $?
99

10-
echo "Checking that truffle is installed..."
11-
if ! which truffle ; then
12-
echo "Please make sure you have etherum truffle installed (npm install -g truffle)"
13-
exit 2
14-
fi
1510

1611
rm -rf ./tests/testdata/outputs_current/
1712
mkdir -p ./tests/testdata/outputs_current/

docs/source/analysis-modules.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Analysis Modules
22
================
33

4-
Mythril's detection capabilities are written in modules in the `/analysis/modules <https://github.com/ConsenSys/mythril/tree/master/mythril/analysis/modules>`_ directory.
4+
Mythril's detection capabilities are written in modules in the `/analysis/module/modules <https://github.com/ConsenSys/mythril/tree/master/mythril/analysis/module/modules>`_ directory.
55

66

77
.. toctree::

docs/source/conf.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@
132132
# (source start file, target name, title,
133133
# author, documentclass [howto, manual, or own class]).
134134
latex_documents = [
135-
(master_doc, "Mythril.tex", "Mythril Documentation", "Bernhard Mueller", "manual")
135+
(
136+
master_doc,
137+
"Mythril.tex",
138+
"Mythril Documentation",
139+
"ConsenSys Dilligence",
140+
"manual",
141+
)
136142
]
137143

138144

docs/source/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Welcome to Mythril's documentation!
77

88
about
99
installation
10+
tutorial
1011
security-analysis
1112
analysis-modules
12-
mythx-analysis
1313
mythril
1414

1515

docs/source/module-list.rst

+4-9
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ Dependence on Predictable Variables
1313

1414
The `predictable variables module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/dependence_on_predictable_vars.py>`_ detects `SWC-120 (Weak Randomness) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-120>`_ and `SWC-116 (Timestamp Dependence) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-116>`_.
1515

16-
******************
17-
Deprecated Opcodes
18-
******************
19-
20-
The `deprecated opcodes module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/deprecated_ops.py>`_ detects `SWC-111 (Use of Deprecated Functions) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-111>`_.
2116

2217
***********
2318
Ether Thief
@@ -68,15 +63,15 @@ Unchecked Retval
6863

6964
The `unchecked retval module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/unchecked_retval.py>`_ detects `SWC-104 (Unchecked Call Return Value) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-104>`_.
7065

71-
****************
66+
************************
7267
User Supplied assertion
73-
****************
68+
************************
7469

7570
The `user supplied assertion module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/user_assertions.py>`_ detects `SWC-110 (Assert Violation) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-110>`_ for user-supplied assertions. User supplied assertions should be log messages of the form: :code:`emit AssertionFailed(string)`.
7671

77-
****************
72+
************************
7873
Arbitrary Storage Write
79-
****************
74+
************************
8075

8176
The `arbitrary storage write module <https://github.com/ConsenSys/mythril/blob/develop/mythril/analysis/module/modules/arbitrary_write.py>`_ detects `SWC-124 (Write to Arbitrary Storage Location) <https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-124>`_.
8277

docs/source/modules.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
mythril
2+
=======
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
mythril
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
mythril.analysis.module.modules package
2+
=======================================
3+
4+
Submodules
5+
----------
6+
7+
mythril.analysis.module.modules.arbitrary\_jump module
8+
------------------------------------------------------
9+
10+
.. automodule:: mythril.analysis.module.modules.arbitrary_jump
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
15+
mythril.analysis.module.modules.arbitrary\_write module
16+
-------------------------------------------------------
17+
18+
.. automodule:: mythril.analysis.module.modules.arbitrary_write
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
mythril.analysis.module.modules.delegatecall module
24+
---------------------------------------------------
25+
26+
.. automodule:: mythril.analysis.module.modules.delegatecall
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
mythril.analysis.module.modules.dependence\_on\_origin module
32+
-------------------------------------------------------------
33+
34+
.. automodule:: mythril.analysis.module.modules.dependence_on_origin
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
mythril.analysis.module.modules.dependence\_on\_predictable\_vars module
40+
------------------------------------------------------------------------
41+
42+
.. automodule:: mythril.analysis.module.modules.dependence_on_predictable_vars
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
mythril.analysis.module.modules.ether\_thief module
48+
---------------------------------------------------
49+
50+
.. automodule:: mythril.analysis.module.modules.ether_thief
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:
54+
55+
mythril.analysis.module.modules.exceptions module
56+
-------------------------------------------------
57+
58+
.. automodule:: mythril.analysis.module.modules.exceptions
59+
:members:
60+
:undoc-members:
61+
:show-inheritance:
62+
63+
mythril.analysis.module.modules.external\_calls module
64+
------------------------------------------------------
65+
66+
.. automodule:: mythril.analysis.module.modules.external_calls
67+
:members:
68+
:undoc-members:
69+
:show-inheritance:
70+
71+
mythril.analysis.module.modules.integer module
72+
----------------------------------------------
73+
74+
.. automodule:: mythril.analysis.module.modules.integer
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:
78+
79+
mythril.analysis.module.modules.multiple\_sends module
80+
------------------------------------------------------
81+
82+
.. automodule:: mythril.analysis.module.modules.multiple_sends
83+
:members:
84+
:undoc-members:
85+
:show-inheritance:
86+
87+
mythril.analysis.module.modules.state\_change\_external\_calls module
88+
---------------------------------------------------------------------
89+
90+
.. automodule:: mythril.analysis.module.modules.state_change_external_calls
91+
:members:
92+
:undoc-members:
93+
:show-inheritance:
94+
95+
mythril.analysis.module.modules.suicide module
96+
----------------------------------------------
97+
98+
.. automodule:: mythril.analysis.module.modules.suicide
99+
:members:
100+
:undoc-members:
101+
:show-inheritance:
102+
103+
mythril.analysis.module.modules.unchecked\_retval module
104+
--------------------------------------------------------
105+
106+
.. automodule:: mythril.analysis.module.modules.unchecked_retval
107+
:members:
108+
:undoc-members:
109+
:show-inheritance:
110+
111+
mythril.analysis.module.modules.user\_assertions module
112+
-------------------------------------------------------
113+
114+
.. automodule:: mythril.analysis.module.modules.user_assertions
115+
:members:
116+
:undoc-members:
117+
:show-inheritance:
118+
119+
Module contents
120+
---------------
121+
122+
.. automodule:: mythril.analysis.module.modules
123+
:members:
124+
:undoc-members:
125+
:show-inheritance:
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
mythril.analysis.module package
2+
===============================
3+
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
mythril.analysis.module.modules
11+
12+
Submodules
13+
----------
14+
15+
mythril.analysis.module.base module
16+
-----------------------------------
17+
18+
.. automodule:: mythril.analysis.module.base
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
23+
mythril.analysis.module.loader module
24+
-------------------------------------
25+
26+
.. automodule:: mythril.analysis.module.loader
27+
:members:
28+
:undoc-members:
29+
:show-inheritance:
30+
31+
mythril.analysis.module.module\_helpers module
32+
----------------------------------------------
33+
34+
.. automodule:: mythril.analysis.module.module_helpers
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
39+
mythril.analysis.module.util module
40+
-----------------------------------
41+
42+
.. automodule:: mythril.analysis.module.util
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
47+
Module contents
48+
---------------
49+
50+
.. automodule:: mythril.analysis.module
51+
:members:
52+
:undoc-members:
53+
:show-inheritance:

docs/source/mythril.analysis.modules.rst

-110
This file was deleted.

0 commit comments

Comments
 (0)