Skip to content

Commit eecab91

Browse files
committed
Recognize the model generator involvement in the models' provenances
1 parent 5b88b8a commit eecab91

10 files changed

+45
-46
lines changed

java/ql/lib/ext/java.beans.model.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extensions:
99
extensible: neutralModel
1010
data:
1111
# summary neutrals
12-
- ["java.beans", "PropertyEditor", "getAsText", "()", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
13-
- ["java.beans", "PropertyEditor", "getValue", "()", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
14-
- ["java.beans", "PropertyEditor", "setAsText", "()", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
15-
- ["java.beans", "PropertyEditor", "setValue", "()", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
12+
- ["java.beans", "PropertyEditor", "getAsText", "()", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
13+
- ["java.beans", "PropertyEditor", "getValue", "()", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
14+
- ["java.beans", "PropertyEditor", "setAsText", "()", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
15+
- ["java.beans", "PropertyEditor", "setValue", "()", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs

java/ql/lib/ext/java.io.model.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ extensions:
8080
- ["java.io", "File", True, "getName", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
8181
- ["java.io", "File", True, "getParentFile", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
8282
- ["java.io", "File", True, "getPath", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
83-
- ["java.io", "File", True, "listFiles", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
8483
- ["java.io", "File", True, "toPath", "", "", "Argument[this]", "ReturnValue", "taint", "manual"]
8584
- ["java.io", "File", True, "toString", "", "", "Argument[this]", "ReturnValue", "taint", "manual"]
8685
- ["java.io", "File", True, "toURI", "", "", "Argument[this]", "ReturnValue", "taint", "manual"]
@@ -116,12 +115,12 @@ extensions:
116115
- ["java.io", "File", "isFile", "()", "summary", "manual"]
117116
- ["java.io", "File", "length", "()", "summary", "manual"]
118117
- ["java.io", "File", "isDirectory", "()", "summary", "manual"]
119-
- ["java.io", "File", "listFiles", "", "summary", "manual"]
118+
- ["java.io", "File", "listFiles", "", "summary", "df-manual"]
120119
- ["java.io", "File", "mkdirs", "()", "summary", "manual"]
121120
- ["java.io", "FileInputStream", "FileInputStream", "(File)", "summary", "manual"]
122-
- ["java.io", "FileInputStream", "FileInputStream", "(String)", "summary", "manual"]
121+
- ["java.io", "FileInputStream", "FileInputStream", "(String)", "summary", "df-manual"]
123122
- ["java.io", "InputStream", "close", "()", "summary", "manual"]
124-
- ["java.io", "ObjectInput", "readObject", "()", "summary", "manual"]
123+
- ["java.io", "ObjectInput", "readObject", "()", "summary", "df-manual"] # this is a deserialization sink modeled in regular CodeQL
125124
- ["java.io", "OutputStream", "flush", "()", "summary", "manual"]
126125
# The below APIs have numeric flow and are currently being stored as neutral models.
127126
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.

java/ql/lib/ext/java.net.model.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ extensions:
6666
extensible: neutralModel
6767
data:
6868
# summary neutrals
69-
- ["java.net", "Socket", "getOutputStream", "()", "summary", "manual"]
70-
- ["java.net", "Socket", "connect", "(SocketAddress,int)", "summary", "manual"]
69+
- ["java.net", "Socket", "getOutputStream", "()", "summary", "df-manual"]
70+
- ["java.net", "Socket", "connect", "(SocketAddress,int)", "summary", "df-manual"]

java/ql/lib/ext/java.nio.file.model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extensions:
9191
data:
9292
# summary neutrals
9393
- ["java.nio.file", "Files", "exists", "(Path,LinkOption[])", "summary", "manual"]
94-
- ["java.nio.file", "Files", "newInputStream", "(Path,LinkOption[])", "summary", "manual"]
94+
- ["java.nio.file", "Files", "newInputStream", "(Path,LinkOption[])", "summary", "df-manual"]
9595
# sink neutrals
9696
- ["java.nio.file", "Files", "getLastModifiedTime", "", "sink", "hq-manual"]
9797
- ["java.nio.file", "Files", "getOwner", "", "sink", "hq-manual"]

java/ql/lib/ext/java.util.logging.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ extensions:
44
extensible: neutralModel
55
data:
66
# summary neutrals
7-
- ["java.util.logging", "LogRecord", "getResourceBundle", "()", "summary", "manual"]
8-
- ["java.util.logging", "LogRecord", "setParameters", "", "summary", "manual"]
7+
- ["java.util.logging", "LogRecord", "getResourceBundle", "()", "summary", "df-manual"]
8+
- ["java.util.logging", "LogRecord", "setParameters", "", "summary", "df-manual"]

java/ql/lib/ext/java.util.model.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ extensions:
107107
- ["java.util", "Collections", False, "unmodifiableSortedMap", "(SortedMap)", "", "Argument[0].MapKey", "ReturnValue.MapKey", "value", "manual"]
108108
- ["java.util", "Collections", False, "unmodifiableSortedMap", "(SortedMap)", "", "Argument[0].MapValue", "ReturnValue.MapValue", "value", "manual"]
109109
- ["java.util", "Collections", False, "unmodifiableSortedSet", "(SortedSet)", "", "Argument[0].Element", "ReturnValue.Element", "value", "manual"]
110-
- ["java.util", "ConcurrentHashMap", False, "ConcurrentHashMap", "(Map)", "", "Argument[0].MapKey", "Argument[this].MapKey", "value", "manual"]
111-
- ["java.util", "ConcurrentHashMap", False, "ConcurrentHashMap", "(Map)", "", "Argument[0].MapValue", "Argument[this].MapValue", "value", "manual"]
110+
- ["java.util", "ConcurrentHashMap", False, "ConcurrentHashMap", "(Map)", "", "Argument[0].MapKey", "Argument[this].MapKey", "value", "df-manual"]
111+
- ["java.util", "ConcurrentHashMap", False, "ConcurrentHashMap", "(Map)", "", "Argument[0].MapValue", "Argument[this].MapValue", "value", "df-manual"]
112112
- ["java.util", "Deque", True, "addFirst", "(Object)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
113113
- ["java.util", "Deque", True, "addLast", "(Object)", "", "Argument[0]", "Argument[this].Element", "value", "manual"]
114114
- ["java.util", "Deque", True, "descendingIterator", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
@@ -430,14 +430,14 @@ extensions:
430430
- ["java.util", "Collections", "emptySet", "()", "summary", "manual"]
431431
- ["java.util", "Collections", "sort", "", "summary", "manual"]
432432
- ["java.util", "Enumeration", "hasMoreElements", "()", "summary", "manual"]
433-
- ["java.util", "EnumSet", "allOf", "(Class)", "summary", "manual"]
434-
- ["java.util", "EnumSet", "clone", "()", "summary", "manual"]
435-
- ["java.util", "EnumSet", "complementOf", "(EnumSet)", "summary", "manual"]
436-
- ["java.util", "EnumSet", "copyOf", "(Collection)", "summary", "manual"]
437-
- ["java.util", "EnumSet", "copyOf", "(EnumSet)", "summary", "manual"]
438-
- ["java.util", "EnumSet", "noneOf", "(Class)", "summary", "manual"]
439-
- ["java.util", "EnumSet", "of", "", "summary", "manual"]
440-
- ["java.util", "EnumSet", "range", "(Object,Object)", "summary", "manual"]
433+
- ["java.util", "EnumSet", "allOf", "(Class)", "summary", "df-manual"]
434+
- ["java.util", "EnumSet", "clone", "()", "summary", "df-manual"]
435+
- ["java.util", "EnumSet", "complementOf", "(EnumSet)", "summary", "df-manual"]
436+
- ["java.util", "EnumSet", "copyOf", "(Collection)", "summary", "df-manual"]
437+
- ["java.util", "EnumSet", "copyOf", "(EnumSet)", "summary", "df-manual"]
438+
- ["java.util", "EnumSet", "noneOf", "(Class)", "summary", "df-manual"]
439+
- ["java.util", "EnumSet", "of", "", "summary", "df-manual"]
440+
- ["java.util", "EnumSet", "range", "(Object,Object)", "summary", "df-manual"]
441441
- ["java.util", "HashMap", "containsKey", "(Object)", "summary", "manual"]
442442
- ["java.util", "HashMap", "HashMap", "(int)", "summary", "manual"]
443443
- ["java.util", "HashMap", "size", "()", "summary", "manual"]
@@ -464,7 +464,7 @@ extensions:
464464
- ["java.util", "Optional", "isEmpty", "()", "summary", "manual"]
465465
- ["java.util", "Optional", "isPresent", "()", "summary", "manual"]
466466
- ["java.util", "Random", "nextInt", "(int)", "summary", "manual"]
467-
- ["java.util", "ResourceBundle", "getBundle", "", "summary", "manual"]
467+
- ["java.util", "ResourceBundle", "getBundle", "", "summary", "df-manual"]
468468
- ["java.util", "Set", "contains", "(Object)", "summary", "manual"]
469469
- ["java.util", "Set", "isEmpty", "()", "summary", "manual"]
470470
- ["java.util", "Set", "size", "()", "summary", "manual"]

java/ql/lib/ext/java.util.prefs.model.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ extensions:
44
extensible: neutralModel
55
data:
66
# summary neutrals
7-
- ["java.util.prefs", "Preferences", "get", "(String,String)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
8-
- ["java.util.prefs", "Preferences", "getBoolean", "(String,boolean)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
9-
- ["java.util.prefs", "Preferences", "getByteArray", "(String,byte[])", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
10-
- ["java.util.prefs", "Preferences", "getDouble", "(String,double)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
11-
- ["java.util.prefs", "Preferences", "getFloat", "(String,float)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
12-
- ["java.util.prefs", "Preferences", "getInt", "(String,int)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
13-
- ["java.util.prefs", "Preferences", "getLong", "(String,int)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
14-
- ["java.util.prefs", "Preferences", "put", "(String,String)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
15-
- ["java.util.prefs", "Preferences", "putBoolean", "(String,boolean)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
16-
- ["java.util.prefs", "Preferences", "putByteArray", "(String,byte[])", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
17-
- ["java.util.prefs", "Preferences", "putDouble", "(String,double)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
18-
- ["java.util.prefs", "Preferences", "putFloat", "(String,float)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
19-
- ["java.util.prefs", "Preferences", "putInt", "(String,int)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
20-
- ["java.util.prefs", "Preferences", "putLong", "(String,int)", "summary", "manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
7+
- ["java.util.prefs", "Preferences", "get", "(String,String)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
8+
- ["java.util.prefs", "Preferences", "getBoolean", "(String,boolean)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
9+
- ["java.util.prefs", "Preferences", "getByteArray", "(String,byte[])", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
10+
- ["java.util.prefs", "Preferences", "getDouble", "(String,double)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
11+
- ["java.util.prefs", "Preferences", "getFloat", "(String,float)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
12+
- ["java.util.prefs", "Preferences", "getInt", "(String,int)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
13+
- ["java.util.prefs", "Preferences", "getLong", "(String,int)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
14+
- ["java.util.prefs", "Preferences", "put", "(String,String)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
15+
- ["java.util.prefs", "Preferences", "putBoolean", "(String,boolean)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
16+
- ["java.util.prefs", "Preferences", "putByteArray", "(String,byte[])", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
17+
- ["java.util.prefs", "Preferences", "putDouble", "(String,double)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
18+
- ["java.util.prefs", "Preferences", "putFloat", "(String,float)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
19+
- ["java.util.prefs", "Preferences", "putInt", "(String,int)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
20+
- ["java.util.prefs", "Preferences", "putLong", "(String,int)", "summary", "df-manual"] # needs to be modeled by regular CodeQL matching the get and set keys to reduce FPs
2121
# sink neutrals
2222
- ["java.util.prefs", "AbstractPreferences", "nodeExists", "", "sink", "hq-manual"]
2323
- ["java.util.prefs", "Preferences", "nodeExists", "", "sink", "hq-manual"]

java/ql/lib/ext/java.util.regex.model.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ extensions:
3030
pack: codeql/java-all
3131
extensible: neutralModel
3232
data:
33-
- ["java.util.regex", "Matcher", "appendReplacement", "(StringBuffer,String)", "summary", "manual"]
34-
- ["java.util.regex", "Matcher", "appendTail", "(StringBuffer)", "summary", "manual"]
33+
- ["java.util.regex", "Matcher", "appendReplacement", "(StringBuffer,String)", "summary", "df-manual"]
34+
- ["java.util.regex", "Matcher", "appendTail", "(StringBuffer)", "summary", "df-manual"]
3535
- ["java.util.regex", "Matcher", "find", "()", "summary", "manual"]
36-
- ["java.util.regex", "Matcher", "pattern", "()", "summary", "manual"]
37-
- ["java.util.regex", "Pattern", "compile", "(String,int)", "summary", "manual"]
38-
- ["java.util.regex", "Pattern", "pattern", "()", "summary", "manual"]
36+
- ["java.util.regex", "Matcher", "pattern", "()", "summary", "df-manual"]
37+
- ["java.util.regex", "Pattern", "compile", "(String,int)", "summary", "df-manual"]
38+
- ["java.util.regex", "Pattern", "pattern", "()", "summary", "df-manual"]

java/ql/lib/ext/javax.crypto.model.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ extensions:
2424
- ["javax.crypto", "Cipher", "update", "", "summary", "manual"]
2525
- ["javax.crypto", "Cipher", "updateAAD", "", "summary", "manual"]
2626
- ["javax.crypto", "Cipher", "wrap", "", "summary", "manual"]
27-
- ["javax.crypto", "Mac", "init", "(Key)", "summary", "manual"]
28-
- ["javax.crypto", "Mac", "doFinal", "()", "summary", "manual"]
27+
- ["javax.crypto", "Mac", "init", "(Key)", "summary", "df-manual"]
28+
- ["javax.crypto", "Mac", "doFinal", "()", "summary", "df-manual"]

java/ql/lib/ext/javax.crypto.spec.model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ extensions:
3030
pack: codeql/java-all
3131
extensible: neutralModel
3232
data:
33-
- ["javax.crypto.spec", "SecretKeySpec", "SecretKeySpec", "(byte[],String)", "summary", "manual"]
33+
- ["javax.crypto.spec", "SecretKeySpec", "SecretKeySpec", "(byte[],String)", "summary", "df-manual"]

0 commit comments

Comments
 (0)