Skip to content

Commit e2a142e

Browse files
committed
Java: Diff-informed UnsafeHostnameVerification.ql
1 parent ec816f8 commit e2a142e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

java/ql/lib/semmle/code/java/security/UnsafeHostnameVerificationQuery.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ module TrustAllHostnameVerifierConfig implements DataFlow::ConfigSig {
6565
"|(set)?(accept|trust|ignore|allow)(all|every|any)" +
6666
"|(use|do|enable)insecure|(set|do|use)?no.*(check|validation|verify|verification)|disable).*$")
6767
}
68+
69+
predicate observeDiffInformedIncrementalMode() { any() }
70+
71+
Location getASelectedSourceLocation(DataFlow::Node source) {
72+
isSource(source) and
73+
(
74+
result = source.getLocation()
75+
or
76+
result = source.asExpr().(ClassInstanceExpr).getConstructedType().getLocation()
77+
)
78+
}
6879
}
6980

7081
/** Data flow to model the flow of a `TrustAllHostnameVerifier` to a `set(Default)HostnameVerifier` call. */

0 commit comments

Comments
 (0)