Skip to content

Commit 5826f2c

Browse files
committed
Move Net::HTTP modelling into http_clients module
This seems a more convenient place to keep all the HTTP client modelling.
1 parent b658bac commit 5826f2c

File tree

7 files changed

+15
-9
lines changed

7 files changed

+15
-9
lines changed

ql/lib/codeql/ruby/Frameworks.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ private import codeql.ruby.frameworks.ActiveRecord
77
private import codeql.ruby.frameworks.ActionView
88
private import codeql.ruby.frameworks.StandardLibrary
99
private import codeql.ruby.frameworks.Files
10+
private import codeql.ruby.frameworks.HTTPClients
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Helper file that imports all HTTP clients.
3+
*/
4+
5+
private import codeql.ruby.frameworks.http_clients.NetHTTP
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
| NetHTTP.rb:4:1:4:18 | call to get | NetHTTP.rb:4:1:4:18 | call to get |
2+
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:7:1:7:9 | call to body |
3+
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:8:1:8:14 | call to read_body |
4+
| NetHTTP.rb:6:8:6:50 | call to post | NetHTTP.rb:9:1:9:11 | call to entity |
5+
| NetHTTP.rb:13:6:13:17 | call to get | NetHTTP.rb:18:1:18:7 | call to body |
6+
| NetHTTP.rb:14:6:14:18 | call to post | NetHTTP.rb:19:1:19:12 | call to read_body |
7+
| NetHTTP.rb:15:6:15:17 | call to put | NetHTTP.rb:20:1:20:9 | call to entity |
8+
| NetHTTP.rb:24:3:24:33 | call to get | NetHTTP.rb:27:1:27:28 | call to body |
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import codeql.ruby.frameworks.stdlib.net.HTTP
1+
import codeql.ruby.frameworks.http_clients.NetHTTP
22
import codeql.ruby.DataFlow
33

44
query DataFlow::Node netHTTPRequests(NetHTTPRequest e) { result = e.getResponseBody() }

ql/test/library-tests/frameworks/stdlib/net/Http.expected

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)