Skip to content

Commit cc320c5

Browse files
committed
Never skip functionmodel inputs and outputs in path summaries
1 parent d7c97f8 commit cc320c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/ql/lib/semmle/go/dataflow/internal/DataFlowPrivate.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ class CastNode extends ExprNode {
232232
* Holds if `n` should never be skipped over in the `PathGraph` and in path
233233
* explanations.
234234
*/
235-
predicate neverSkipInPathGraph(Node n) { none() }
235+
predicate neverSkipInPathGraph(Node n) {
236+
exists(DataFlow::FunctionModel fm | fm.getAnInputNode(_) = n or fm.getAnOutputNode(_) = n)
237+
or
238+
exists(TaintTracking::FunctionModel fm | fm.getAnInputNode(_) = n or fm.getAnOutputNode(_) = n)
239+
}
236240

237241
class DataFlowExpr = Expr;
238242

0 commit comments

Comments
 (0)