File tree Expand file tree Collapse file tree
go/ql/test/library-tests/semmle/go/dataflow/HiddenNodes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ failures
12edges
23| test.go:14:8:14:15 | call to source | test.go:15:34:15:35 | fi |
34| test.go:15:2:15:44 | ... := ...[0] | test.go:16:7:16:12 | header |
Original file line number Diff line number Diff line change 1- /**
2- * @kind path-problem
3- */
4-
51import go
6- import DataFlow:: PathGraph
7-
8- class Config extends TaintTracking:: Configuration {
9- Config ( ) { this = "config" }
2+ import TestUtilities.InlineFlowTest
103
11- override predicate isSource ( DataFlow:: Node n ) {
12- n = any ( DataFlow:: CallNode call | call .getTarget ( ) .getName ( ) = "source" ) .getResult ( )
13- }
4+ module Flow = TaintTracking:: Global< DefaultFlowConfig > ;
145
15- override predicate isSink ( DataFlow:: Node n ) {
16- n = any ( DataFlow:: CallNode call | call .getTarget ( ) .getName ( ) = "sink" ) .getAnArgument ( )
17- }
18- }
6+ import Flow:: PathGraph
197
20- from DataFlow :: PathNode source , DataFlow :: PathNode sink , Config c
21- where c . hasFlowPath ( source , sink )
8+ from Flow :: PathNode source , Flow :: PathNode sink
9+ where Flow :: flowPath ( source , sink )
2210select source , source , sink , "Path"
You can’t perform that action at this time.
0 commit comments