mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
Fluent interface dataflow: support argument-output flow directly declared by the simpleLocalFlowStep relation
This means we will treat fluent interfaces that are modelled the same as those where we determine an argument flows to an output by inspection of the function body.
This commit is contained in:
@@ -427,6 +427,14 @@ private module Cached {
|
||||
fromPre = fromNode.(PostUpdateNode).getPreUpdateNode() and
|
||||
toPre = toNode.(PostUpdateNode).getPreUpdateNode()
|
||||
|
|
||||
exists(DataFlowCall c |
|
||||
// Does the language-specific simpleLocalFlowStep already model flow
|
||||
// from function input to output?
|
||||
fromPre = getAnOutNode(c, _) and
|
||||
toPre.(ArgumentNode).argumentOf(c, _) and
|
||||
simpleLocalFlowStep(toPre.(ArgumentNode), fromPre)
|
||||
)
|
||||
or
|
||||
argumentValueFlowsThrough(toPre, TReadStepTypesNone(), fromPre)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user