Skip to content

Commit 3f1dc8e

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Shared: add outdated Swift sink kinds
1 parent 62ac0dc commit 3f1dc8e

File tree

7 files changed

+35
-7
lines changed

7 files changed

+35
-7
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

javascript/ql/lib/semmle/javascript/frameworks/data/internal/SharedModelValidation.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

python/ql/lib/semmle/python/frameworks/data/internal/SharedModelValidation.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

ruby/ql/lib/codeql/ruby/frameworks/data/internal/SharedModelValidation.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ class OutdatedSinkKind extends string {
4747
"sql", "url-redirect", "xpath", "ssti", "logging", "groovy", "jexl", "mvel", "xslt", "ldap",
4848
"pending-intent-sent", "intent-start", "set-hostname-verifier", "header-splitting", "xss",
4949
"write-file", "create-file", "read-file", "open-url", "jdbc-url", "command-line-injection",
50-
"code", "html", "remote"
50+
"code", "html", "remote", "uncontrolled-format-string", "js-eval"
5151
]
5252
}
5353

5454
private string replacementKind() {
5555
this = ["sql", "xpath", "groovy", "jexl", "mvel", "xslt", "ldap", "code", "html"] and
5656
result = this + "-injection"
5757
or
58+
this = "js-eval" and result = "code-injection"
59+
or
5860
this = "url-redirect" and result = "url-redirection"
5961
or
6062
this = "ssti" and result = "template-injection"
@@ -78,6 +80,8 @@ class OutdatedSinkKind extends string {
7880
this = ["open-url", "jdbc-url"] and result = "request-forgery"
7981
or
8082
this = "command-line-injection" and result = "command-injection"
83+
or
84+
this = "uncontrolled-format-string" and result = "format-string"
8185
}
8286

8387
string outdatedMessage() {

0 commit comments

Comments
 (0)