File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/it/unipr/crosschain/checker Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public class AccessControlIncompletenessChecker implements
3939 private Set <Statement > taintedJumpi = new HashSet <>();
4040 private Map <Statement , Set <Integer >> jumpiProgramPoints = new HashMap <>();
4141 private SmartContract contract ;
42+ private final Set <String > stateMutabilityForbidden = Set .of ("view" , "pure" );
4243
4344 /**
4445 * Builds the checker for the given contract.
@@ -256,6 +257,8 @@ private void reportVulnerability(CheckToolWithAnalysisResults<
256257 Signature signature = contract .getFunctionSignatureByString (functionSignatureByStatement );
257258 if (signature == null )
258259 return ;
260+ if (stateMutabilityForbidden .contains (signature .getStateMutability ()))
261+ return ;
259262
260263 if (signature .isProtected ()) {
261264 log .warn (
You can’t perform that action at this time.
0 commit comments