Skip to content

Commit bd23814

Browse files
committed
Java: Update existing neutrals to include kind information.
1 parent bcbda90 commit bd23814

24 files changed

+5615
-5615
lines changed

java/ql/lib/ext/generated/kotlinstdlib.model.yml

Lines changed: 4608 additions & 4608 deletions
Large diffs are not rendered by default.

java/ql/lib/ext/generated/org.apache.commons.io.model.yml

Lines changed: 750 additions & 750 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ extensions:
1313
data:
1414
# The below APIs have numeric flow and are currently being stored as neutral models.
1515
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
16-
- ["java.awt", "Insets", "Insets", "(int,int,int,int)", "manual"] # value-numeric
16+
- ["java.awt", "Insets", "Insets", "(int,int,int,int)", "summary", "manual"] # value-numeric

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ extensions:
100100
pack: codeql/java-all
101101
extensible: neutralModel
102102
data:
103-
- ["java.io", "Closeable", "close", "()", "manual"]
104-
- ["java.io", "DataOutput", "writeBoolean", "(boolean)", "manual"]
105-
- ["java.io", "File", "delete", "()", "manual"]
106-
- ["java.io", "File", "exists", "()", "manual"]
107-
- ["java.io", "File", "isFile", "()", "manual"]
108-
- ["java.io", "File", "length", "()", "manual"]
109-
- ["java.io", "File", "isDirectory", "()", "manual"]
110-
- ["java.io", "File", "mkdirs", "()", "manual"]
111-
- ["java.io", "FileInputStream", "FileInputStream", "(File)", "manual"]
112-
- ["java.io", "InputStream", "close", "()", "manual"]
113-
- ["java.io", "OutputStream", "flush", "()", "manual"]
103+
- ["java.io", "Closeable", "close", "()", "summary", "manual"]
104+
- ["java.io", "DataOutput", "writeBoolean", "(boolean)", "summary", "manual"]
105+
- ["java.io", "File", "delete", "()", "summary", "manual"]
106+
- ["java.io", "File", "exists", "()", "summary", "manual"]
107+
- ["java.io", "File", "isFile", "()", "summary", "manual"]
108+
- ["java.io", "File", "length", "()", "summary", "manual"]
109+
- ["java.io", "File", "isDirectory", "()", "summary", "manual"]
110+
- ["java.io", "File", "mkdirs", "()", "summary", "manual"]
111+
- ["java.io", "FileInputStream", "FileInputStream", "(File)", "summary", "manual"]
112+
- ["java.io", "InputStream", "close", "()", "summary", "manual"]
113+
- ["java.io", "OutputStream", "flush", "()", "summary", "manual"]
114114
# The below APIs have numeric flow and are currently being stored as neutral models.
115115
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
116-
- ["java.io", "DataInput", "readInt", "()", "manual"] # taint-numeric
117-
- ["java.io", "DataInput", "readLong", "()", "manual"] # taint-numeric
118-
- ["java.io", "DataOutput", "writeInt", "(int)", "manual"] # taint-numeric
119-
- ["java.io", "DataOutput", "writeLong", "(long)", "manual"] # taint-numeric
116+
- ["java.io", "DataInput", "readInt", "()", "summary", "manual"] # taint-numeric
117+
- ["java.io", "DataInput", "readLong", "()", "summary", "manual"] # taint-numeric
118+
- ["java.io", "DataOutput", "writeInt", "(int)", "summary", "manual"] # taint-numeric
119+
- ["java.io", "DataOutput", "writeLong", "(long)", "summary", "manual"] # taint-numeric

