Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b469273

Browse files
committed
Java: Add QLDoc improve query message
1 parent f4b912c commit b469273

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,5 @@ where
115115
not isNodeGuardedByFlag(sink.getNode()) and
116116
verifier = source.getNode().asExpr().(ClassInstanceExpr).getConstructedType()
117117
select sink, source, sink,
118-
"$@ that is defined $@ and accepts any certificate as valid, is used $@.", source,
119-
"This hostname verifier", verifier, "here", sink, "here"
118+
"$@ that is defined $@ and accepts any certificate as valid, is used here.", source,
119+
"This hostname verifier", verifier, "here"

java/ql/src/semmle/code/java/security/Encryption.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class SSLContext extends RefType {
2929
SSLContext() { hasQualifiedName("javax.net.ssl", "SSLContext") }
3030
}
3131

32+
/** Models the `javax.net.ssl.SSLSession` class. */
3233
class SSLSession extends RefType {
3334
SSLSession() { hasQualifiedName("javax.net.ssl", "SSLSession") }
3435
}
@@ -37,6 +38,7 @@ class HostnameVerifier extends RefType {
3738
HostnameVerifier() { hasQualifiedName("javax.net.ssl", "HostnameVerifier") }
3839
}
3940

41+
/** Models the `verify` method of the class `javax.net.ssl.HostnameVerifier`. */
4042
class HostnameVerifierVerify extends Method {
4143
HostnameVerifierVerify() {
4244
hasName("verify") and
@@ -81,6 +83,7 @@ class SetHostnameVerifierMethod extends Method {
8183
}
8284
}
8385

86+
/** Models the `setDefaultHostnameVerifier` method of the class `javax.net.ssl.HttpsURLConnection`. */
8487
class SetDefaultHostnameVerifierMethod extends Method {
8588
SetDefaultHostnameVerifierMethod() {
8689
hasName("setDefaultHostnameVerifier") and

0 commit comments

Comments
 (0)