Refactor ConditionalBypass

This commit is contained in:
Ed Minnix
2023-03-19 23:41:21 -04:00
parent aa7934161a
commit a040ff6997
3 changed files with 23 additions and 6 deletions

View File

@@ -15,15 +15,15 @@
import java
import semmle.code.java.dataflow.DataFlow
import semmle.code.java.security.ConditionalBypassQuery
import DataFlow::PathGraph
import ConditionalBypassFlow::PathGraph
from
DataFlow::PathNode source, DataFlow::PathNode sink, MethodAccess m, Expr e,
ConditionalBypassFlowConfig conf
ConditionalBypassFlow::PathNode source, ConditionalBypassFlow::PathNode sink, MethodAccess m,
Expr e
where
conditionControlsMethod(m, e) and
sink.getNode().asExpr() = e and
conf.hasFlowPath(source, sink)
ConditionalBypassFlow::flowPath(source, sink)
select m, source, sink,
"Sensitive method may not be executed depending on a $@, which flows from $@.", e,
"this condition", source.getNode(), "user-controlled value"