Skip to content

Commit ed3d3a1

Browse files
committed
Go: Exclude all FlowSummaryNodes from test results
1 parent d506db7 commit ed3d3a1

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import go
2+
import semmle.go.dataflow.internal.DataFlowPrivate
23

34
from DataFlow::Node nd, DataFlow::Node succ
45
where
56
TaintTracking::localTaintStep(nd, succ) and
67
// exclude data-flow steps
78
not DataFlow::localFlowStep(nd, succ) and
89
// Exclude results from libraries
9-
not exists(string pkg, string name |
10-
nd.(DataFlow::SummarizedParameterNode)
11-
.getCallable()
12-
.asSummarizedCallable()
13-
.asFunction()
14-
.hasQualifiedName(pkg, name)
15-
)
10+
not nd instanceof FlowSummaryNode
1611
select nd, succ
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
// This test finds taint tracking steps which are not data flow steps
22
// to illustrate which steps are added specifically by taint tracking
33
import go
4+
import semmle.go.dataflow.internal.DataFlowPrivate
45

56
from DataFlow::Node pred, DataFlow::Node succ
67
where
78
TaintTracking::localTaintStep(pred, succ) and
89
not DataFlow::localFlowStep(pred, succ) and
910
// Exclude results from libraries
10-
not exists(string pkg, string name |
11-
pred.(DataFlow::SummarizedParameterNode)
12-
.getCallable()
13-
.asSummarizedCallable()
14-
.asFunction()
15-
.hasQualifiedName(pkg, name)
16-
)
11+
not pred instanceof FlowSummaryNode
1712
select pred, succ

0 commit comments

Comments
 (0)