Of course, black has to be done

pull/1029/head
Bernhard Mueller 6 years ago
parent cc63cda26f
commit 19ce7c7526
  1. 15
      mythril/analysis/modules/dependence_on_predictable_vars.py

@ -20,6 +20,7 @@ final_ops = ["CALL", "SUICIDE", "STOP"]
# One of Bernhard's trademark hacks!
def is_prehook():
"""Check if we are in prehook."""
return "pre_hook" in traceback.format_stack()[-4]
@ -108,19 +109,23 @@ def _analyze_states(state: GlobalState) -> list:
"generation or to make critical control flow decisions."
)
'''
"""
Usually report low severity except in cases where thje hash of a previous block is used to
determine control flow.
'''
"""
severity = "Medium" if "hash" in annotation.operation else "Low"
'''
"""
Note: We report the location of the JUMPI that lead to this path. Usually this maps to an if or
require statement.
'''
"""
swc_id = TIMESTAMP_DEPENDENCE if "timestamp" in annotation.operation else WEAK_RANDOMNESS
swc_id = (
TIMESTAMP_DEPENDENCE
if "timestamp" in annotation.operation
else WEAK_RANDOMNESS
)
issue = Issue(
contract=state.environment.active_account.contract_name,

Loading…
Cancel
Save