File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
go/ql/lib/semmle/go/dataflow/internal Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -427,3 +427,25 @@ private class ClearSanitizer extends DefaultTaintSanitizer {
427427 )
428428 }
429429}
430+
431+ import SpeculativeTaintFlow
432+
433+ private module SpeculativeTaintFlow {
434+ private import semmle.go.dataflow.internal.DataFlowDispatch as DataFlowDispatch
435+
436+ predicate speculativeTaintStep ( DataFlow:: Node src , DataFlow:: Node sink ) {
437+ exists ( DataFlowPrivate:: DataFlowCall call , DataFlowDispatch:: ArgumentPosition argpos |
438+ // TODO: exclude neutrals and anything that has QL modeling.
439+ not exists ( DataFlowDispatch:: viableCallable ( call ) ) and
440+ src .( DataFlow:: ArgumentNode ) .argumentOf ( call , argpos )
441+ |
442+ argpos != - 1 and
443+ sink .( DataFlow:: PostUpdateNode )
444+ .getPreUpdateNode ( )
445+ .( DataFlow:: ArgumentNode )
446+ .argumentOf ( call , - 1 )
447+ or
448+ sink .( DataFlowPrivate:: OutNode ) .getCall ( ) = call
449+ )
450+ }
451+ }
You can’t perform that action at this time.
0 commit comments