mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
HTTP -> Http
Change the capitalisation of HTTP to Http, to conform to the QL style guide. Leave the HTTP module in Concepts alone, so it remains consistent with the Concepts in other language libraries.
This commit is contained in:
@@ -7,4 +7,4 @@ private import codeql.ruby.frameworks.ActiveRecord
|
||||
private import codeql.ruby.frameworks.ActionView
|
||||
private import codeql.ruby.frameworks.StandardLibrary
|
||||
private import codeql.ruby.frameworks.Files
|
||||
private import codeql.ruby.frameworks.HTTPClients
|
||||
private import codeql.ruby.frameworks.HttpClients
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
* Helper file that imports all HTTP clients.
|
||||
*/
|
||||
|
||||
private import codeql.ruby.frameworks.http_clients.NetHTTP
|
||||
private import codeql.ruby.frameworks.http_clients.NetHttp
|
||||
private import codeql.ruby.frameworks.http_clients.Excon
|
||||
private import codeql.ruby.frameworks.http_clients.Faraday
|
||||
private import codeql.ruby.frameworks.http_clients.RestClient
|
||||
private import codeql.ruby.frameworks.http_clients.HTTParty
|
||||
private import codeql.ruby.frameworks.http_clients.HTTPClient
|
||||
private import codeql.ruby.frameworks.http_clients.Httparty
|
||||
private import codeql.ruby.frameworks.http_clients.HttpClient
|
||||
private import codeql.ruby.frameworks.http_clients.OpenURI
|
||||
private import codeql.ruby.frameworks.http_clients.Typhoeus
|
||||
@@ -17,11 +17,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* TODO: pipelining, streaming responses
|
||||
* https://github.com/excon/excon/blob/master/README.md
|
||||
*/
|
||||
class ExconHTTPRequest extends HTTP::Client::Request::Range {
|
||||
class ExconHttpRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
ExconHTTPRequest() {
|
||||
ExconHttpRequest() {
|
||||
exists(API::Node requestNode | request = requestNode.getAnImmediateUse() |
|
||||
requestNode =
|
||||
[
|
||||
|
||||
@@ -13,11 +13,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* connection.get("/").body
|
||||
* ```
|
||||
*/
|
||||
class FaradayHTTPRequest extends HTTP::Client::Request::Range {
|
||||
class FaradayHttpRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
FaradayHTTPRequest() {
|
||||
FaradayHttpRequest() {
|
||||
exists(API::Node requestNode |
|
||||
requestNode =
|
||||
[
|
||||
|
||||
@@ -9,11 +9,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* HTTPClient.get_content("http://example.com")
|
||||
* ```
|
||||
*/
|
||||
class HTTPClientRequest extends HTTP::Client::Request::Range {
|
||||
class HttpClientRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
HTTPClientRequest() {
|
||||
HttpClientRequest() {
|
||||
exists(API::Node requestNode, string method |
|
||||
request = requestNode.getAnImmediateUse() and
|
||||
method in [
|
||||
@@ -16,11 +16,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* MyClass.new("http://example.com")
|
||||
* ```
|
||||
*/
|
||||
class HTTPartyRequest extends HTTP::Client::Request::Range {
|
||||
class HttpartyRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
HTTPartyRequest() {
|
||||
HttpartyRequest() {
|
||||
exists(API::Node requestNode | request = requestNode.getAnImmediateUse() |
|
||||
requestNode =
|
||||
API::getTopLevelMember("HTTParty")
|
||||
@@ -13,11 +13,11 @@ private import codeql.ruby.dataflow.internal.DataFlowPublic
|
||||
* response = req.get("/")
|
||||
* ```
|
||||
*/
|
||||
class NetHTTPRequest extends HTTP::Client::Request::Range {
|
||||
class NetHttpRequest extends HTTP::Client::Request::Range {
|
||||
private DataFlow::CallNode request;
|
||||
private DataFlow::Node responseBody;
|
||||
|
||||
NetHTTPRequest() {
|
||||
NetHttpRequest() {
|
||||
exists(API::Node requestNode, string method |
|
||||
request = requestNode.getAnImmediateUse() and
|
||||
this = request.asExpr().getExpr()
|
||||
@@ -8,11 +8,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* RestClient.get("http://example.com").body
|
||||
* ```
|
||||
*/
|
||||
class RestClientHTTPRequest extends HTTP::Client::Request::Range {
|
||||
class RestClientHttpRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
RestClientHTTPRequest() {
|
||||
RestClientHttpRequest() {
|
||||
exists(API::Node requestNode |
|
||||
requestNode =
|
||||
API::getTopLevelMember("RestClient")
|
||||
|
||||
@@ -8,11 +8,11 @@ private import codeql.ruby.ApiGraphs
|
||||
* Typhoeus.get("http://example.com").body
|
||||
* ```
|
||||
*/
|
||||
class TyphoeusHTTPRequest extends HTTP::Client::Request::Range {
|
||||
class TyphoeusHttpRequest extends HTTP::Client::Request::Range {
|
||||
DataFlow::Node request;
|
||||
DataFlow::CallNode responseBody;
|
||||
|
||||
TyphoeusHTTPRequest() {
|
||||
TyphoeusHttpRequest() {
|
||||
exists(API::Node requestNode | request = requestNode.getAnImmediateUse() |
|
||||
requestNode =
|
||||
API::getTopLevelMember("Typhoeus")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.Excon
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node exconHTTPRequests(ExconHTTPRequest e) { result = e.getResponseBody() }
|
||||
query DataFlow::Node exconHttpRequests(ExconHttpRequest e) { result = e.getResponseBody() }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.Faraday
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node faradayHTTPRequests(FaradayHTTPRequest e) { result = e.getResponseBody() }
|
||||
query DataFlow::Node faradayHttpRequests(FaradayHttpRequest e) { result = e.getResponseBody() }
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
| HTTPClient.rb:3:9:3:45 | call to get | HTTPClient.rb:4:1:4:10 | call to body |
|
||||
| HTTPClient.rb:6:9:6:65 | call to post | HTTPClient.rb:7:1:7:13 | call to content |
|
||||
| HTTPClient.rb:9:9:9:64 | call to put | HTTPClient.rb:10:1:10:15 | call to http_body |
|
||||
| HTTPClient.rb:12:9:12:48 | call to delete | HTTPClient.rb:13:1:13:10 | call to dump |
|
||||
| HTTPClient.rb:15:9:15:46 | call to head | HTTPClient.rb:16:1:16:10 | call to body |
|
||||
| HTTPClient.rb:18:9:18:49 | call to options | HTTPClient.rb:19:1:19:13 | call to content |
|
||||
| HTTPClient.rb:21:9:21:47 | call to trace | HTTPClient.rb:22:1:22:15 | call to http_body |
|
||||
| HTTPClient.rb:24:9:24:53 | call to get_content | HTTPClient.rb:24:9:24:53 | call to get_content |
|
||||
| HTTPClient.rb:26:10:26:74 | call to post_content | HTTPClient.rb:26:10:26:74 | call to post_content |
|
||||
@@ -1,4 +0,0 @@
|
||||
import codeql.ruby.frameworks.http_clients.HTTPClient
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node httpClientRequests(HTTPClientRequest e) { result = e.getResponseBody() }
|
||||
@@ -1,7 +0,0 @@
|
||||
| HTTParty.rb:5:1:5:35 | call to get | HTTParty.rb:5:1:5:35 | call to get |
|
||||
| HTTParty.rb:7:1:7:55 | call to post | HTTParty.rb:7:1:7:55 | call to post |
|
||||
| HTTParty.rb:9:1:9:54 | call to put | HTTParty.rb:9:1:9:54 | call to put |
|
||||
| HTTParty.rb:11:1:11:56 | call to patch | HTTParty.rb:11:1:11:56 | call to patch |
|
||||
| HTTParty.rb:15:9:15:46 | call to delete | HTTParty.rb:16:1:16:10 | call to body |
|
||||
| HTTParty.rb:18:9:18:44 | call to head | HTTParty.rb:19:1:19:10 | call to body |
|
||||
| HTTParty.rb:21:9:21:47 | call to options | HTTParty.rb:22:1:22:10 | call to body |
|
||||
@@ -1,4 +0,0 @@
|
||||
import codeql.ruby.frameworks.http_clients.HTTParty
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node httpartyRequests(HTTPartyRequest e) { result = e.getResponseBody() }
|
||||
@@ -0,0 +1,9 @@
|
||||
| HttpClient.rb:3:9:3:45 | call to get | HttpClient.rb:4:1:4:10 | call to body |
|
||||
| HttpClient.rb:6:9:6:65 | call to post | HttpClient.rb:7:1:7:13 | call to content |
|
||||
| HttpClient.rb:9:9:9:64 | call to put | HttpClient.rb:10:1:10:15 | call to http_body |
|
||||
| HttpClient.rb:12:9:12:48 | call to delete | HttpClient.rb:13:1:13:10 | call to dump |
|
||||
| HttpClient.rb:15:9:15:46 | call to head | HttpClient.rb:16:1:16:10 | call to body |
|
||||
| HttpClient.rb:18:9:18:49 | call to options | HttpClient.rb:19:1:19:13 | call to content |
|
||||
| HttpClient.rb:21:9:21:47 | call to trace | HttpClient.rb:22:1:22:15 | call to http_body |
|
||||
| HttpClient.rb:24:9:24:53 | call to get_content | HttpClient.rb:24:9:24:53 | call to get_content |
|
||||
| HttpClient.rb:26:10:26:74 | call to post_content | HttpClient.rb:26:10:26:74 | call to post_content |
|
||||
@@ -0,0 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.HttpClient
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node httpClientRequests(HttpClientRequest e) { result = e.getResponseBody() }
|
||||
@@ -23,4 +23,4 @@ resp8.http_body
|
||||
|
||||
resp9 = HTTPClient.get_content("http://example.com/")
|
||||
|
||||
resp10 = HTTPClient.post_content("http://example.com/", body: "some_data")
|
||||
resp10 = HTTPClient.post_content("http://example.com/", body: "some_data")
|
||||
@@ -0,0 +1,7 @@
|
||||
| Httparty.rb:5:1:5:35 | call to get | Httparty.rb:5:1:5:35 | call to get |
|
||||
| Httparty.rb:7:1:7:55 | call to post | Httparty.rb:7:1:7:55 | call to post |
|
||||
| Httparty.rb:9:1:9:54 | call to put | Httparty.rb:9:1:9:54 | call to put |
|
||||
| Httparty.rb:11:1:11:56 | call to patch | Httparty.rb:11:1:11:56 | call to patch |
|
||||
| Httparty.rb:15:9:15:46 | call to delete | Httparty.rb:16:1:16:10 | call to body |
|
||||
| Httparty.rb:18:9:18:44 | call to head | Httparty.rb:19:1:19:10 | call to body |
|
||||
| Httparty.rb:21:9:21:47 | call to options | Httparty.rb:22:1:22:10 | call to body |
|
||||
@@ -0,0 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.Httparty
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node httpartyRequests(HttpartyRequest e) { result = e.getResponseBody() }
|
||||
@@ -28,4 +28,4 @@ class MyClient
|
||||
inlcude HTTParty
|
||||
end
|
||||
|
||||
MyClient.get("http://example.com")
|
||||
MyClient.get("http://example.com")
|
||||
@@ -1,8 +0,0 @@
|
||||
| NetHTTP.rb:4:1:4:18 | call to get | NetHTTP.rb:4:1:4:18 | call to get |
|
||||
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:7:1:7:9 | call to body |
|
||||
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:8:1:8:14 | call to read_body |
|
||||
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:9:1:9:11 | call to entity |
|
||||
| NetHTTP.rb:13:6:13:17 | call to get | NetHTTP.rb:18:1:18:7 | call to body |
|
||||
| NetHTTP.rb:14:6:14:18 | call to post | NetHTTP.rb:19:1:19:12 | call to read_body |
|
||||
| NetHTTP.rb:15:6:15:17 | call to put | NetHTTP.rb:20:1:20:9 | call to entity |
|
||||
| NetHTTP.rb:24:3:24:33 | call to get | NetHTTP.rb:27:1:27:28 | call to body |
|
||||
@@ -1,4 +0,0 @@
|
||||
import codeql.ruby.frameworks.http_clients.NetHTTP
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node netHTTPRequests(NetHTTPRequest e) { result = e.getResponseBody() }
|
||||
@@ -0,0 +1,8 @@
|
||||
| NetHttp.rb:4:1:4:18 | call to get | NetHttp.rb:4:1:4:18 | call to get |
|
||||
| NetHttp.rb:6:8:6:50 | call to post | NetHttp.rb:7:1:7:9 | call to body |
|
||||
| NetHttp.rb:6:8:6:50 | call to post | NetHttp.rb:8:1:8:14 | call to read_body |
|
||||
| NetHttp.rb:6:8:6:50 | call to post | NetHttp.rb:9:1:9:11 | call to entity |
|
||||
| NetHttp.rb:13:6:13:17 | call to get | NetHttp.rb:18:1:18:7 | call to body |
|
||||
| NetHttp.rb:14:6:14:18 | call to post | NetHttp.rb:19:1:19:12 | call to read_body |
|
||||
| NetHttp.rb:15:6:15:17 | call to put | NetHttp.rb:20:1:20:9 | call to entity |
|
||||
| NetHttp.rb:24:3:24:33 | call to get | NetHttp.rb:27:1:27:28 | call to body |
|
||||
4
ql/test/library-tests/frameworks/http_clients/NetHttp.ql
Normal file
4
ql/test/library-tests/frameworks/http_clients/NetHttp.ql
Normal file
@@ -0,0 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.NetHttp
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node netHttpRequests(NetHttpRequest e) { result = e.getResponseBody() }
|
||||
@@ -1,6 +1,6 @@
|
||||
import codeql.ruby.frameworks.http_clients.RestClient
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node restClientHTTPRequests(RestClientHTTPRequest e) {
|
||||
query DataFlow::Node restClientHttpRequests(RestClientHttpRequest e) {
|
||||
result = e.getResponseBody()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import codeql.ruby.frameworks.http_clients.Typhoeus
|
||||
import codeql.ruby.DataFlow
|
||||
|
||||
query DataFlow::Node typhoeusHTTPRequests(TyphoeusHTTPRequest e) { result = e.getResponseBody() }
|
||||
query DataFlow::Node typhoeusHttpRequests(TyphoeusHttpRequest e) { result = e.getResponseBody() }
|
||||
|
||||
Reference in New Issue
Block a user