Skip to content

Commit 0255edf

Browse files
committed
Remove tests for sources and sinks
This is redundant given that we test for paths, and for a path we need the source, step and sink methods to be modeled.
1 parent afa4b6d commit 0255edf

36 files changed

+36
-352
lines changed
Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
11
testFailures
22
invalidModelRow
33
failures
4-
sources
5-
| test.go:8:7:8:16 | call to Source |
6-
| test.go:14:7:14:16 | call to Source |
7-
| test.go:20:7:20:16 | call to Source |
8-
| test.go:26:7:26:16 | call to Source |
9-
| test.go:32:7:32:16 | call to Source |
10-
| test.go:38:7:38:16 | call to Source |
11-
| test.go:44:7:44:16 | call to Source |
12-
| test.go:50:7:50:16 | call to Source |
13-
| test.go:56:7:56:16 | call to Source |
14-
| test.go:62:7:62:16 | call to Source |
15-
| test.go:68:7:68:16 | call to Source |
16-
| test.go:74:7:74:16 | call to Source |
17-
| test.go:80:7:80:16 | call to Source |
18-
| test.go:86:7:86:16 | call to Source |
19-
sinks
20-
| test.go:10:9:10:9 | y |
21-
| test.go:16:9:16:9 | y |
22-
| test.go:22:9:22:9 | y |
23-
| test.go:28:9:28:9 | y |
24-
| test.go:34:9:34:9 | y |
25-
| test.go:40:9:40:9 | y |
26-
| test.go:46:9:46:9 | y |
27-
| test.go:52:9:52:9 | y |
28-
| test.go:58:9:58:9 | y |
29-
| test.go:64:9:64:9 | y |
30-
| test.go:70:9:70:9 | y |
31-
| test.go:76:9:76:9 | y |
32-
| test.go:82:9:82:9 | y |
33-
| test.go:88:9:88:9 | y |

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI1_subtypes_true.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest
66
import MakeTest<FlowTest>
77

88
module Config implements DataFlow::ConfigSig {
9-
predicate isSource(DataFlow::Node source) { sources(source) }
9+
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1010

11-
predicate isSink(DataFlow::Node sink) { sinks(sink) }
11+
predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
1212
}
1313

1414
module Flow = TaintTracking::Global<Config>;
@@ -26,7 +26,3 @@ module FlowTest implements TestSig {
2626
)
2727
}
2828
}
29-
30-
query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource }
31-
32-
query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
testFailures
22
invalidModelRow
33
failures
4-
sources
5-
| test.go:14:7:14:16 | call to Source |
6-
| test.go:26:7:26:16 | call to Source |
7-
| test.go:38:7:38:16 | call to Source |
8-
| test.go:50:7:50:16 | call to Source |
9-
| test.go:62:7:62:16 | call to Source |
10-
| test.go:74:7:74:16 | call to Source |
11-
| test.go:86:7:86:16 | call to Source |
12-
sinks
13-
| test.go:16:9:16:9 | y |
14-
| test.go:28:9:28:9 | y |
15-
| test.go:40:9:40:9 | y |
16-
| test.go:52:9:52:9 | y |
17-
| test.go:64:9:64:9 | y |
18-
| test.go:76:9:76:9 | y |
19-
| test.go:88:9:88:9 | y |

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_IEmbedI2_subtypes_true.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest
66
import MakeTest<FlowTest>
77

88
module Config implements DataFlow::ConfigSig {
9-
predicate isSource(DataFlow::Node source) { sources(source) }
9+
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1010

11-
predicate isSink(DataFlow::Node sink) { sinks(sink) }
11+
predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
1212
}
1313

