@@ -23,7 +23,7 @@ A data extension for Ruby is a YAML file of the form:
23
23
- <tuple2>
24
24
- ...
25
25
26
- The CodeQL library for JavaScript exposes the following extensible predicates:
26
+ The CodeQL library for Ruby exposes the following extensible predicates:
27
27
28
28
- **sourceModel **\( type, path, kind)
29
29
- **sinkModel **\( type, path, kind)
@@ -66,10 +66,10 @@ For this example, you can use the following data extension:
66
66
67
67
- **command-injection ** indicates that this is considered a sink for the command injection query.
68
68
69
- Example: Taint sources from ` sinatra ` block parameters
69
+ Example: Taint sources from ' sinatra' block parameters
70
70
------------------------------------------------------
71
71
72
- In this example, we'll show how the ` x ` parameter below could be marked as a remote flow source:
72
+ In this example, we'll show how the 'x' parameter below could be marked as a remote flow source:
73
73
74
74
.. code-block :: ruby
75
75
@@ -160,7 +160,7 @@ model to indicate that **Mysql2::EM::Client** is a subclass of **Mysql2::Client*
160
160
Example: Adding flow through 'URI.decode_uri_component'
161
161
-------------------------------------------------------
162
162
163
- In this example, we'll show how to add flow through calls to ` URI.decode_uri_component ` :
163
+ In this example, we'll show how to add flow through calls to ' URI.decode_uri_component' :
164
164
165
165
.. code-block :: ruby
166
166
@@ -176,7 +176,7 @@ We can model this using the following data extension:
176
176
extensible : summaryModel
177
177
data :
178
178
- [
179
- " URI" ,
179
+ " URI! " ,
180
180
" Method[decode_uri_component]" ,
181
181
" Argument[0]" ,
182
182
" ReturnValue" ,
@@ -187,7 +187,7 @@ We can model this using the following data extension:
187
187
- Since we're adding flow through a method call, we add a tuple to the **summaryModel ** extensible predicate.
188
188
- The first column, **"URI!" **, begins the search for relevant calls at references to the **URI ** class.
189
189
- The **! ** suffix indicates that we are looking for the class itself, rather than instances of the class.
190
- - The second column, **Member [decode_uri_component] **, is a path leading to the method calls we wish to model.
190
+ - The second column, **Method [decode_uri_component] **, is a path leading to the method calls we wish to model.
191
191
In this case, we select references to the **decode_uri_component ** method from the **URI ** class.
192
192
- The third column, **Argument[0] **, indicates the input of the flow. In this case, the first argument to the method call.
193
193
- The fourth column, **ReturnValue **, indicates the output of the flow. In this case, the return value of the method call.
@@ -393,11 +393,11 @@ Unlike sources, sinks tend to be highly query-specific, rarely affecting more th
393
393
Not every query supports customizable sinks. If the following sinks are not suitable for your use case, you should add a new query.
394
394
395
395
- **code-injection **: A sink that can be used to inject code, such as in calls to **eval **.
396
- - **command-injection **: A sink that can be used to inject shell commands, such as in calls to **child_process .spawn **.
397
- - **path-injection **: A sink that can be used for path injection in a file system access, such as in calls to **fs.readFile **.
398
- - **sql-injection **: A sink that can be used for SQL injection, such as in a MySQL **query ** call.
396
+ - **command-injection **: A sink that can be used to inject shell commands, such as in calls to **Process .spawn **.
397
+ - **path-injection **: A sink that can be used for path injection in a file system access, such as in calls to **File.open **.
398
+ - **sql-injection **: A sink that can be used for SQL injection, such as in an ActiveRecord **where ** call.
399
399
- **url-redirection **: A sink that can be used to redirect the user to a malicious URL.
400
- - **log-injection **: A sink that can be used for log injection, such as in a **console.log ** call.
400
+ - **log-injection **: A sink that can be used for log injection, such as in a **Rails.logger ** call.
401
401
402
402
Summary kinds
403
403
~~~~~~~~~~~~~
0 commit comments