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-for-visual-studio-code/using-the-codeql-model-editor.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The model editor has two different modes:
25
25
Displaying the CodeQL model editor
26
26
----------------------------------
27
27
28
-
#. Open your CodeQL workspace in VS Code, for example, the vscode-codeql-starter workspace.
28
+
#. Open your CodeQL workspace in VS Code, for example, the ``vscode-codeql-starter`` workspace.
29
29
If you haven't updated the ``ql`` submodule for a while, update it from ``main`` to ensure that you have the queries used to gather data for the model editor.
30
30
#. Open the CodeQL extension and select the CodeQL database that you want to model from the "Databases" section of the left side pane.
31
31
#. Use the command palette to run the “CodeQL: Open Model Editor (Beta)” command.
@@ -35,7 +35,7 @@ Displaying the CodeQL model editor
35
35
Modeling the calls your codebase makes to external APIs
You typically use this approach when you are looking at a specific codebase where you want to improve the precision of CodeQL results. This is usually when the codebase uses frameworks or libraries that are not supported by CodeQL and if the source code of the framework or library is not included in the analysis..
38
+
You typically use this approach when you are looking at a specific codebase where you want to improve the precision of CodeQL results. This is usually when the codebase uses frameworks or libraries that are not supported by CodeQL and if the source code of the framework or library is not included in the analysis.
39
39
40
40
#. Select the CodeQL database that you want to improve CodeQL coverage for.
41
41
#. Display the CodeQL model editor. By default the editor runs in application mode, so the list of external APIs used by the selected codebase is shown.
@@ -59,7 +59,7 @@ You typically use this approach when you are looking at a specific codebase wher
59
59
- **Flow summary**: choose the **Input** and **Output** elements to model.
60
60
61
61
#. Define the **Kind** of dataflow for the model.
62
-
#. When you have finished modeling, click **Save all** or **Save** (shown at the bottom right of each expanded list of calls). The percentage of calls modeled in the editor is updated.
62
+
#. When you have finished modeling, click **Save all** or **Save** (shown at the bottom right of each expanded list of calls). The percentage of calls modeled in the editor is updated.
63
63
64
64
The models are stored in your workspace at ``.github/codeql/extensions/<codeql-model-pack>``, where ``<codeql-model-pack>`` is the name of the CodeQL database that you selected. That is, the name of the repository, hyphen, the language analyzed by CodeQL.
65
65
@@ -99,7 +99,7 @@ You typically use this method when you want to model a framework or library that
99
99
- **Flow summary**: choose the **Input** and **Output** elements to model.
100
100
101
101
#. Define the **Kind** of dataflow for the model.
102
-
#. When you have finished modeling, click **Save all** or **Save** (shown at the bottom right of each expanded list of calls). The percentage of calls modeled in the editor is updated.
102
+
#. When you have finished modeling, click **Save all** or **Save** (shown at the bottom right of each expanded list of calls). The percentage of calls modeled in the editor is updated.
103
103
104
104
The models are stored in your workspace at ``.github/codeql/extensions/<codeql-model-pack>``, where ``<codeql-model-pack>`` is the name of the CodeQL database that you selected. That is, the name of the repository, hyphen, the language analyzed by CodeQL.
Copy file name to clipboardExpand all lines: docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ You can write and run query packs that depend on the CodeQL standard libraries,
28
28
Working with CodeQL query packs
29
29
-------------------------------
30
30
31
-
One of the main benefits of working with a CodeQL query pack is that all dependecies are resolved, not just those defined within the query and standard libraries.
31
+
One of the main benefits of working with a CodeQL query pack is that all dependencies are resolved, not just those defined within the query and standard libraries.
Copy file name to clipboardExpand all lines: docs/codeql/codeql-language-guides/data-extensions-to-model-java-dependencies.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ For more information, see ":ref:`Using the CodeQL model editor <using-the-codeql
21
21
About data extensions
22
22
---------------------
23
23
24
-
You can customize analysis by defining models (summaries, sinks, and sources) of your code's dependencies in data extension files. Each model defines the behavior of one or more elements of your library or framework, such as a methods and callables. When you run dataflow analysis, these models expand the potential sources and sinks tracked by data flow analysis and improve the precision of results.
24
+
You can customize analysis by defining models (summaries, sinks, and sources) of your code's dependencies in data extension files. Each model defines the behavior of one or more elements of your library or framework, such as methods and callables. When you run dataflow analysis, these models expand the potential sources and sinks tracked by data flow analysis and improve the precision of results.
25
25
26
26
Most of the security queries search for paths from a source of untrusted input to a sink that represents a vulnerability. This is known as taint tracking. Each source is a starting point for dataflow analysis to track tainted data and each sink is an end point.
27
27
@@ -64,7 +64,7 @@ The CodeQL library for Java and Kotlin analysis exposes the following extensible
64
64
- ``sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data.
65
65
- ``sinkModel(package, 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.
66
66
- ``summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements.
67
-
- ``neutralModel(package, 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 data flow analysis.
67
+
- ``neutralModel(package, 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.
68
68
69
69
The extensible predicates are populated using data extensions specified in YAML files. For more information about extensible predicates, see ":doc:`extensible-predicates`."
70
70
@@ -258,7 +258,7 @@ For the remaining values for both rows:
258
258
- The ninth value ``value`` is the kind of the flow. ``value`` means that the value is preserved.
259
259
- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary.
260
260
261
-
That is, the first row specifies that values can flow from the elements of the qualifier stream into the first argument of the function provided to ``map``. The second row sepcifies that values can flow from the return value of the function to the elements of the stream returned from ``map``.
261
+
That is, the first row specifies that values can flow from the elements of the qualifier stream into the first argument of the function provided to ``map``. The second row specifies that values can flow from the return value of the function to the elements of the stream returned from ``map``.
This extensible predicate is not typically needed externally, but is included here for completeness.
126
126
It has limited impact on dataflow analysis.
127
-
Manual neutrals are considered high-confidence dispatch call targets and can reduce the number of dispatch call targets during data flow analysis (a performance optimization).
127
+
Manual neutrals are considered high-confidence dispatch call targets and can reduce the number of dispatch call targets during dataflow analysis (a performance optimization).
128
128
129
129
- ``kind``: Kind of the neutral. For neutrals the kind can be ``summary``, ``source``, or ``sink`` to indicate that the callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
130
130
@@ -162,14 +162,14 @@ The following values are supported.
162
162
163
163
- ``manual``: The model was manually created and added to the extensible predicate.
164
164
165
-
Values can also take the form`ORIGIN-VERIFICATION`, where `ORIGIN` is one of:
165
+
Values can also take the form ``ORIGIN-VERIFICATION``, where ``ORIGIN`` is one of:
166
166
167
167
- ``ai``: The model was generated by artificial intelligence (AI).
168
168
- ``df``: The model was generated by the dataflow model generator.
169
169
- ``tb``: The model was generated by the type based model generator.
170
170
- ``hq``: The model was generated using a heuristic query.
171
171
172
-
And `VERIFICATION` is one of:
172
+
And ``VERIFICATION`` is one of:
173
173
174
174
- ``manual``: The model was verified by a human.
175
175
- ``generated``: The model was generated, but not verified by a human.
0 commit comments