From 589fadf274568cfa4ea8e1fd8f683f8e97c2249a Mon Sep 17 00:00:00 2001 From: Konrad Weiss Date: Thu, 30 Nov 2023 00:01:12 +0100 Subject: [PATCH] Excluding internal functions --- cpg-solidity/src/main/resources/AccessControlLogic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpg-solidity/src/main/resources/AccessControlLogic b/cpg-solidity/src/main/resources/AccessControlLogic index c1b7fa12a2..b3e242c2b9 100644 --- a/cpg-solidity/src/main/resources/AccessControlLogic +++ b/cpg-solidity/src/main/resources/AccessControlLogic @@ -1,5 +1,5 @@ match p=(entry:FunctionDeclaration)-[e:EOG|INVOKES|RETURNS*]->(writingNode)-[:EOG|INVOKES|RETURNS*]->(last) -where not 'ConstructorDeclaration' in labels(entry) and not exists((last)-[:EOG|INVOKES]->()) +where not 'ConstructorDeclaration' in labels(entry) and not split(entry.code, '{')[0] contains ' internal ' and not 'internal' in entry.code and not exists((last)-[:EOG|INVOKES]->()) and exists((writingNode)-[:DFG]->(:FieldDeclaration)<-[:REFERS_TO]-()<-[:LHS|RHS]-(:BinaryOperator {operatorCode: '=='})-[:LHS|RHS]->({code: 'msg.sender'})) and not exists{ match ({code : 'msg.sender'})-[:DFG*]->(n)<-[:DFG*]-(:FieldDeclaration)