Skip to content

Commit 4568ccc

Browse files
committed
Java: Add some unit tests for sourceModelKindConfig.
1 parent a9bc23f commit 4568ccc

File tree

6 files changed

+34
-0
lines changed

6 files changed

+34
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class Empty { }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
| default |
2+
| remote |
3+
| request |
4+
| response |
5+
| uri-path |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import semmle.code.java.dataflow.ExternalFlowConfiguration as ExternalFlowConfiguration
2+
3+
query predicate supportedThreatModels(string kind) {
4+
ExternalFlowConfiguration::sourceModelKindConfig(kind)
5+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
| cli |
2+
| database |
3+
| default |
4+
| environment |
5+
| file |
6+
| local |
7+
| remote |
8+
| request |
9+
| response |
10+
| uri-path |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extensions:
2+
extensions:
3+
4+
- addsTo:
5+
pack: codeql/java-all
6+
extensible: supportedThreatModels
7+
data:
8+
- ["local"] # Add the "local" group threat model.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import semmle.code.java.dataflow.ExternalFlowConfiguration as ExternalFlowConfiguration
2+
3+
query predicate supportedThreatModels(string kind) {
4+
ExternalFlowConfiguration::sourceModelKindConfig(kind)
5+
}

0 commit comments

Comments
 (0)