Skip to content

Commit 615f2a5

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java/C#/Go/Swift: remove commented-out code
1 parent 9f42ae3 commit 615f2a5

File tree

4 files changed

+0
-21
lines changed

4 files changed

+0
-21
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/ExternalFlow.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,27 +208,21 @@ module ModelValidation {
208208
private string getInvalidModelKind() {
209209
exists(string kind | summaryModel(_, _, _, _, _, _, _, _, kind, _) |
210210
not kind instanceof ValidSummaryKind and
211-
//not kind = ["taint", "value"] and
212211
result = "Invalid kind \"" + kind + "\" in summary model."
213212
)
214213
or
215214
exists(string kind | sinkModel(_, _, _, _, _, _, _, kind, _) |
216215
not kind instanceof ValidSinkKind and
217-
// not kind =
218-
// ["code-injection", "sql-injection", "js-injection", "html-injection", "file-content-store"] and
219-
not kind.matches("encryption-%") and
220216
result = "Invalid kind \"" + kind + "\" in sink model."
221217
)
222218
or
223219
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |
224220
not kind instanceof ValidSourceKind and
225-
//not kind = ["local", "remote", "file", "file-write"] and
226221
result = "Invalid kind \"" + kind + "\" in source model."
227222
)
228223
or
229224
exists(string kind | neutralModel(_, _, _, _, kind, _) |
230225
not kind instanceof ValidNeutralKind and
231-
//not kind = ["summary", "source", "sink"] and
232226
result = "Invalid kind \"" + kind + "\" in neutral model."
233227
)
234228
}

go/ql/lib/semmle/go/dataflow/ExternalFlow.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ module ModelValidation {
192192
private string getInvalidModelKind() {
193193
exists(string kind | summaryModel(_, _, _, _, _, _, _, _, kind, _) |
194194
not kind instanceof ValidSummaryKind and
195-
//not kind = ["taint", "value"] and
196195
result = "Invalid kind \"" + kind + "\" in summary model."
197196
)
198197
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -313,22 +313,11 @@ module ModelValidation {
313313
private string getInvalidModelKind() {
314314
exists(string kind | summaryModel(_, _, _, _, _, _, _, _, kind, _) |
315315
not kind instanceof ValidSummaryKind and
316-
//not kind = ["taint", "value"] and
317316
result = "Invalid kind \"" + kind + "\" in summary model."
318317
)
319318
or
320319
exists(string kind, string msg | sinkModel(_, _, _, _, _, _, _, kind, _) |
321320
not kind instanceof ValidSinkKind and
322-
// not kind =
323-
// [
324-
// "request-forgery", "jndi-injection", "ldap-injection", "sql-injection", "log-injection",
325-
// "mvel-injection", "xpath-injection", "groovy-injection", "html-injection", "js-injection",
326-
// "ognl-injection", "intent-redirection", "pending-intents", "url-redirection",
327-
// "path-injection", "file-content-store", "hostname-verification", "response-splitting",
328-
// "information-leak", "xslt-injection", "jexl-injection", "bean-validation",
329-
// "template-injection", "fragment-injection", "command-injection"
330-
// ] and
331-
not kind.matches("regex-use%") and
332321
not kind.matches("qltest%") and
333322
msg = "Invalid kind \"" + kind + "\" in sink model." and
334323
// The part of this message that refers to outdated sink kinds can be deleted after June 1st, 2024.
@@ -339,14 +328,12 @@ module ModelValidation {
339328
or
340329
exists(string kind | sourceModel(_, _, _, _, _, _, _, kind, _) |
341330
not kind instanceof ValidSourceKind and
342-
// not kind = ["remote", "contentprovider", "android-widget", "android-external-storage-dir"] and
343331
not kind.matches("qltest%") and
344332
result = "Invalid kind \"" + kind + "\" in source model."
345333
)
346334
or
347335
exists(string kind | neutralModel(_, _, _, _, kind, _) |
348336
not kind instanceof ValidNeutralKind and
349-
//not kind = ["summary", "source", "sink"] and
350337
result = "Invalid kind \"" + kind + "\" in neutral model."
351338
)
352339
}

swift/ql/lib/codeql/swift/dataflow/ExternalFlow.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ module CsvValidation {
268268
exists(string row, string kind | summaryModel(row) |
269269
kind = row.splitAt(";", 8) and
270270
not kind instanceof ValidSummaryKind and
271-
//not kind = ["taint", "value"] and
272271
result = "Invalid kind \"" + kind + "\" in summary model."
273272
)
274273
}

0 commit comments

Comments
 (0)