Skip to content

Commit 17e5124

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: update set-hostname-verifier sink kind to hostname-verification
1 parent 081e431 commit 17e5124

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ extensions:
33
pack: codeql/java-all
44
extensible: sinkModel
55
data:
6-
- ["javax.net.ssl", "HttpsURLConnection", True, "setDefaultHostnameVerifier", "", "", "Argument[0]", "set-hostname-verifier", "manual"]
7-
- ["javax.net.ssl", "HttpsURLConnection", True, "setHostnameVerifier", "", "", "Argument[0]", "set-hostname-verifier", "manual"]
6+
- ["javax.net.ssl", "HttpsURLConnection", True, "setDefaultHostnameVerifier", "", "", "Argument[0]", "hostname-verification", "manual"]
7+
- ["javax.net.ssl", "HttpsURLConnection", True, "setHostnameVerifier", "", "", "Argument[0]", "hostname-verification", "manual"]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ module ModelValidation {
275275
"open-url", "jndi-injection", "ldap-injection", "sql-injection", "jdbc-url",
276276
"log-injection", "mvel-injection", "xpath-injection", "groovy-injection", "xss",
277277
"ognl-injection", "intent-redirection", "pending-intents", "url-open-stream",
278-
"url-redirection", "create-file", "read-file", "write-file", "set-hostname-verifier",
278+
"url-redirection", "create-file", "read-file", "write-file", "hostname-verification",
279279
"header-splitting", "information-leak", "xslt-injection", "jexl-injection",
280280
"bean-validation", "template-injection", "fragment-injection", "command-injection"
281281
] and

java/ql/src/Security/CWE/CWE-297/UnsafeHostnameVerification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import TrustAllHostnameVerifierFlow::PathGraph
8585
* A sink that sets the `HostnameVerifier` on `HttpsURLConnection`.
8686
*/
8787
private class HostnameVerifierSink extends DataFlow::Node {
88-
HostnameVerifierSink() { sinkNode(this, "set-hostname-verifier") }
88+
HostnameVerifierSink() { sinkNode(this, "hostname-verification") }
8989
}
9090

9191
/**

0 commit comments

Comments
 (0)