Skip to content

Commit ac26330

Browse files
felicitymaysubatoi
andcommitted
Apply suggestions from code review
Co-authored-by: Ben Ahmady <[email protected]>
1 parent d5c79d4 commit ac26330

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

docs/codeql/codeql-for-visual-studio-code/using-the-codeql-model-editor.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The model editor has two different modes:
2525
Displaying the CodeQL model editor
2626
----------------------------------
2727

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.
2929
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.
3030
#. Open the CodeQL extension and select the CodeQL database that you want to model from the "Databases" section of the left side pane.
3131
#. Use the command palette to run the “CodeQL: Open Model Editor (Beta)” command.
@@ -35,7 +35,7 @@ Displaying the CodeQL model editor
3535
Modeling the calls your codebase makes to external APIs
3636
-------------------------------------------------------
3737

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..
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.
3939

4040
#. Select the CodeQL database that you want to improve CodeQL coverage for.
4141
#. 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
5959
- **Flow summary**: choose the **Input** and **Output** elements to model.
6060

6161
#. 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.
6363

6464
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.
6565

@@ -99,7 +99,7 @@ You typically use this method when you want to model a framework or library that
9999
- **Flow summary**: choose the **Input** and **Output** elements to model.
100100

101101
#. 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.
103103

104104
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.
105105

docs/codeql/codeql-for-visual-studio-code/working-with-codeql-packs-in-visual-studio-code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can write and run query packs that depend on the CodeQL standard libraries,
2828
Working with CodeQL query packs
2929
-------------------------------
3030

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.
3232

3333
Creating and editing CodeQL query packs
3434
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/codeql/codeql-language-guides/data-extensions-to-model-java-dependencies.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For more information, see ":ref:`Using the CodeQL model editor <using-the-codeql
2121
About data extensions
2222
---------------------
2323

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.
2525

2626
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.
2727

@@ -64,7 +64,7 @@ The CodeQL library for Java and Kotlin analysis exposes the following extensible
6464
- ``sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data.
6565
- ``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.
6666
- ``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.
6868

6969
The extensible predicates are populated using data extensions specified in YAML files. For more information about extensible predicates, see ":doc:`extensible-predicates`."
7070

@@ -258,7 +258,7 @@ For the remaining values for both rows:
258258
- The ninth value ``value`` is the kind of the flow. ``value`` means that the value is preserved.
259259
- The tenth value ``manual`` is the provenance of the summary, which is used to identify the origin of the summary.
260260

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``.
262262

263263
Example: Add a ``neutral`` method
264264
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/codeql/codeql-language-guides/extensible-predicates.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ neutralModel(package, type, name, signature, kind, provenance)
124124

125125
This extensible predicate is not typically needed externally, but is included here for completeness.
126126
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).
128128

129129
- ``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).
130130

@@ -162,14 +162,14 @@ The following values are supported.
162162

163163
- ``manual``: The model was manually created and added to the extensible predicate.
164164

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:
166166

167167
- ``ai``: The model was generated by artificial intelligence (AI).
168168
- ``df``: The model was generated by the dataflow model generator.
169169
- ``tb``: The model was generated by the type based model generator.
170170
- ``hq``: The model was generated using a heuristic query.
171171

172-
And `VERIFICATION` is one of:
172+
And ``VERIFICATION`` is one of:
173173

174174
- ``manual``: The model was verified by a human.
175175
- ``generated``: The model was generated, but not verified by a human.

0 commit comments

Comments
 (0)