Skip to content

Commit 82d9d46

Browse files
owen-mcCopilot
andcommitted
Remove duplication and standardize wording
Co-authored-by: Copilot <copilot@github.com>
1 parent 5a7b1b9 commit 82d9d46

7 files changed

Lines changed: 39 additions & 99 deletions

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ We need to add a tuple to the ``sourceModel(namespace, type, subtypes, name, sig
8888
data:
8989
- ["boost::asio", "", False, "read_until", "", "", "Argument[*1]", "remote", "manual"]
9090
91-
Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate.
9291
The first five values identify the callable (in this case a free function) to be modeled as a source.
9392

9493
- The first value ``"boost::asio"`` is the namespace name.
@@ -124,7 +123,6 @@ We need to add a tuple to the ``sinkModel(namespace, type, subtypes, name, signa
124123
data:
125124
- ["boost::asio", "", False, "write", "", "", "Argument[*1]", "remote-sink", "manual"]
126125
127-
Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate.
128126
The first five values identify the callable (in this case a free function) to be modeled as a sink.
129127

130128
- The first value ``"boost::asio"`` is the namespace name.
@@ -160,8 +158,6 @@ We need to add tuples to the ``summaryModel(namespace, type, subtypes, name, sig
160158
data:
161159
- ["boost::asio", "", False, "buffer", "", "", "Argument[*0]", "ReturnValue", "taint", "manual"]
162160
163-
Since we are adding flow through a function, we need to add tuples to the ``summaryModel`` extensible predicate.
164-
165161
The first five values identify the callable (in this case free function) to be modeled as a summary.
166162

167163
- The first value ``"boost::asio"`` is the namespace name.
@@ -203,7 +199,6 @@ We need to add a tuple to the ``barrierModel(namespace, type, subtypes, name, si
203199
data:
204200
- ["", "", False, "mysql_real_escape_string", "", "", "Argument[*1]", "sql-injection", "manual"]
205201
206-
Since we are adding a barrier, we need to add a tuple to the ``barrierModel`` extensible predicate.
207202
The first five values identify the callable (in this case a free function) to be modeled as a barrier.
208203

209204
- The first value ``""`` is the namespace name.
@@ -243,7 +238,6 @@ We need to add a tuple to the ``barrierGuardModel(namespace, type, subtypes, nam
243238
data:
244239
- ["", "", False, "is_safe", "", "", "Argument[*0]", "true", "sql-injection", "manual"]
245240
246-
Since we are adding a barrier guard, we need to add a tuple to the ``barrierGuardModel`` extensible predicate.
247241
The first five values identify the callable (in this case a free function) to be modeled as a barrier guard.
248242

249243
- The first value ``""`` is the namespace name.

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ We need to add a tuple to the ``sinkModel``\(namespace, type, subtypes, name, si
9393
data:
9494
- ["System.Data.SqlClient", "SqlCommand", False, "SqlCommand", "(System.String,System.Data.SqlClient.SqlConnection)", "", "Argument[0]", "sql-injection", "manual"]
9595
96-
Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate.
9796
The first five values identify the callable (in this case a method) to be modeled as a sink.
9897

9998
- The first value ``System.Data.SqlClient`` is the namespace name.
@@ -132,8 +131,6 @@ We need to add a tuple to the ``sourceModel(namespace, type, subtypes, name, sig
132131
data:
133132
- ["System.Net.Sockets", "TcpClient", False, "GetStream", "()", "", "ReturnValue", "remote", "manual"]
134133
135-
136-
Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate.
137134
The first five values identify the callable (in this case a method) to be modeled as a source.
138135

139136
- The first value ``System.Net.Sockets`` is the namespace name.
@@ -173,7 +170,6 @@ We need to add tuples to the ``summaryModel(namespace, type, subtypes, name, sig
173170
- ["System", "String", False, "Concat", "(System.Object,System.Object)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
174171
- ["System", "String", False, "Concat", "(System.Object,System.Object)", "", "Argument[1]", "ReturnValue", "taint", "manual"]
175172
176-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
177173
Each tuple defines flow from one argument to the return value.
178174
The first row defines flow from the first argument (``s1`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``s2`` in the example) to the return value (``t`` in the example).
179175

@@ -229,7 +225,6 @@ We need to add a tuple to the ``summaryModel(namespace, type, subtypes, name, si
229225
data:
230226
- ["System", "String", False, "Trim", "()", "", "Argument[this]", "ReturnValue", "taint", "manual"]
231227
232-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
233228
Each tuple defines flow from one argument to the return value.
234229
The first row defines flow from the qualifier of the method call (``s1`` in the example) to the return value (``t`` in the example).
235230

@@ -274,8 +269,6 @@ We need to add tuples to the ``summaryModel(namespace, type, subtypes, name, sig
274269
- ["System.Linq", "Enumerable", False, "Select<TSource,TResult>", "(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>)", "", "Argument[0].Element", "Argument[1].Parameter[0]", "value", "manual"]
275270
- ["System.Linq", "Enumerable", False, "Select<TSource,TResult>", "(System.Collections.Generic.IEnumerable<TSource>,System.Func<TSource,TResult>)", "", "Argument[1].ReturnValue", "ReturnValue.Element", "value", "manual"]
276271
277-
278-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
279272
Each tuple defines part of the flow that comprises the total flow through the ``Select`` method.
280273
The first five values identify the callable (in this case a method) to be modeled as a summary.
281274
These are the same for both of the rows above as we are adding two summaries for the same method.
@@ -334,7 +327,6 @@ We need to add a tuple to the ``barrierModel(namespace, type, subtypes, name, si
334327
data:
335328
- ["System.Web", "HttpRequest", False, "get_RawUrl", "()", "", "ReturnValue", "url-redirection", "manual"]
336329
337-
Since we are adding a barrier, we need to add a tuple to the ``barrierModel`` extensible predicate.
338330
The first five values identify the callable (in this case the getter of a property) to be modeled as a barrier.
339331

340332
- The first value ``System.Web`` is the namespace name.
@@ -376,7 +368,6 @@ We need to add a tuple to the ``barrierGuardModel(namespace, type, subtypes, nam
376368
data:
377369
- ["System", "Uri", False, "get_IsAbsoluteUri", "()", "", "Argument[this]", "false", "url-redirection", "manual"]
378370
379-
Since we are adding a barrier guard, we need to add a tuple to the ``barrierGuardModel`` extensible predicate.
380371
The first five values identify the callable (in this case the getter of a property) to be modeled as a barrier guard.
381372

382373
- The first value ``System`` is the namespace name.
@@ -416,8 +407,6 @@ We need to add a tuple to the ``neutralModel(namespace, type, name, signature, k
416407
data:
417408
- ["System", "DateTime", "get_Now", "()", "summary", "manual"]
418409
419-
420-
Since we are adding a neutral model, we need to add tuples to the ``neutralModel`` extensible predicate.
421410
The first four values identify the callable (in this case the getter of the ``Now`` property) to be modeled as a neutral, the fifth value is the kind, and the sixth value is the provenance (origin) of the neutral.
422411

423412
- The first value ``System`` is the namespace name.

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ We need to add a tuple to the ``sinkModel``\(package, type, subtypes, name, sign
9393
data:
9494
- ["database/sql", "DB", True, "Prepare", "", "", "Argument[0]", "sql-injection", "manual"]
9595
96-
Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate.
9796
The first five values identify the function (in this case a method) to be modeled as a sink.
9897

9998
- The first value ``database/sql`` is the package name.
@@ -133,8 +132,6 @@ We need to add a tuple to the ``sourceModel(package, type, subtypes, name, signa
133132
data:
134133
- ["net/http", "Request", True, "FormValue", "", "", "ReturnValue", "remote", "manual"]
135134
136-
137-
Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate.
138135
The first five values identify the function to be modeled as a source.
139136

140137
- The first value ``net/http`` is the package name.
@@ -175,7 +172,6 @@ We need to add a tuple to the ``summaryModel(package, type, subtypes, name, sign
175172
data:
176173
- ["slices", "", False, "Max", "", "", "Argument[0].ArrayElement", "ReturnValue", "value", "manual"]
177174
178-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
179175
The first row defines flow from the first argument (``a`` in the example) to the return value (``max`` in the example).
180176

181177
The first five values identify the function to be modeled as a summary.
@@ -220,7 +216,6 @@ We need to add a tuple to the ``summaryModel(package, type, subtypes, name, sign
220216
data:
221217
- ["slices", "", False, "Concat", "", "", "Argument[0].ArrayElement.ArrayElement", "ReturnValue.ArrayElement", "value", "manual"]
222218
223-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
224219
The first row defines flow from the arguments (``a`` and ``b`` in the example) to the return value (``c`` in the example).
225220

226221
The first five values identify the function to be modeled as a summary.
@@ -265,7 +260,6 @@ We need to add tuples to the ``summaryModel(package, type, subtypes, name, signa
265260
- ["strings", "", False, "Join", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
266261
- ["strings", "", False, "Join", "", "", "Argument[1]", "ReturnValue", "taint", "manual"]
267262
268-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
269263
Each tuple defines flow from one argument to the return value.
270264
The first row defines flow from the first argument (``elems`` in the example) to the return value (``t`` in the example) and the second row defines flow from the second argument (``sep`` in the example) to the return value (``t`` in the example).
271265

@@ -321,7 +315,6 @@ We need to add a tuple to the ``summaryModel(package, type, subtypes, name, sign
321315
data:
322316
- ["net/url", "URL", True, "Hostname", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
323317
324-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
325318
Each tuple defines flow from one argument to the return value.
326319
The first row defines flow from the qualifier of the method call (``u`` in the example) to the return value (``host`` in the example).
327320

@@ -365,7 +358,6 @@ We need to add a tuple to the ``barrierModel(package, type, subtypes, name, sign
365358
data:
366359
- ["group:beego", "", True, "Htmlquote", "", "", "ReturnValue", "html-injection", "manual"]
367360
368-
Since we are adding a barrier, we need to add a tuple to the ``barrierModel`` extensible predicate.
369361
The first five values identify the function to be modeled as a barrier.
370362

371363
- The first value ``group:beego`` is the package group name. The ``group:`` prefix indicates that this is a package group, which is used to match multiple package paths that refer to the same package.
@@ -406,7 +398,6 @@ We need to add a tuple to the ``barrierGuardModel(package, type, subtypes, name,
406398
data:
407399
- ["example.com/example", "", False, "IsSafe", "", "", "Argument[0]", "true", "sql-injection", "manual"]
408400
409-
Since we are adding a barrier guard, we need to add a tuple to the ``barrierGuardModel`` extensible predicate.
410401
The first five values identify the function to be modeled as a barrier guard.
411402

412403
- The first value ``example.com/example`` is the package name.
@@ -445,7 +436,6 @@ We need to add a tuple to the ``sourceModel(package, type, subtypes, name, signa
445436
data:
446437
- ["net/http", "Request", True, "Body", "", "", "", "remote", "manual"]
447438
448-
Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate.
449439
The first five values identify the field to be modeled as a source.
450440

451441
- The first value ``net/http`` is the package name.

docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ We need to add a tuple to the ``sinkModel(package, type, subtypes, name, signatu
9898
data:
9999
- ["java.sql", "Statement", True, "execute", "(String)", "", "Argument[0]", "sql-injection", "manual"]
100100
101-
102-
Since we want to add a new sink, we need to add a tuple to the ``sinkModel`` extensible predicate.
103101
The first five values identify the callable (in this case a method) to be modeled as a sink.
104102

105103
- The first value ``java.sql`` is the package name.
@@ -138,8 +136,6 @@ We need to add a tuple to the ``sourceModel(package, type, subtypes, name, signa
138136
data:
139137
- ["java.net", "Socket", False, "getInputStream", "()", "", "ReturnValue", "remote", "manual"]
140138
141-
142-
Since we are adding a new source, we need to add a tuple to the ``sourceModel`` extensible predicate.
143139
The first five values identify the callable (in this case a method) to be modeled as a source.
144140

145141
- The first value ``java.net`` is the package name.
@@ -179,7 +175,6 @@ We need to add tuples to the ``summaryModel(package, type, subtypes, name, signa
179175
- ["java.lang", "String", False, "concat", "(String)", "", "Argument[this]", "ReturnValue", "taint", "manual"]
180176
- ["java.lang", "String", False, "concat", "(String)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
181177
182-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
183178
Each tuple defines flow from one argument to the return value.
184179
The first row defines flow from the qualifier (``s1`` in the example) to the return value (``t`` in the example) and the second row defines flow from the first argument (``s2`` in the example) to the return value (``t`` in the example).
185180

@@ -224,8 +219,6 @@ We need to add tuples to the ``summaryModel(package, type, subtypes, name, signa
224219
- ["java.util.stream", "Stream", True, "map", "(Function)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
225220
- ["java.util.stream", "Stream", True, "map", "(Function)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
226221
227-
228-
Since we are adding flow through a method, we need to add tuples to the ``summaryModel`` extensible predicate.
229222
Each tuple defines part of the flow that comprises the total flow through the ``map`` method.
230223
The first five values identify the callable (in this case a method) to be modeled as a summary.
231224
These are the same for both of the rows above as we are adding two summaries for the same method.
@@ -282,8 +275,6 @@ We need to add a tuple to the ``barrierModel(package, type, subtypes, name, sign
282275
data:
283276
- ["java.io", "File", True, "getName", "()", "", "ReturnValue", "path-injection", "manual"]
284277
285-
286-
Since we are adding a new barrier, we need to add a tuple to the ``barrierModel`` extensible predicate.
287278
The first five values identify the callable (in this case a method) to be modeled as a barrier.
288279

289280
- The first value ``java.io`` is the package name.
@@ -326,8 +317,6 @@ We need to add a tuple to the ``barrierGuardModel(package, type, subtypes, name,
326317
data:
327318
- ["java.net", "URI", True, "isAbsolute", "()", "", "Argument[this]", "false", "request-forgery", "manual"]
328319
329-
330-
Since we are adding a barrier guard, we need to add a tuple to the ``barrierGuardModel`` extensible predicate.
331320
The first five values identify the callable (in this case a method) to be modeled as a barrier guard.
332321

333322
- The first value ``java.net`` is the package name.
@@ -367,8 +356,6 @@ We need to add a tuple to the ``neutralModel(package, type, name, signature, kin
367356
data:
368357
- ["java.time", "Instant", "now", "()", "summary", "manual"]
369358
370-
371-
Since we are adding a neutral model, we need to add tuples to the ``neutralModel`` extensible predicate.
372359
The first four values identify the callable (in this case a method) to be modeled as a neutral, the fifth value is the kind, and the sixth value is the provenance (origin) of the neutral.
373360

374361
- The first value ``java.time`` is the package name.

0 commit comments

Comments
 (0)