Skip to content

Commit 6665248

Browse files
Review suggestions
Co-authored-by: Michael Nebel <[email protected]>
1 parent ae59ea3 commit 6665248

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Extensible predicates used to create custom models in C#
5656
The CodeQL library for C# analysis exposes the following extensible predicates:
5757

5858
- ``sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data.
59-
- ``sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data maybe used in a way that makes the code vulnerable.
59+
- ``sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data may be used in a way that makes the code vulnerable.
6060
- ``summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements.
6161
- ``neutralModel(namespace, type, name, signature, kind, provenance)``. This is similar to a summary model but used to model the flow of values that have only a minor impact on the dataflow analysis.
6262

@@ -76,10 +76,8 @@ This is the constructor of the ``SqlCommand`` class, which is located in the ``S
7676
.. code-block:: csharp
7777
7878
public static void TaintSink(SqlConnection conn, string query) {
79-
using (connection) {
8079
SqlCommand command = new SqlCommand(query, connection) // The argument to this method is a SQL injection sink.
8180
...
82-
}
8381
}
8482
8583
We need to add a tuple to the ``sinkModel``\(namespace, type, subtypes, name, signature, ext, input, kind, provenance) extensible predicate by updating a data extension file.
@@ -270,7 +268,7 @@ These are the same for both of the rows above as we are adding two summaries for
270268
- The first value ``System.Linq`` is the namespace name.
271269
- The second value ``Enumerable`` is the class (type) name.
272270
- The third value ``False`` is a flag that indicates whether or not the summary also applies to all overrides of the method.
273-
- The fourth value ``Select<TSource,TResult>`` is the method name, along with the generics for the method. The names of the generic type parameters provided in the model must match the names of the generic type parameters in the method signature in the source code.
271+
- The fourth value ``Select<TSource,TResult>`` is the method name, along with the type parameters for the method. The names of the generic type parameters provided in the model must match the names of the generic type parameters in the method signature in the source code.
274272
- The fifth value ``(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>)`` is the method input type signature. The generics in the signature must match the generics in the method signature in the source code.
275273

276274
The sixth value should be left empty and is out of scope for this documentation.

0 commit comments

Comments
 (0)