Browse Source

Add initial markdown report

rocky 2 years ago
parent
commit
7af274db1f

+ 24 - 0
handlebars/issue-report.handlebars

@@ -0,0 +1,24 @@
+# Mythril Report For {{name}}
+
+**Table of Contents**
+
+{{#each issues}}
+- [Issue {{add1 @index}} {{type}}: {{title}}]({{issue_markdown_link @index type title}})
+{{/each}}
+
+{{#each issues}}
+## Issue {{add1 @index}} {{type}}: {{title}}
+
+{{description}}
+
+* [SWC-{{swc-id}}]({{swc_url swc-id}})
+{{#if address}}
+* Bytecode offset: offset {{address}}
+{{/if}}
+* Tool: {{tool}}
+{{#if function}}
+* Function {{function}}
+{{/if}}
+* Location: ???
+
+{{/each}}

+ 101 - 75
package-lock.json

@@ -65,7 +65,7 @@
     "abstract-leveldown": {
       "version": "2.6.3",
       "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz",
-      "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==",
+      "integrity": "sha1-HF6Mal75Za6MNd+zqHcMR2uCxLg=",
       "requires": {
         "xtend": "~4.0.0"
       }
@@ -329,7 +329,7 @@
     "async-eventemitter": {
       "version": "0.2.4",
       "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz",
-      "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==",
+      "integrity": "sha1-9efIyn0+Rqq57ECikrr2hqC6+so=",
       "requires": {
         "async": "^2.4.0"
       }
@@ -407,10 +407,6 @@
         "tweetnacl": "^0.14.3"
       }
     },
-    "bignumber.js": {
-      "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
-      "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git"
-    },
     "binary-extensions": {
       "version": "1.11.0",
       "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
@@ -795,7 +791,7 @@
     "cli-spinners": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz",
-      "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg=="
+      "integrity": "sha1-ACwZkJEtDVlYDJO9NsBW3pnkJZo="
     },
     "cli-width": {
       "version": "2.2.0",
@@ -1188,7 +1184,7 @@
     "deferred-leveldown": {
       "version": "1.2.2",
       "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz",
-      "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==",
+      "integrity": "sha1-Os0uC3XRZpkkvApLZChRExFz4es=",
       "requires": {
         "abstract-leveldown": "~2.6.0"
       }
@@ -1358,7 +1354,7 @@
     "errno": {
       "version": "0.1.7",
       "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
-      "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+      "integrity": "sha1-RoTXF3mtOa8Xfj8AeZb3xnyFJhg=",
       "requires": {
         "prr": "~1.0.1"
       }
@@ -1432,7 +1428,7 @@
         "cross-spawn": {
           "version": "6.0.5",
           "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
-          "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+          "integrity": "sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=",
           "requires": {
             "nice-try": "^1.0.4",
             "path-key": "^2.0.1",
@@ -1579,12 +1575,12 @@
     "ethereum-common": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz",
-      "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA=="
+      "integrity": "sha1-E7+WYTHM4e6t5iobQ0JJu0yxIMo="
     },
     "ethereumjs-account": {
       "version": "2.0.5",
       "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz",
-      "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==",
+      "integrity": "sha1-7q/GLeVEywew7kSxD1csnEngCoQ=",
       "requires": {
         "ethereumjs-util": "^5.0.0",
         "rlp": "^2.0.0",
@@ -1606,12 +1602,12 @@
     "ethereumjs-common": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-0.4.1.tgz",
-      "integrity": "sha512-ywYGsOeGCsMNWso5Y4GhjWI24FJv9FK7+VyVKiQgXg8ZRDPXJ7F/kJ1CnjtkjTvDF4e0yqU+FWswlqR3bmZQ9Q=="
+      "integrity": "sha1-J2kKJKgXsFjMOirt75OS6NfWOYQ="
     },
     "ethereumjs-tx": {
       "version": "1.3.7",
       "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz",
-      "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==",
+      "integrity": "sha1-iDI6LYdbEFSbg0fgn0hitUbz2Jo=",
       "requires": {
         "ethereum-common": "^0.0.18",
         "ethereumjs-util": "^5.0.0"
@@ -1627,7 +1623,7 @@
     "ethereumjs-util": {
       "version": "5.2.0",
       "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz",
-      "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==",
+      "integrity": "sha1-PgwNF0FHGs8QNgUtBIYj3uVK1kI=",
       "requires": {
         "bn.js": "^4.11.0",
         "create-hash": "^1.1.2",
@@ -1641,7 +1637,7 @@
     "ethereumjs-vm": {
       "version": "2.4.0",
       "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.4.0.tgz",
-      "integrity": "sha512-MJ4lCWa5c6LhahhhvoDKW+YGjK00ZQn0RHHLh4L+WaH1k6Qv7/q3uTluew6sJGNCZdlO0yYMDXYW9qyxLHKlgQ==",
+      "integrity": "sha1-JE8eNfJ1XlN6E1RhEdGkwVnTSxM=",
       "requires": {
         "async": "^2.1.2",
         "async-eventemitter": "^0.2.2",
@@ -1751,7 +1747,7 @@
     "ethjs-util": {
       "version": "0.1.6",
       "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz",
-      "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==",
+      "integrity": "sha1-8wi2Lxhfn+YjcTL7KpgYhmpc1TY=",
       "requires": {
         "is-hex-prefixed": "1.0.0",
         "strip-hex-prefix": "1.0.0"
@@ -1939,7 +1935,7 @@
     "fast-async": {
       "version": "6.3.8",
       "resolved": "https://registry.npmjs.org/fast-async/-/fast-async-6.3.8.tgz",
-      "integrity": "sha512-TjlooyqrYm/gOXjD2UHNwfrWkvTbzU105Nk4bvcRTeRoL+wIeK6rqbqDg3CN9z5p37cE2iXhP6SxQFz8OVIaUg==",
+      "integrity": "sha1-AxueHVqEYIsRez58mZrUd+0rCKI=",
       "requires": {
         "nodent-compiler": "^3.2.10",
         "nodent-runtime": ">=3.2.1"
@@ -2237,8 +2233,7 @@
         },
         "ansi-regex": {
           "version": "2.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -2256,13 +2251,11 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -2275,18 +2268,15 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -2389,8 +2379,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "ini": {
           "version": "1.3.5",
@@ -2400,7 +2389,6 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -2413,20 +2401,17 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "minipass": {
           "version": "2.2.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.1",
             "yallist": "^3.0.0"
@@ -2443,7 +2428,6 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -2516,8 +2500,7 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -2527,7 +2510,6 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -2603,8 +2585,7 @@
         },
         "safe-buffer": {
           "version": "5.1.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -2634,7 +2615,6 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -2652,7 +2632,6 @@
         "strip-ansi": {
           "version": "3.0.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -2691,13 +2670,11 @@
         },
         "wrappy": {
           "version": "1.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "yallist": {
           "version": "3.0.2",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         }
       }
     },
@@ -3273,6 +3250,35 @@
         }
       }
     },
+    "handlebars": {
+      "version": "4.0.12",
+      "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz",
+      "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==",
+      "requires": {
+        "async": "^2.5.0",
+        "optimist": "^0.6.1",
+        "source-map": "^0.6.1",
+        "uglify-js": "^3.1.4"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.17.1",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
+          "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==",
+          "optional": true
+        },
+        "uglify-js": {
+          "version": "3.4.9",
+          "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
+          "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
+          "optional": true,
+          "requires": {
+            "commander": "~2.17.1",
+            "source-map": "~0.6.1"
+          }
+        }
+      }
+    },
     "har-schema": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
@@ -3378,7 +3384,7 @@
     "http-errors": {
       "version": "1.7.1",
       "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.1.tgz",
-      "integrity": "sha512-jWEUgtZWGSMba9I1N3gc1HmvpBUaNC9vDdA46yScAdp+C5rdEuKWUBLWTQpW9FwSWSbYYs++b6SDCxf9UEJzfw==",
+      "integrity": "sha1-ak/+XTUYjhw5+HJTRpBYWFLh8Cc=",
       "requires": {
         "depd": "~1.1.2",
         "inherits": "2.0.3",
@@ -3884,12 +3890,12 @@
     "level-codec": {
       "version": "7.0.1",
       "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz",
-      "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ=="
+      "integrity": "sha1-NB8i+QfODxZ2PyS93WgeOVoPuKc="
     },
     "level-errors": {
       "version": "1.0.5",
       "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz",
-      "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==",
+      "integrity": "sha1-g9v7EvC4olFr3JoxxIdgOOInuFk=",
       "requires": {
         "errno": "~0.1.1"
       }
@@ -3976,7 +3982,7 @@
     "levelup": {
       "version": "1.3.9",
       "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz",
-      "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==",
+      "integrity": "sha1-LbyuhFsrsra+qE3zNMR1Uzu9gqs=",
       "requires": {
         "deferred-leveldown": "~1.2.1",
         "level-codec": "~7.0.0",
@@ -3990,7 +3996,7 @@
         "semver": {
           "version": "5.4.1",
           "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
-          "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
+          "integrity": "sha1-4FnAnYVx8FQII3M0M1BdOi8AsY4="
         }
       }
     },
@@ -4033,7 +4039,7 @@
     "log-symbols": {
       "version": "2.2.0",
       "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
-      "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+      "integrity": "sha1-V0Dhxdbw39pK2TI7UzIQfva0xAo=",
       "requires": {
         "chalk": "^2.0.1"
       }
@@ -4135,7 +4141,7 @@
         "abstract-leveldown": {
           "version": "2.7.2",
           "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz",
-          "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==",
+          "integrity": "sha1-h6RNfr68NB1ZZlIEg0yLfgkyzJM=",
           "requires": {
             "xtend": "~4.0.0"
           }
@@ -4164,7 +4170,7 @@
     "merkle-patricia-tree": {
       "version": "2.3.2",
       "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz",
-      "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==",
+      "integrity": "sha1-mCyhtaD94A7tL2ru0fkVKGC4IIo=",
       "requires": {
         "async": "^1.4.2",
         "ethereumjs-util": "^5.0.0",
@@ -4443,7 +4449,7 @@
     "nodent-compiler": {
       "version": "3.2.11",
       "resolved": "https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.2.11.tgz",
-      "integrity": "sha512-rfDrGWdgIJYomPUzR8nXiWNuIhJ7cVodPeZP3Ho65LEycuaX2uVNZ0ytpcfrmUKzdFeLRtye9+pHe8OynPZuPQ==",
+      "integrity": "sha1-j0vHA9fY0OVj9eCeoi79zgTbr5s=",
       "requires": {
         "acorn": ">= 2.5.2 <= 5.7.3",
         "acorn-es7-plugin": "^1.1.7",
@@ -4454,7 +4460,7 @@
         "acorn": {
           "version": "5.7.3",
           "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
-          "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw=="
+          "integrity": "sha1-Z6ojG/iBKXS4UjWpZ3Hra9B+onk="
         },
         "source-map": {
           "version": "0.5.7",
@@ -4466,12 +4472,12 @@
     "nodent-runtime": {
       "version": "3.2.1",
       "resolved": "https://registry.npmjs.org/nodent-runtime/-/nodent-runtime-3.2.1.tgz",
-      "integrity": "sha512-7Ws63oC+215smeKJQCxzrK21VFVlCFBkwl0MOObt0HOpVQXs3u483sAmtkF33nNqZ5rSOQjB76fgyPBmAUrtCA=="
+      "integrity": "sha1-nidV2F4592Qojw1HUuvP4+VB4A4="
     },
     "nodent-transform": {
       "version": "3.2.9",
       "resolved": "https://registry.npmjs.org/nodent-transform/-/nodent-transform-3.2.9.tgz",
-      "integrity": "sha512-4a5FH4WLi+daH/CGD5o/JWRR8W5tlCkd3nrDSkxbOzscJTyTUITltvOJeQjg3HJ1YgEuNyiPhQbvbtRjkQBByQ=="
+      "integrity": "sha1-7BGmEWtUduYLwhI3HPa45MdPQLY="
     },
     "normalize-path": {
       "version": "2.1.1",
@@ -4588,6 +4594,22 @@
         "mimic-fn": "^1.0.0"
       }
     },
+    "optimist": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+      "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
+      "requires": {
+        "minimist": "~0.0.1",
+        "wordwrap": "~0.0.2"
+      },
+      "dependencies": {
+        "wordwrap": {
+          "version": "0.0.3",
+          "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
+          "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
+        }
+      }
+    },
     "optionator": {
       "version": "0.8.2",
       "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
@@ -4604,7 +4626,7 @@
     "ora": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/ora/-/ora-3.0.0.tgz",
-      "integrity": "sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg==",
+      "integrity": "sha1-gXnjUluar9mSQtY8wgb9ZHMnQdA=",
       "requires": {
         "chalk": "^2.3.1",
         "cli-cursor": "^2.1.0",
@@ -5190,7 +5212,7 @@
     "remix-lib": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/remix-lib/-/remix-lib-0.4.1.tgz",
-      "integrity": "sha512-7k/O2GkJL7SqUID3a9ResfQ4X6G4JpJtneyjo7EGVpp18ZxPC57AiQ982+DBPzPcnWQ1NHgDFLtxKOZRmJ5yKg==",
+      "integrity": "sha1-UT54eUvb1Aeygnl80WAY2alWksg=",
       "requires": {
         "async": "^2.1.2",
         "ethereumjs-block": "^1.6.0",
@@ -5203,6 +5225,10 @@
         "web3": "0.20.6"
       },
       "dependencies": {
+        "bignumber.js": {
+          "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
+          "from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
+        },
         "elliptic": {
           "version": "6.3.3",
           "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz",
@@ -5217,7 +5243,7 @@
         "ethers": {
           "version": "3.0.29",
           "resolved": "https://registry.npmjs.org/ethers/-/ethers-3.0.29.tgz",
-          "integrity": "sha512-OGyA5pW5xFC5o/ZV5MfIoVp/EdA1QMg2bMJFf7Kznsz8m7IzzbgsPHTCjzSfKQDs/XDphGyRcA7A6bkIeJL4gw==",
+          "integrity": "sha1-zoE5lVtO1ERW62dksIm7EXyGd10=",
           "requires": {
             "aes-js": "3.0.0",
             "bn.js": "^4.4.0",
@@ -5458,7 +5484,7 @@
     "rustbn.js": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz",
-      "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA=="
+      "integrity": "sha1-gILLiG5wcVX9HLbyO9WRq41V0Mo="
     },
     "rxjs": {
       "version": "6.3.3",
@@ -5511,7 +5537,7 @@
     "secp256k1": {
       "version": "3.5.2",
       "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.2.tgz",
-      "integrity": "sha512-iin3kojdybY6NArd+UFsoTuapOF7bnJNf2UbcWXaY3z+E1sJDipl60vtzB5hbO/uquBu7z0fd4VC4Irp+xoFVQ==",
+      "integrity": "sha1-+V+VIFcxByIYT+nJFOa3EoHy8q4=",
       "requires": {
         "bindings": "^1.2.1",
         "bip66": "^1.1.3",
@@ -5544,7 +5570,7 @@
     "semaphore": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz",
-      "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA=="
+      "integrity": "sha1-qq2LhrIP6OmzKxbcLuaCqM0mqKo="
     },
     "semver": {
       "version": "5.5.0",
@@ -6374,7 +6400,7 @@
     "toidentifier": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
-      "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
+      "integrity": "sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM="
     },
     "tough-cookie": {
       "version": "2.4.3",
@@ -7362,7 +7388,7 @@
         "fs-extra": {
           "version": "6.0.1",
           "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz",
-          "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==",
+          "integrity": "sha1-irwSj3lG4xATXdyTuYvdtBDno0s=",
           "requires": {
             "graceful-fs": "^4.1.2",
             "jsonfile": "^4.0.0",
@@ -7372,7 +7398,7 @@
         "lodash": {
           "version": "4.17.10",
           "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
-          "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
+          "integrity": "sha1-G3eTz3JZ6jj7NmHU04syYK+K5Oc="
         },
         "truffle-artifactor": {
           "version": "4.0.0",
@@ -7790,7 +7816,7 @@
     "typedarray-to-buffer": {
       "version": "3.1.5",
       "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
-      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+      "integrity": "sha1-qX7nqf9CaRufeD/xvFES/j/KkIA=",
       "requires": {
         "is-typedarray": "^1.0.0"
       }
@@ -7804,7 +7830,7 @@
     "uglify-es": {
       "version": "3.3.9",
       "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz",
-      "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==",
+      "integrity": "sha1-DBxPBwC+2NvBJM2zBNJZLKID5nc=",
       "requires": {
         "commander": "~2.13.0",
         "source-map": "~0.6.1"
@@ -7813,7 +7839,7 @@
         "commander": {
           "version": "2.13.0",
           "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
-          "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA=="
+          "integrity": "sha1-aWS8pnaF33wfFDDFhPB9dZeIW5w="
         }
       }
     },
@@ -8121,7 +8147,7 @@
         "debug": {
           "version": "3.1.0",
           "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
-          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+          "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
           "dev": true,
           "requires": {
             "ms": "2.0.0"
@@ -8160,7 +8186,7 @@
         "supports-color": {
           "version": "4.4.0",
           "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz",
-          "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==",
+          "integrity": "sha1-iD992rwWUUKyphQn8zUt7RldGj4=",
           "dev": true,
           "requires": {
             "has-flag": "^2.0.0"
@@ -8519,7 +8545,7 @@
         "debug": {
           "version": "2.6.9",
           "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
-          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=",
           "requires": {
             "ms": "2.0.0"
           }

+ 3 - 2
package.json

@@ -53,13 +53,16 @@
     "abi-code-gen": "0.0.3",
     "ajv": "^6.5.2",
     "ajv-keywords": "^3.2.0",
+    "antlr4-c3": "^1.1.8",
     "armlet": ">=0.3.1",
     "fs-extra": "^4.0.3",
+    "handlebars": "^4.0.12",
     "nethereum-codegen": "^1.0.6",
     "read-yaml": "^1.1.0",
     "remix-lib": ">=0.4.1",
     "solc": "^0.5.0",
     "solhint": "^1.4.0",
+    "solidity-parser-antlr": "^0.3.2",
     "solium": "^1.1.8",
     "solparse": "^2.2.5",
     "truffle-artifactor": "^2.1.4",
@@ -67,8 +70,6 @@
     "truffle-workflow-compile": "^2.0.0",
     "vscode-languageclient": "^5.1.1",
     "vscode-languageserver": "^5.1.0",
-    "solidity-parser-antlr": "^0.3.2",
-    "antlr4-c3": "^1.1.8",
     "vscode-uri": "^1.0.3"
   },
   "devDependencies": {

+ 14 - 1
src/analysis/mythril/main.ts

@@ -9,6 +9,7 @@ import { ContractCollection } from '../../model/contractsCollection';
 import { ApiVersion, Client } from 'armlet';
 import { versionJSON2String, getFormatter } from './util';
 import { printReport } from './es-reporter';
+import { writeMarkdownReport } from './md-reporter';
 
 import * as Config from 'truffle-config';
 import { compile } from 'truffle-workflow-compile';
@@ -250,7 +251,19 @@ export function mythrilAnalyze() {
                 const formatter = getFormatter(solidityConfig.mythrilReportFormat);
                 const esIssues = myth.issues2Eslint(issues, buildObj, analyzeOpts);
                 printReport(esIssues, contractName, formatter, showMessage);
-                // showMessage(mess);
+                const now = new Date();
+                const reportsDir = trufstuf.getMythReportsDir(buildContractsDir);
+                const mdData = {
+                    compilerVersion: analyzeOpts.data.compiler.version,
+                    contractName: analyzeOpts.data.contractName,
+                    issues: esIssues,
+                    reportsDir: reportsDir,
+                    secsSinceEpoch: +now,
+                    sourcePath: analyzeOpts.data.sourcePath,
+                    // Add stuff like mythril version
+                };
+                const reportPath = writeMarkdownReport(mdData);
+                // FIXME edit report file.
             }).catch(err => {
                 showMessage(err);
                 vscode.window.showWarningMessage(err);

+ 23 - 13
src/analysis/mythril/myth.ts

@@ -47,11 +47,13 @@ const myth2Severity = {
 };
 
 const myth2EslintField = {
-    address: 'addr2lineColumn', // Not used
-    description: 'message',
-    line: 'lineNumberStart',
+    'address': 'addr2lineColumn', // Not used
+    'description': 'message',
+    'line': 'lineNumberStart',
     'swc-description': 'message',
-    type: 'severity',
+    'title': 'title',
+    'tool': 'tool',
+    'type': 'severity',
 };
 
 // FIXME figure out how to export this class.
@@ -134,20 +136,23 @@ class Info {
   */
     public issue2EsLint(issue) {
         const esIssue = {
-            column: -1,
-            endCol: -1,
-            endLine: -1,
-            fatal: false,
-            line: '',
-            ruleId: '',
-            severity: myth2Severity.Warning,
+            'column': -1,
+            'endCol': -1,
+            'endLine': -1,
+            'fatal': false,
+            'line': '',
+            'ruleId': '',
+            'severity': myth2Severity.Warning,
+            'title': '',
+            'tool': '',
+            'type': '',
 
         };
 
-        let fields = ['type', 'address', 'description'];
+        let fields = ['title', 'tool', 'type', 'address', 'description'];
         switch (issue.tool) {
         case 'maru':
-            fields = ['type', 'line', 'swc-description'];
+           fields = ['title', 'tool', 'type', 'line', 'swc-description'];
             break;
         case 'mythril':
             issue['swc-id'] = `SWC-${issue['swc-id']}`;
@@ -169,6 +174,11 @@ class Info {
                 }
             } else if (esField === 'severity' && value !== undefined) {
                 esIssue[esField] = myth2Severity[value];
+                esIssue.type = value;
+            } else if (esField === 'title' && value !== undefined) {
+                esIssue[esField] = value;
+            } else if (esField === 'tool' && value !== undefined) {
+                esIssue[esField] = value;
             } else if (esField === 'message' && value !== undefined) {
                 esIssue[esField] = massageMessage(value);
             } else if (esField === 'lineNumberStart') {

+ 4 - 0
src/analysis/mythril/trufstuf.ts

@@ -31,6 +31,10 @@ export function getContractsDir(p: string) {
     return `${p}/contracts`;
 }
 
+export function getMythReportsDir(buildContractsDir: string) {
+    return path.normalize(path.join(buildContractsDir, '..', 'mythril'));
+}
+
 export function getTruffleBuildJsonFiles(directory): any {
     const files = fs.readdirSync(directory);
     const result = [];