java/ql/lib/ext/java.lang.invoke.model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ extensions:
33
pack: codeql/java-all
44
extensible: neutralModel
55
data:
6-
- ["java.lang.invoke", "MethodHandles", "lookup", "()", "manual"]
6+
- ["java.lang.invoke", "MethodHandles", "lookup", "()", "summary", "manual"]

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

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -138,89 +138,89 @@ extensions:
138138
pack: codeql/java-all
139139
extensible: neutralModel
140140
data:
141-
- ["java.lang", "AbstractStringBuilder", "length", "()", "manual"]
142-
- ["java.lang", "AbstractStringBuilder", "setCharAt", "(int,char)", "manual"]
143-
- ["java.lang", "AbstractStringBuilder", "setLength", "(int)", "manual"]
144-
- ["java.lang", "Boolean", "booleanValue", "()", "manual"]
145-
- ["java.lang", "Boolean", "equals", "(Object)", "manual"]
146-
- ["java.lang", "Boolean", "parseBoolean", "(String)", "manual"]
147-
- ["java.lang", "Boolean", "valueOf", "(boolean)", "manual"]
148-
- ["java.lang", "CharSequence", "length", "()", "manual"]
149-
- ["java.lang", "Class", "forName", "(String)", "manual"]
150-
- ["java.lang", "Class", "getCanonicalName", "()", "manual"]
151-
- ["java.lang", "Class", "getClassLoader", "()", "manual"]
152-
- ["java.lang", "Class", "getDeclaredConstructor", "(Class[])", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
153-
- ["java.lang", "Class", "getDeclaredField", "(String)", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
154-
- ["java.lang", "Class", "getMethod", "(String,Class[])", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
155-
- ["java.lang", "Class", "getName", "()", "manual"]
156-
- ["java.lang", "Class", "getResource", "(String)", "manual"]
157-
- ["java.lang", "Class", "getResourceAsStream", "(String)", "manual"]
158-
- ["java.lang", "Class", "getSimpleName", "()", "manual"]
159-
- ["java.lang", "Class", "isAssignableFrom", "(Class)", "manual"]
160-
- ["java.lang", "Class", "isInstance", "(Object)", "manual"]
161-
- ["java.lang", "Class", "toString", "()", "manual"]
162-
- ["java.lang", "ClassLoader", "getResource", "(String)", "manual"]
163-
- ["java.lang", "ClassLoader", "getResourceAsStream", "(String)", "manual"]
164-
- ["java.lang", "Enum", "Enum", "(String,int)", "manual"]
165-
- ["java.lang", "Enum", "equals", "(Object)", "manual"]
166-
- ["java.lang", "Enum", "hashCode", "()", "manual"]
167-
- ["java.lang", "Enum", "name", "()", "manual"]
168-
- ["java.lang", "Enum", "ordinal", "()", "manual"]
169-
- ["java.lang", "Enum", "toString", "()", "manual"]
170-
- ["java.lang", "Integer", "equals", "(Object)", "manual"]
171-
- ["java.lang", "Long", "equals", "(Object)", "manual"]
172-
- ["java.lang", "Object", "equals", "(Object)", "manual"]
173-
- ["java.lang", "Object", "getClass", "()", "manual"]
174-
- ["java.lang", "Object", "hashCode", "()", "manual"]
175-
- ["java.lang", "Object", "toString", "()", "manual"]
176-
- ["java.lang", "Runnable", "run", "()", "manual"]
177-
- ["java.lang", "Runtime", "getRuntime", "()", "manual"]
178-
- ["java.lang", "String", "compareTo", "(String)", "manual"]
179-
- ["java.lang", "String", "contains", "(CharSequence)", "manual"]
180-
- ["java.lang", "String", "endsWith", "(String)", "manual"]
181-
- ["java.lang", "String", "equals", "(Object)", "manual"]
182-
- ["java.lang", "String", "equalsIgnoreCase", "(String)", "manual"]
183-
- ["java.lang", "String", "hashCode", "()", "manual"]
184-
- ["java.lang", "String", "indexOf", "(int)", "manual"]
185-
- ["java.lang", "String", "indexOf", "(String)", "manual"]
186-
- ["java.lang", "String", "isEmpty", "()", "manual"]
187-
- ["java.lang", "String", "lastIndexOf", "(int)", "manual"]
188-
- ["java.lang", "String", "lastIndexOf", "(String)", "manual"]
189-
- ["java.lang", "String", "length", "()", "manual"]
190-
- ["java.lang", "String", "startsWith", "(String)", "manual"]
191-
- ["java.lang", "String", "valueOf", "(boolean)", "manual"]
192-
- ["java.lang", "System", "currentTimeMillis", "()", "manual"]
193-
- ["java.lang", "System", "exit", "(int)", "manual"]
194-
- ["java.lang", "System", "getenv", "(String)", "manual"]
195-
- ["java.lang", "System", "identityHashCode", "(Object)", "manual"]
196-
- ["java.lang", "System", "lineSeparator", "()", "manual"]
197-
- ["java.lang", "System", "nanoTime", "()", "manual"]
198-
- ["java.lang", "Thread", "currentThread", "()", "manual"]
199-
- ["java.lang", "Thread", "getContextClassLoader", "()", "manual"]
200-
- ["java.lang", "Thread", "interrupt", "()", "manual"]
201-
- ["java.lang", "Thread", "sleep", "(long)", "manual"]
202-
- ["java.lang", "Thread", "start", "()", "manual"]
141+
- ["java.lang", "AbstractStringBuilder", "length", "()", "summary", "manual"]
142+
- ["java.lang", "AbstractStringBuilder", "setCharAt", "(int,char)", "summary", "manual"]
143+
- ["java.lang", "AbstractStringBuilder", "setLength", "(int)", "summary", "manual"]
144+
- ["java.lang", "Boolean", "booleanValue", "()", "summary", "manual"]
145+
- ["java.lang", "Boolean", "equals", "(Object)", "summary", "manual"]
146+
- ["java.lang", "Boolean", "parseBoolean", "(String)", "summary", "manual"]
147+
- ["java.lang", "Boolean", "valueOf", "(boolean)", "summary", "manual"]
148+
- ["java.lang", "CharSequence", "length", "()", "summary", "manual"]
149+
- ["java.lang", "Class", "forName", "(String)", "summary", "manual"]
150+
- ["java.lang", "Class", "getCanonicalName", "()", "summary", "manual"]
151+
- ["java.lang", "Class", "getClassLoader", "()", "summary", "manual"]
152+
- ["java.lang", "Class", "getDeclaredConstructor", "(Class[])", "summary", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
153+
- ["java.lang", "Class", "getDeclaredField", "(String)", "summary", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
154+
- ["java.lang", "Class", "getMethod", "(String,Class[])", "summary", "manual"] # This model may be changed to a taint step for an unsafe reflection query in the future.
155+
- ["java.lang", "Class", "getName", "()", "summary", "manual"]
156+
- ["java.lang", "Class", "getResource", "(String)", "summary", "manual"]
157+
- ["java.lang", "Class", "getResourceAsStream", "(String)", "summary", "manual"]
158+
- ["java.lang", "Class", "getSimpleName", "()", "summary", "manual"]
159+
- ["java.lang", "Class", "isAssignableFrom", "(Class)", "summary", "manual"]
160+
- ["java.lang", "Class", "isInstance", "(Object)", "summary", "manual"]
161+
- ["java.lang", "Class", "toString", "()", "summary", "manual"]
162+
- ["java.lang", "ClassLoader", "getResource", "(String)", "summary", "manual"]
163+
- ["java.lang", "ClassLoader", "getResourceAsStream", "(String)", "summary", "manual"]
164+
- ["java.lang", "Enum", "Enum", "(String,int)", "summary", "manual"]
165+
- ["java.lang", "Enum", "equals", "(Object)", "summary", "manual"]
166+
- ["java.lang", "Enum", "hashCode", "()", "summary", "manual"]
167+
- ["java.lang", "Enum", "name", "()", "summary", "manual"]
168+
- ["java.lang", "Enum", "ordinal", "()", "summary", "manual"]
169+
- ["java.lang", "Enum", "toString", "()", "summary", "manual"]
170+
- ["java.lang", "Integer", "equals", "(Object)", "summary", "manual"]
171+
- ["java.lang", "Long", "equals", "(Object)", "summary", "manual"]
172+
- ["java.lang", "Object", "equals", "(Object)", "summary", "manual"]
173+
- ["java.lang", "Object", "getClass", "()", "summary", "manual"]
174+
- ["java.lang", "Object", "hashCode", "()", "summary", "manual"]
175+
- ["java.lang", "Object", "toString", "()", "summary", "manual"]
176+
- ["java.lang", "Runnable", "run", "()", "summary", "manual"]
177+
- ["java.lang", "Runtime", "getRuntime", "()", "summary", "manual"]
178+
- ["java.lang", "String", "compareTo", "(String)", "summary", "manual"]
179+
- ["java.lang", "String", "contains", "(CharSequence)", "summary", "manual"]
180+
- ["java.lang", "String", "endsWith", "(String)", "summary", "manual"]
181+
- ["java.lang", "String", "equals", "(Object)", "summary", "manual"]
182+
- ["java.lang", "String", "equalsIgnoreCase", "(String)", "summary", "manual"]
183+
- ["java.lang", "String", "hashCode", "()", "summary", "manual"]
184+
- ["java.lang", "String", "indexOf", "(int)", "summary", "manual"]
185+
- ["java.lang", "String", "indexOf", "(String)", "summary", "manual"]
186+
- ["java.lang", "String", "isEmpty", "()", "summary", "manual"]
187+
- ["java.lang", "String", "lastIndexOf", "(int)", "summary", "manual"]
188+
- ["java.lang", "String", "lastIndexOf", "(String)", "summary", "manual"]
189+
- ["java.lang", "String", "length", "()", "summary", "manual"]
190+
- ["java.lang", "String", "startsWith", "(String)", "summary", "manual"]
191+
- ["java.lang", "String", "valueOf", "(boolean)", "summary", "manual"]
192+
- ["java.lang", "System", "currentTimeMillis", "()", "summary", "manual"]
193+
- ["java.lang", "System", "exit", "(int)", "summary", "manual"]
194+
- ["java.lang", "System", "getenv", "(String)", "summary", "manual"]
195+
- ["java.lang", "System", "identityHashCode", "(Object)", "summary", "manual"]
196+
- ["java.lang", "System", "lineSeparator", "()", "summary", "manual"]
197+
- ["java.lang", "System", "nanoTime", "()", "summary", "manual"]
198+
- ["java.lang", "Thread", "currentThread", "()", "summary", "manual"]
199+
- ["java.lang", "Thread", "getContextClassLoader", "()", "summary", "manual"]
200+
- ["java.lang", "Thread", "interrupt", "()", "summary", "manual"]
201+
- ["java.lang", "Thread", "sleep", "(long)", "summary", "manual"]
202+
- ["java.lang", "Thread", "start", "()", "summary", "manual"]
203203
# The below APIs have numeric flow and are currently being stored as neutral models.
204204
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
205-
- ["java.lang", "Double", "doubleToLongBits", "(double)", "manual"] # taint-numeric
206-
- ["java.lang", "Double", "parseDouble", "(String)", "manual"] # taint-numeric
207-
- ["java.lang", "Double", "valueOf", "(double)", "manual"] # taint-numeric
208-
- ["java.lang", "Integer", "Integer", "(int)", "manual"] # taint-numeric
209-
- ["java.lang", "Integer", "intValue", "()", "manual"] # taint-numeric
210-
- ["java.lang", "Integer", "parseInt", "(String)", "manual"] # taint-numeric
211-
- ["java.lang", "Integer", "toHexString", "(int)", "manual"] # taint-numeric
212-
- ["java.lang", "Integer", "toString", "", "manual"] # taint-numeric
213-
- ["java.lang", "Integer", "valueOf", "", "manual"] # taint-numeric
214-
- ["java.lang", "Long", "Long", "(long)", "manual"] # taint-numeric
215-
- ["java.lang", "Long", "intValue", "()", "manual"] # taint-numeric
216-
- ["java.lang", "Long", "longValue", "()", "manual"] # taint-numeric
217-
- ["java.lang", "Long", "parseLong", "(String)", "manual"] # taint-numeric
218-
- ["java.lang", "Long", "toString", "", "manual"] # taint-numeric
219-
- ["java.lang", "Long", "valueOf", "", "manual"] # taint-numeric
220-
- ["java.lang", "Math", "max", "", "manual"] # value-numeric
221-
- ["java.lang", "Math", "min", "", "manual"] # value-numeric
222-
- ["java.lang", "Number", "doubleValue", "()", "manual"] # taint-numeric
223-
- ["java.lang", "Number", "intValue", "()", "manual"] # taint-numeric
224-
- ["java.lang", "Number", "longValue", "()", "manual"] # taint-numeric
225-
- ["java.lang", "String", "valueOf", "(int)", "manual"] # taint-numeric
226-
- ["java.lang", "String", "valueOf", "(long)", "manual"] # taint-numeric
205+
- ["java.lang", "Double", "doubleToLongBits", "(double)", "summary", "manual"] # taint-numeric
206+
- ["java.lang", "Double", "parseDouble", "(String)", "summary", "manual"] # taint-numeric
207+
- ["java.lang", "Double", "valueOf", "(double)", "summary", "manual"] # taint-numeric
208+
- ["java.lang", "Integer", "Integer", "(int)", "summary", "manual"] # taint-numeric
209+
- ["java.lang", "Integer", "intValue", "()", "summary", "manual"] # taint-numeric
210+
- ["java.lang", "Integer", "parseInt", "(String)", "summary", "manual"] # taint-numeric
211+
- ["java.lang", "Integer", "toHexString", "(int)", "summary", "manual"] # taint-numeric
212+
- ["java.lang", "Integer", "toString", "", "summary", "manual"] # taint-numeric
213+
- ["java.lang", "Integer", "valueOf", "", "summary", "manual"] # taint-numeric
214+
- ["java.lang", "Long", "Long", "(long)", "summary", "manual"] # taint-numeric
215+
- ["java.lang", "Long", "intValue", "()", "summary", "manual"] # taint-numeric
216+
- ["java.lang", "Long", "longValue", "()", "summary", "manual"] # taint-numeric
217+
- ["java.lang", "Long", "parseLong", "(String)", "summary", "manual"] # taint-numeric
218+
- ["java.lang", "Long", "toString", "", "summary", "manual"] # taint-numeric
219+
- ["java.lang", "Long", "valueOf", "", "summary", "manual"] # taint-numeric
220+
- ["java.lang", "Math", "max", "", "summary", "manual"] # value-numeric
221+
- ["java.lang", "Math", "min", "", "summary", "manual"] # value-numeric
222+
- ["java.lang", "Number", "doubleValue", "()", "summary", "manual"] # taint-numeric
223+
- ["java.lang", "Number", "intValue", "()", "summary", "manual"] # taint-numeric
224+
- ["java.lang", "Number", "longValue", "()", "summary", "manual"] # taint-numeric
225+
- ["java.lang", "String", "valueOf", "(int)", "summary", "manual"] # taint-numeric
226+
- ["java.lang", "String", "valueOf", "(long)", "summary", "manual"] # taint-numeric

java/ql/lib/ext/java.lang.reflect.model.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extensions:
44
extensible: neutralModel
55
data:
66
# The below models may be changed to taint steps for an unsafe reflection query in the future.
7-
- ["java.lang.reflect", "Constructor", "newInstance", "(Object[])", "manual"]
8-
- ["java.lang.reflect", "Field", "get", "(Object)", "manual"]
9-
- ["java.lang.reflect", "Method", "getName", "()", "manual"]
10-
- ["java.lang.reflect", "Method", "invoke", "(Object,Object[])", "manual"]
7+
- ["java.lang.reflect", "Constructor", "newInstance", "(Object[])", "summary", "manual"]
8+
- ["java.lang.reflect", "Field", "get", "(Object)", "summary", "manual"]
9+
- ["java.lang.reflect", "Method", "getName", "()", "summary", "manual"]
10+
- ["java.lang.reflect", "Method", "invoke", "(Object,Object[])", "summary", "manual"]

0 commit comments

Comments
 (0)