diff --git a/mythril/analysis/modules/ether_send.py b/mythril/analysis/modules/ether_send.py index 71131038..76e96a46 100644 --- a/mythril/analysis/modules/ether_send.py +++ b/mythril/analysis/modules/ether_send.py @@ -39,14 +39,14 @@ def execute(statespace): interesting = False - description = "In the function `" + call.node.function_name + "` " + description = "A non-zero amount of Ether is sent to a user-supplied address." if re.search(r"caller", str(call.to)): - description += "a non-zero amount of Ether is sent to msg.sender.\n" + description += " The target address is msg.sender.\n" interesting = True elif re.search(r"calldata", str(call.to)): - description += "a non-zero amount of Ether is sent to an address taken from function arguments.\n" + description += " The target address is taken from function arguments.\n" interesting = True else: @@ -56,7 +56,7 @@ def execute(statespace): idx = m.group(1) description += ( - "a non-zero amount of Ether is sent to an address taken from storage slot " + " The target address is taken from storage slot " + str(idx) + ".\n" ) diff --git a/mythril/analysis/modules/exceptions.py b/mythril/analysis/modules/exceptions.py index d27e1729..f1702abf 100644 --- a/mythril/analysis/modules/exceptions.py +++ b/mythril/analysis/modules/exceptions.py @@ -36,8 +36,7 @@ def execute(statespace): "out-of-bounds array access, or assert violations. " ) description += ( - "This is acceptable in most situations. " - "Note however that `assert()` should only be used to check invariants. " + "Note that explicit `assert()` should only be used to check invariants. " "Use `require()` for regular input checking. " ) diff --git a/mythril/analysis/modules/integer.py b/mythril/analysis/modules/integer.py index 3b373926..c6f02936 100644 --- a/mythril/analysis/modules/integer.py +++ b/mythril/analysis/modules/integer.py @@ -99,12 +99,7 @@ def _check_integer_overflow(statespace, state, node): _type="Warning", ) - issue.description = ( - "A possible integer overflow exists in the function `{}`.\n" - "The addition or multiplication may result in a value higher than the maximum representable integer.".format( - node.function_name - ) - ) + issue.description = "The arithmetic operation can result in integer overflow.\n" issue.debug = solver.pretty_print_model(model) issues.append(issue) @@ -213,10 +208,7 @@ def _check_integer_underflow(statespace, state, node): ) issue.description = ( - "A possible integer underflow exists in the function `" - + node.function_name - + "`.\n" - "The subtraction may result in a value < 0." + "The substraction can result in an integer underflow.\n" ) issue.debug = solver.pretty_print_model(model) diff --git a/mythril/analysis/modules/multiple_sends.py b/mythril/analysis/modules/multiple_sends.py index a53e20b5..c3489141 100644 --- a/mythril/analysis/modules/multiple_sends.py +++ b/mythril/analysis/modules/multiple_sends.py @@ -33,7 +33,7 @@ def execute(statespace): ) issue.description = ( - "Multiple sends exist in one transaction. Try to isolate each external call into its own transaction," + "Multiple sends are executed in a single transaction. Try to isolate each external call into its own transaction," " as external calls can fail accidentally or deliberately.\nConsecutive calls: \n" ) diff --git a/mythril/analysis/modules/suicide.py b/mythril/analysis/modules/suicide.py index 0d1b4859..70e68a4c 100644 --- a/mythril/analysis/modules/suicide.py +++ b/mythril/analysis/modules/suicide.py @@ -39,9 +39,8 @@ def _analyze_state(state, node): to = state.mstate.stack[-1] logging.debug("[UNCHECKED_SUICIDE] suicide in function " + node.function_name) - description = ( - "The function `" + node.function_name + "` executes the SUICIDE instruction. " - ) + + description = "A reachable SUICIDE instruction was detected. " if "caller" in str(to): description += "The remaining Ether is sent to the caller's address.\n" diff --git a/mythril/analysis/modules/transaction_order_dependence.py b/mythril/analysis/modules/transaction_order_dependence.py index bd6a36f8..8d98bfdb 100644 --- a/mythril/analysis/modules/transaction_order_dependence.py +++ b/mythril/analysis/modules/transaction_order_dependence.py @@ -43,10 +43,8 @@ def execute(statespace): ) issue.description = ( - "A possible transaction order dependence vulnerability exists in function {}. The value or " - "direction of the call statement is determined from a tainted storage location".format( - node.function_name - ) + "Possible transaction order dependence vulnerability: The value or " + "direction of the call statement is determined from a tainted storage location" ) issues.append(issue) diff --git a/tests/cmd_line_test.py b/tests/cmd_line_test.py index 9c5033aa..83ade882 100644 --- a/tests/cmd_line_test.py +++ b/tests/cmd_line_test.py @@ -26,7 +26,8 @@ class TruffleTestCase(BaseTestCase): def test_analysis_truffle_project(self): truffle_project_root = str(TESTS_DIR / "truffle_project") command = "cd {}; truffle compile; python3 {} --truffle".format(truffle_project_root, MYTH) - self.assertIn("In the function `withdrawfunds()` a non-zero amount of Ether is sent to msg.sender.", output_of(command)) + self.assertIn("A non-zero amount of Ether is sent to a user-supplied address. The target address is msg.sender." + , output_of(command)) class InfuraTestCase(BaseTestCase): diff --git a/tests/testdata/outputs_expected/calls.sol.o.graph.html b/tests/testdata/outputs_expected/calls.sol.o.graph.html index 6af2b5fa..cc2b882d 100644 --- a/tests/testdata/outputs_expected/calls.sol.o.graph.html +++ b/tests/testdata/outputs_expected/calls.sol.o.graph.html @@ -8,6 +8,7 @@
Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
-Mythril / Ethereum LASER Symbolic VM
+ + + +