You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/codeql/codeql-language-guides/customizing-library-models-for-java.rst
+50-21Lines changed: 50 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,7 +271,23 @@ This includes descriptions of each of the arguments (eg. access paths, types, an
271
271
Extension points
272
272
----------------
273
273
274
-
Below is a description of the tuple values for each extension point.
274
+
Below is a description of the columns for each extension point.
275
+
Sources, Sinks, Summaries and Neutrals are commonly known as Models.
276
+
The semantics of many of the columns of the extension points are shared.
277
+
278
+
279
+
The shared columns are:
280
+
281
+
- **package**: Name of the package.
282
+
- **type**: Name of the type.
283
+
- **subtypes**: A flag indicating whether the model should also apply to all overrides of the selected method(s).
284
+
- **name**: Name of the method (optional). If left blank, it means all methods matching the previous selction criteria.
285
+
- **signature**: Type signature of the method where the source resides (optional). If this is left blank it means all methods matching the previous selction criteria.
The **input**, and **output** columns consist of a **.**-separated list of components, which is evaluted from left to right, with each step selecting a new set of values derived from the previous set of values.
369
+
370
+
The following components are supported:
371
+
372
+
- **Argument[**\ `n`\ **]** selects the argument at index `n` (zero-indexed).
373
+
- **Argument[**\ `-1`\ **]** selects the qualifier of the call.
374
+
- **Argument[**\ `n1..n2`\ **]** selects the arguments in the given range (both ends included).
375
+
- **Parameter[**\ `n`\ **]** selects the parameter at index `n` (zero-indexed).
376
+
- **Parameter[**\ `n1..n2`\ **]** selects the parameters in the given range (both ends included).
377
+
- **ReturnValue** selects the return value.
378
+
- **Field[**\ `name`\ **]** selects the field with the fully qualified name `name`.
379
+
- **SyntheticField[**\ `name`\ **]** selects the synthetic field with name `name`.
380
+
- **ArrayElement** selects the elements of an array.
381
+
- **Element** selects the elements of a collection-like container.
382
+
- **MapKey** selects the element keys of a map.
383
+
- **MapValue** selects the element values of a map.
371
384
372
385
Provenance
373
-
----------
386
+
----------
387
+
388
+
The **provenance** column is used to specify the provenance (origin) of the model definition.
389
+
390
+
The following values are supported:
391
+
392
+
- **manual**: The model was manually created (or verified by a human) and added to the extension point.
393
+
- **generated**: The model was generated by the model generator and added to the extension point.
394
+
- **ai-generated**: The model was generated by AI and added to the extension point.
395
+
396
+
The provenance is used to distinguish between models that are manually added to the extension point and models that are automatically generated.
397
+
Furthermore, it impacts the dataflow analysis in the following way
398
+
399
+
- A **manual** model takes precedence over **generated** models. If a **manual** model exist for a method then all generated models are ignored.
400
+
- A **generated** or **ai-generated** model is ignored during analysis, if the source code of the method they are modelling is available.
401
+
402
+
That is, generated models are less trusted than manual models.
0 commit comments