From 4de564eb4e35d300865e788f229456dc8875acad Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Fri, 31 Oct 2025 14:01:12 +0100 Subject: [PATCH] C#: Replace reference to controlsBlock and simplify. --- .../csharp/security/dataflow/ConditionalBypassQuery.qll | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll index f2b46e4ebac..53b44f873a6 100644 --- a/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +++ b/csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll @@ -72,17 +72,10 @@ class ReverseDnsSource extends Source { } } -pragma[noinline] -private predicate conditionControlsCall0( - SensitiveExecutionMethodCall call, Expr e, ControlFlow::BooleanSuccessor s -) { - forex(BasicBlock bb | bb = call.getAControlFlowNode().getBasicBlock() | e.controlsBlock(bb, s, _)) -} - private predicate conditionControlsCall( SensitiveExecutionMethodCall call, SensitiveExecutionMethod def, Expr e, boolean cond ) { - exists(ControlFlow::BooleanSuccessor s | cond = s.getValue() | conditionControlsCall0(call, e, s)) and + e.(Guard).directlyControls(call.getBasicBlock(), cond) and def = call.getTarget().getUnboundDeclaration() }