Skip to content

Commit 5b949b1

Browse files
committed
Java: Cleanup threat model taxanomy to align with the EDR.
1 parent 5c700af commit 5b949b1

File tree

7 files changed

+10
-13
lines changed

7 files changed

+10
-13
lines changed

java/ql/lib/ext/threatmodels/threat-model-grouping.model.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ extensions:
66
data:
77
# Default threat model
88
- ["remote", "default"]
9-
- ["uri-path", "default"]
10-
11-
# Android threat models
12-
- ["android-external-storage-dir", "android"]
13-
- ["contentprovider", "android"]
149

1510
# Remote threat models
1611
- ["request", "remote"]
1712
- ["response", "remote"]
1813

1914
# Local threat models
2015
- ["database", "local"]
21-
- ["cli", "local"]
16+
- ["commandargs", "local"]
2217
- ["environment", "local"]
2318
- ["file", "local"]
19+
20+
# Android threat models
21+
- ["android-external-storage-dir", "android"]
22+
- ["contentprovider", "android"]

java/ql/lib/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private class CliInput extends LocalUserInput {
259259
exists(Field f | this.asExpr() = f.getAnAccess() | f instanceof SystemIn)
260260
}
261261

262-
override string getThreatModel() { result = "cli" }
262+
override string getThreatModel() { result = "commandargs" }
263263
}
264264

265265
/**

java/ql/test/library-tests/dataflow/threat-models/Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void M4(Statement handle) throws Exception {
5959
}
6060

6161
public void M5(Statement handle) throws Exception {
62-
// Only a source if "cli" is a selected threat model.
62+
// Only a source if "commandargs" is a selected threat model.
6363
byte[] data = new byte[1024];
6464
System.in.read(data);
6565

java/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extensions:
55
extensible: supportedThreatModels
66
data:
77
- ["environment"]
8-
- ["cli"]
8+
- ["commandargs"]
99

1010
- addsTo:
1111
pack: codeql/java-all

java/ql/test/library-tests/dataflow/threat-models/threat-models-flowtest5.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* This is a dataflow test using the "default" threat model with the
3-
* addition of "environment" and "cli".
3+
* addition of "environment" and "commandargs".
44
*/
55

66
import Test

java/ql/test/library-tests/dataflow/threat-models/threat-models1.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
| remote |
33
| request |
44
| response |
5-
| uri-path |
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| cli |
1+
| commandargs |
22
| database |
33
| default |
44
| environment |
@@ -7,4 +7,3 @@
77
| remote |
88
| request |
99
| response |
10-
| uri-path |

0 commit comments

Comments
 (0)