Skip to content

Commit

Permalink
C#: Implement multipleArgumentCallExclude
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Aug 31, 2023
1 parent 8d0315b commit 74c3fd4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions csharp/ql/consistency-queries/DataFlowConsistency.ql
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ private module Input implements InputSig<CsharpDataFlow> {
}

predicate reverseReadExclude(Node n) { n.asExpr() = any(AwaitExpr ae).getExpr() }

predicate multipleArgumentCallExclude(ArgumentNode arg, DataFlowCall call) {
// exists(ControlFlow::Node cfn |
// exists(arg.asExprAtNode(cfn)) and
// cfn.getASuccessor(any(ControlFlow::SuccessorTypes::ConditionalSuccessor c)) =
// call.getControlFlowNode()
// )
// TODO: Remove once object initializer nodes are modelled properly
arg.(Private::PostUpdateNodes::ObjectInitializerNode).argumentOf(call, _)
}
}

import MakeConsistency<CsharpDataFlow, CsharpTaintTracking, Input>
Original file line number Diff line number Diff line change
Expand Up @@ -2026,7 +2026,7 @@ abstract class PostUpdateNode extends Node {
abstract Node getPreUpdateNode();
}

private module PostUpdateNodes {
module PostUpdateNodes {
class ObjectCreationNode extends PostUpdateNode, ExprNode, TExprNode {
private ObjectCreation oc;

Expand Down

0 comments on commit 74c3fd4

Please sign in to comment.