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 @@ -428,3 +428,25 @@ private class ClearSanitizer extends DefaultTaintSanitizer {
428
428
)
429
429
}
430
430
}
431
+
432
+ import SpeculativeTaintFlow
433
+
434
+ private module SpeculativeTaintFlow {
435
+ private import semmle.go.dataflow.internal.DataFlowDispatch as DataFlowDispatch
436
+
437
+ predicate speculativeTaintStep ( DataFlow:: Node src , DataFlow:: Node sink ) {
438
+ exists ( DataFlowPrivate:: DataFlowCall call , DataFlowDispatch:: ArgumentPosition argpos |
439
+ // TODO: exclude neutrals and anything that has QL modeling.
440
+ not exists ( DataFlowDispatch:: viableCallable ( call ) ) and
441
+ src .( DataFlow:: ArgumentNode ) .argumentOf ( call , argpos )
442
+ |
443
+ argpos != - 1 and
444
+ sink .( DataFlow:: PostUpdateNode )
445
+ .getPreUpdateNode ( )
446
+ .( DataFlow:: ArgumentNode )
447
+ .argumentOf ( call , - 1 )
448
+ or
449
+ sink .( DataFlowPrivate:: OutNode ) .getCall ( ) = call
450
+ )
451
+ }
452
+ }
You can’t perform that action at this time.
0 commit comments