1414
module Flow = TaintTracking::Global<Config>;
@@ -26,7 +26,3 @@ module FlowTest implements TestSig {
2626
)
2727
}
2828
}
29-
30-
query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource }
31-
32-
query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
11
testFailures
22
invalidModelRow
33
failures
4-
sources
5-
| test.go:8:7:8:16 | call to Source |
6-
| test.go:14:7:14:16 | call to Source |
7-
| test.go:20:7:20:16 | call to Source |
8-
| test.go:26:7:26:16 | call to Source |
9-
| test.go:32:7:32:16 | call to Source |
10-
| test.go:38:7:38:16 | call to Source |
11-
| test.go:44:7:44:16 | call to Source |
12-
| test.go:50:7:50:16 | call to Source |
13-
| test.go:56:7:56:16 | call to Source |
14-
| test.go:62:7:62:16 | call to Source |
15-
| test.go:68:7:68:16 | call to Source |
16-
| test.go:74:7:74:16 | call to Source |
17-
| test.go:80:7:80:16 | call to Source |
18-
| test.go:86:7:86:16 | call to Source |
19-
sinks
20-
| test.go:10:9:10:9 | y |
21-
| test.go:16:9:16:9 | y |
22-
| test.go:22:9:22:9 | y |
23-
| test.go:28:9:28:9 | y |
24-
| test.go:34:9:34:9 | y |
25-
| test.go:40:9:40:9 | y |
26-
| test.go:46:9:46:9 | y |
27-
| test.go:52:9:52:9 | y |
28-
| test.go:58:9:58:9 | y |
29-
| test.go:64:9:64:9 | y |
30-
| test.go:70:9:70:9 | y |
31-
| test.go:76:9:76:9 | y |
32-
| test.go:82:9:82:9 | y |
33-
| test.go:88:9:88:9 | y |

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI1_subtypes_true.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest
66
import MakeTest<FlowTest>
77

88
module Config implements DataFlow::ConfigSig {
9-
predicate isSource(DataFlow::Node source) { sources(source) }
9+
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1010

11-
predicate isSink(DataFlow::Node sink) { sinks(sink) }
11+
predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
1212
}
1313

1414
module Flow = TaintTracking::Global<Config>;
@@ -26,7 +26,3 @@ module FlowTest implements TestSig {
2626
)
2727
}
2828
}
29-
30-
query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource }
31-
32-
query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
testFailures
22
invalidModelRow
33
failures
4-
sources
5-
| test.go:14:7:14:16 | call to Source |
6-
| test.go:26:7:26:16 | call to Source |
7-
| test.go:38:7:38:16 | call to Source |
8-
| test.go:50:7:50:16 | call to Source |
9-
| test.go:62:7:62:16 | call to Source |
10-
| test.go:74:7:74:16 | call to Source |
11-
| test.go:86:7:86:16 | call to Source |
12-
sinks
13-
| test.go:16:9:16:9 | y |
14-
| test.go:28:9:28:9 | y |
15-
| test.go:40:9:40:9 | y |
16-
| test.go:52:9:52:9 | y |
17-
| test.go:64:9:64:9 | y |
18-
| test.go:76:9:76:9 | y |
19-
| test.go:88:9:88:9 | y |

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedI2_subtypes_true.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest
66
import MakeTest<FlowTest>
77

88
module Config implements DataFlow::ConfigSig {
9-
predicate isSource(DataFlow::Node source) { sources(source) }
9+
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1010

11-
predicate isSink(DataFlow::Node sink) { sinks(sink) }
11+
predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
1212
}
1313

1414
module Flow = TaintTracking::Global<Config>;
@@ -26,7 +26,3 @@ module FlowTest implements TestSig {
2626
)
2727
}
2828
}
29-
30-
query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource }
31-
32-
query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
testFailures
22
invalidModelRow
33
failures
4-
sources
5-
sinks

go/ql/test/library-tests/semmle/go/dataflow/ExternalFlowInheritance/mad_SEmbedS1_subtypes_true.ql

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import TestUtilities.InlineExpectationsTest
66
import MakeTest<FlowTest>
77

88
module Config implements DataFlow::ConfigSig {
9-
predicate isSource(DataFlow::Node source) { sources(source) }
9+
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1010

11-
predicate isSink(DataFlow::Node sink) { sinks(sink) }
11+
predicate isSink(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }
1212
}
1313

1414
module Flow = TaintTracking::Global<Config>;
@@ -26,7 +26,3 @@ module FlowTest implements TestSig {
2626
)
2727
}
2828
}
29-
30-
query predicate sources(DataFlow::Node source) { source instanceof RemoteFlowSource }
31-
32-
query predicate sinks(DataFlow::Node sink) { sink = any(FileSystemAccess fsa).getAPathArgument() }

0 commit comments

Comments
 (0)