Merge pull request #277 from github/hvitved/flow-summaries

Add support for flow summaries
This commit is contained in:
Tom Hvitved
2021-09-23 14:31:52 +02:00
committed by GitHub
17 changed files with 1541 additions and 93 deletions

View File

@@ -13,7 +13,6 @@
import ruby
import codeql.ruby.ast.internal.Module
import codeql.ruby.dataflow.SSA
import codeql.ruby.dataflow.internal.DataFlowDispatch
from DefLoc loc, Expr src, Expr target, string kind
where
@@ -38,9 +37,7 @@ newtype DefLoc =
/** A constant, module or class. */
ConstantDefLoc(ConstantReadAccess read, ConstantWriteAccess write) { write = definitionOf(read) } or
/** A method call. */
MethodLoc(MethodCall call, Method meth) {
exists(DataFlowCall c | c.getExpr() = call and c.getTarget() = meth)
} or
MethodLoc(MethodCall call, Method meth) { meth = call.getATarget() } or
/** A local variable. */
LocalVariableLoc(VariableReadAccess read, VariableWriteAccess write) {
exists(Ssa::WriteDefinition w |