mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Java: Cleanup threat model taxanomy to align with the EDR.
This commit is contained in:
@@ -6,11 +6,6 @@ extensions:
|
||||
data:
|
||||
# Default threat model
|
||||
- ["remote", "default"]
|
||||
- ["uri-path", "default"]
|
||||
|
||||
# Android threat models
|
||||
- ["android-external-storage-dir", "android"]
|
||||
- ["contentprovider", "android"]
|
||||
|
||||
# Remote threat models
|
||||
- ["request", "remote"]
|
||||
@@ -18,6 +13,10 @@ extensions:
|
||||
|
||||
# Local threat models
|
||||
- ["database", "local"]
|
||||
- ["cli", "local"]
|
||||
- ["commandargs", "local"]
|
||||
- ["environment", "local"]
|
||||
- ["file", "local"]
|
||||
|
||||
# Android threat models
|
||||
- ["android-external-storage-dir", "android"]
|
||||
- ["contentprovider", "android"]
|
||||
|
||||
@@ -259,7 +259,7 @@ private class CliInput extends LocalUserInput {
|
||||
exists(Field f | this.asExpr() = f.getAnAccess() | f instanceof SystemIn)
|
||||
}
|
||||
|
||||
override string getThreatModel() { result = "cli" }
|
||||
override string getThreatModel() { result = "commandargs" }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,7 +59,7 @@ class Test {
|
||||
}
|
||||
|
||||
public void M5(Statement handle) throws Exception {
|
||||
// Only a source if "cli" is a selected threat model.
|
||||
// Only a source if "commandargs" is a selected threat model.
|
||||
byte[] data = new byte[1024];
|
||||
System.in.read(data);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ extensions:
|
||||
extensible: supportedThreatModels
|
||||
data:
|
||||
- ["environment"]
|
||||
- ["cli"]
|
||||
- ["commandargs"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* This is a dataflow test using the "default" threat model with the
|
||||
* addition of "environment" and "cli".
|
||||
* addition of "environment" and "commandargs".
|
||||
*/
|
||||
|
||||
import Test
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
| remote |
|
||||
| request |
|
||||
| response |
|
||||
| uri-path |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
| cli |
|
||||
| commandargs |
|
||||
| database |
|
||||
| default |
|
||||
| environment |
|
||||
@@ -7,4 +7,3 @@
|
||||
| remote |
|
||||
| request |
|
||||
| response |
|
||||
| uri-path |
|
||||
|
||||
Reference in New Issue
Block a user