From 596b4d08657593ed97b5df847a19a520d658724c Mon Sep 17 00:00:00 2001 From: webthethird Date: Tue, 28 Feb 2023 13:49:56 -0600 Subject: [PATCH] Avoid `slitherConstructorConstantVariables()` when finding modified functions --- slither/utils/upgradeability.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/slither/utils/upgradeability.py b/slither/utils/upgradeability.py index 45bc78bda..d8bc645f6 100644 --- a/slither/utils/upgradeability.py +++ b/slither/utils/upgradeability.py @@ -65,7 +65,11 @@ def compare(v1: Contract, v2: Contract) -> dict: # Find all unmodified functions that call a modified function or read/write the # same state variable(s) as a new/modified function, i.e., tainted functions for function in v2.functions: - if function in new_modified_functions or function.is_constructor: + if ( + function in new_modified_functions + or function.is_constructor + or function.name.startswith("slither") + ): continue modified_calls = [ func for func in new_modified_functions if func in function.internal_calls