Skip to content

Commit 7027b7f

Browse files
Apply review suggestions: Use getInstance and clarify predicate name/qldoc. Also fix changenote formatting.
1 parent 31687af commit 7027b7f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: minorAnalysis
33
---
4-
Calls to `Typhoeus::Request.new` are now considered as instances of the `Http::Client::Request` concept, with the response body being treated as a remote flow source.
4+
* Calls to `Typhoeus::Request.new` are now considered as instances of the `Http::Client::Request` concept, with the response body being treated as a remote flow source.

ruby/ql/lib/codeql/ruby/frameworks/http_clients/Typhoeus.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TyphoeusHttpRequest extends Http::Client::Request::Range, DataFlow::CallNo
2727
.getReturn(["get", "head", "delete", "options", "post", "put", "patch"])
2828
or
2929
directResponse = false and
30-
requestNode = API::getTopLevelMember("Typhoeus").getMember("Request").getReturn("new")
30+
requestNode = API::getTopLevelMember("Typhoeus").getMember("Request").getInstance()
3131
)
3232
}
3333

@@ -38,7 +38,7 @@ class TyphoeusHttpRequest extends Http::Client::Request::Range, DataFlow::CallNo
3838
result = getBodyFromResponse(requestNode)
3939
or
4040
directResponse = false and
41-
result = getBodyFromRequest(requestNode)
41+
result = getResponseBodyFromRequest(requestNode)
4242
}
4343

4444
/** Gets the value that controls certificate validation, if any. */
@@ -69,10 +69,10 @@ private module TyphoeusDisablesCertificateValidationConfig implements DataFlow::
6969
private module TyphoeusDisablesCertificateValidationFlow =
7070
DataFlow::Global<TyphoeusDisablesCertificateValidationConfig>;
7171

72-
/** Gets the body from the given `requestNode` representing a Typhoeus request */
72+
/** Gets the response body from the given `requestNode` representing a Typhoeus request */
7373
bindingset[requestNode]
7474
pragma[inline_late]
75-
private DataFlow::Node getBodyFromRequest(API::Node requestNode) {
75+
private DataFlow::Node getResponseBodyFromRequest(API::Node requestNode) {
7676
result =
7777
[
7878
getBodyFromResponse(getResponseFromRequest(requestNode)),
@@ -95,7 +95,7 @@ private API::Node getResponseFromRequest(API::Node requestNode) {
9595
]
9696
}
9797

98-
/** Gets the body from the given `responseNode` representing a Typhoeus response */
98+
/** Gets the response body from the given `responseNode` representing a Typhoeus response */
9999
bindingset[responseNode]
100100
pragma[inline_late]
101101
private DataFlow::Node getBodyFromResponse(API::Node responseNode) {

0 commit comments

Comments
 (0)