Skip to content

Commit d232283

Browse files
authored
Merge pull request #7149 from geoffw0/non-https-url2
C++: Minor improvements to 'Failure to use HTTPS URLs' query
2 parents 474c808 + ea9640a commit d232283

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cpp/ql/src/Security/CWE/CWE-319/UseOfHttp.ql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @id cpp/non-https-url
88
* @tags security
99
* external/cwe/cwe-319
10+
* external/cwe/cwe-345
1011
*/
1112

1213
import cpp
@@ -61,7 +62,11 @@ class HttpStringToUrlOpenConfig extends TaintTracking::Configuration {
6162
// accessed as a URL, for example using it in a network access. Some
6263
// URLs are only ever displayed or used for data processing.
6364
exists(FunctionCall fc |
64-
fc.getTarget().hasGlobalOrStdName(["system", "gethostbyname", "getaddrinfo"]) and
65+
fc.getTarget()
66+
.hasGlobalOrStdName([
67+
"system", "gethostbyname", "gethostbyname2", "gethostbyname_r", "getaddrinfo",
68+
"X509_load_http", "X509_CRL_load_http"
69+
]) and
6570
sink.asExpr() = fc.getArgument(0)
6671
or
6772
fc.getTarget().hasGlobalOrStdName(["send", "URLDownloadToFile", "URLDownloadToCacheFile"]) and

0 commit comments

Comments
 (0)