@@ -23,7 +23,7 @@ A data extension for Ruby is a YAML file of the form:
2323 - <tuple2>
2424 - ...
2525
26- The CodeQL library for JavaScript exposes the following extensible predicates:
26+ The CodeQL library for Ruby exposes the following extensible predicates:
2727
2828- **sourceModel **\( type, path, kind)
2929- **sinkModel **\( type, path, kind)
@@ -66,10 +66,10 @@ For this example, you can use the following data extension:
6666
6767- **command-injection ** indicates that this is considered a sink for the command injection query.
6868
69- Example: Taint sources from ` sinatra ` block parameters
69+ Example: Taint sources from ' sinatra' block parameters
7070------------------------------------------------------
7171
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:
7373
7474.. code-block :: ruby
7575
@@ -160,7 +160,7 @@ model to indicate that **Mysql2::EM::Client** is a subclass of **Mysql2::Client*
160160 Example: Adding flow through 'URI.decode_uri_component'
161161-------------------------------------------------------
162162
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' :
164164
165165.. code-block :: ruby
166166
@@ -176,7 +176,7 @@ We can model this using the following data extension:
176176 extensible : summaryModel
177177 data :
178178 - [
179- " URI" ,
179+ " URI! " ,
180180 " Method[decode_uri_component]" ,
181181 " Argument[0]" ,
182182 " ReturnValue" ,
@@ -187,7 +187,7 @@ We can model this using the following data extension:
187187 - Since we're adding flow through a method call, we add a tuple to the **summaryModel ** extensible predicate.
188188- The first column, **"URI!" **, begins the search for relevant calls at references to the **URI ** class.
189189- 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.
191191 In this case, we select references to the **decode_uri_component ** method from the **URI ** class.
192192- The third column, **Argument[0] **, indicates the input of the flow. In this case, the first argument to the method call.
193193- 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
393393Not every query supports customizable sinks. If the following sinks are not suitable for your use case, you should add a new query.
394394
395395- **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.
399399- **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.
401401
402402Summary kinds
403403~~~~~~~~~~~~~
0 commit comments