Skip to content

Commit 21cdf89

Browse files
author
james
committed
first pass through files and links
1 parent 6ed290f commit 21cdf89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+228
-228
lines changed

docs/language/learn-ql/about-data-flow-analysis.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ The following sections provide a brief introduction to data flow analysis with C
1414

1515
See the following tutorials for more information about analyzing data flow in specific languages:
1616

17-
- ":doc:`Analyzing data flow in C/C++ <cpp/dataflow>`"
18-
- ":doc:`Analyzing data flow in C# <csharp/dataflow>`"
19-
- ":doc:`Analyzing data flow in Java <java/dataflow>`"
20-
- ":doc:`Analyzing data flow in JavaScript/TypeScript <javascript/dataflow>`"
21-
- ":doc:`Analyzing data flow and tracking tainted data in Python <python/taint-tracking>`"
17+
- ":doc:`Analyzing data flow in C/C++ <cpp/analyzing-data-flow-in-cpp>`"
18+
- ":doc:`Analyzing data flow in C# <csharp/analyzing-data-flow-in-csharp>`"
19+
- ":doc:`Analyzing data flow in Java <java/analyzing-data-flow-in-java>`"
20+
- ":doc:`Analyzing data flow in JavaScript/TypeScript <javascript/analyzing-data-flow-in-javascript>`"
21+
- ":doc:`Analyzing data flow and tracking tainted data in Python <python/analyzing-data-flow-and-tracking-tainted-data-in-python>`"
2222

2323
.. pull-quote::
2424

2525
Note
2626

27-
Data flow analysis is used extensively in path queries. To learn more about path queries, see ":doc:`Creating path queries <writing-queries/path-queries>`."
27+
Data flow analysis is used extensively in path queries. To learn more about path queries, see ":doc:`Creating path queries <writing-queries/creating-path-queries>`."
2828

2929
.. _data-flow-graph:
3030

@@ -82,5 +82,5 @@ These flow steps are modeled in the taint-tracking library using predicates that
8282
Further reading
8383
***************
8484

85-
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-paths.html>`__"
85+
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-data-flow-with-path-queries.html>`__"
8686

docs/language/learn-ql/beginner/find-the-thief.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ There is too much information to search through by hand, so you decide to use yo
4848

4949
#. Open the `query console on LGTM.com <https://lgtm.com/query>`__ to get started.
5050
#. Select a language and a demo project. For this tutorial, any language and project will do.
51-
#. Delete the default code ``import <language> select "hello world"``.
51+
#. Delete the default code ``import <ql-language-specification> select "hello world"``.
5252

5353
QL libraries
5454
------------

docs/language/learn-ql/cpp/analyzing-data-flow-in-cpp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can use data flow analysis to track the flow of potentially malicious or ins
66
About data flow
77
---------------
88

9-
Data flow analysis computes the possible values that a variable can hold at various points in a program, determining how those values propagate through the program, and where they are used. In CodeQL, you can model both local data flow and global data flow. For a more general introduction to modeling data flow, see ":doc:`About data flow analysis <../intro-to-data-flow>`."
9+
Data flow analysis computes the possible values that a variable can hold at various points in a program, determining how those values propagate through the program, and where they are used. In CodeQL, you can model both local data flow and global data flow. For a more general introduction to modeling data flow, see ":doc:`About data flow analysis <../about-data-flow-analysis>`."
1010

1111
Local data flow
1212
---------------
@@ -390,7 +390,7 @@ Exercise 4
390390
Further reading
391391
---------------
392392

393-
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-paths.html>`__"
393+
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-data-flow-with-path-queries.html>`__"
394394

395395

396396
.. include:: ../../reusables/cpp-further-reading.rst

docs/language/learn-ql/cpp/codeql-for-cpp.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,37 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
66
.. toctree::
77
:hidden:
88

9-
basic-query-cpp
10-
introduce-libraries-cpp
11-
function-classes
12-
expressions-types
13-
conversions-classes
14-
dataflow
15-
private-field-initialization
16-
zero-space-terminator
17-
guards
18-
range-analysis
19-
value-numbering-hash-cons
9+
basic-query-for-cpp-code
10+
codeql-library-for-cpp
11+
functions-in-cpp
12+
expressions-types-and-statements-in-cpp
13+
conversions-and-classes-in-cpp
14+
analyzing-data-flow-in-cpp
15+
refining-a-query-to-account-for-edge-cases
16+
detecting-a-potential-buffer-overflow
17+
using-the-guards-library-in-cpp
18+
using-range-analsis-in-cpp
19+
hash-consing-and-value-numbering
2020

2121

22-
- :doc:`Basic query for C and C++ code <basic-query-cpp>`: Learn to write and run a simple CodeQL query using LGTM.
22+
- :doc:`Basic query for C and C++ code <basic-query-for-cpp-code>`: Learn to write and run a simple CodeQL query using LGTM.
2323

24-
- :doc:`CodeQL library for C and C++ <introduce-libraries-cpp>`: When analyzing C or C++ code, you can use the large collection of classes in the CodeQL library for C and C++.
24+
- :doc:`CodeQL library for C and C++ <codeql-library-for-cpp>`: When analyzing C or C++ code, you can use the large collection of classes in the CodeQL library for C and C++.
2525

26-
- :doc:`Functions in C and C++ <function-classes>`: You can use CodeQL to explore functions in C and C++ code.
26+
- :doc:`Functions in C and C++ <functions-in-cpp>`: You can use CodeQL to explore functions in C and C++ code.
2727

28-
- :doc:`Expressions, types, and statements in C and C++ <expressions-types>`: You can use CodeQL to explore expressions, types, and statements in C and C++ code to find, for example, incorrect assignments.
28+
- :doc:`Expressions, types, and statements in C and C++ <expressions-types-and-statements-in-cpp>`: You can use CodeQL to explore expressions, types, and statements in C and C++ code to find, for example, incorrect assignments.
2929

30-
- :doc:`Conversions and classes in C and C++ <conversions-classes>`: You can use the standard CodeQL libraries for C and C++ to detect when the type of an expression is changed.
30+
- :doc:`Conversions and classes in C and C++ <conversions-and-classes-in-cpp>`: You can use the standard CodeQL libraries for C and C++ to detect when the type of an expression is changed.
3131

32-
- :doc:`Analyzing data flow in C and C++ <dataflow>`: You can use data flow analysis to track the flow of potentially malicious or insecure data that can cause vulnerabilities in your codebase.
32+
- :doc:`Analyzing data flow in C and C++ <analyzing-data-flow-in-cpp>`: You can use data flow analysis to track the flow of potentially malicious or insecure data that can cause vulnerabilities in your codebase.
3333

34-
- :doc:`Refining a query to account for edge cases <private-field-initialization>`: You can improve the results generated by a CodeQL query by adding conditions to remove false positive results caused by common edge cases.
34+
- :doc:`Refining a query to account for edge cases <refining-a-query-to-account-for-edge-cases>`: You can improve the results generated by a CodeQL query by adding conditions to remove false positive results caused by common edge cases.
3535

36-
- :doc:`Detecting a potential buffer overflow <zero-space-terminator>`: You can use CodeQL to detect potential buffer overflows by checking for allocations equal to ``strlen`` in C and C++.
36+
- :doc:`Detecting a potential buffer overflow <detecting-a-potential-buffer-overflow>`: You can use CodeQL to detect potential buffer overflows by checking for allocations equal to ``strlen`` in C and C++.
3737

38-
- :doc:`Using the guards library in C and C++ <guards>`: You can use the CodeQL guards library to identify conditional expressions that control the execution of other parts of a program in C and C++ codebases.
38+
- :doc:`Using the guards library in C and C++ <using-the-guards-library-in-cpp>`: You can use the CodeQL guards library to identify conditional expressions that control the execution of other parts of a program in C and C++ codebases.
3939

40-
- :doc:`Using range analysis for C and C++ <range-analysis>`: You can use range analysis to determine the upper or lower bounds on an expression, or whether an expression could potentially over or underflow.
40+
- :doc:`Using range analysis for C and C++ <using-range-analsis-in-cpp>`: You can use range analysis to determine the upper or lower bounds on an expression, or whether an expression could potentially over or underflow.
4141

42-
- :doc:`Hash consing and value numbering <value-numbering-hash-cons>`: You can use specialized CodeQL libraries to recognize expressions that are syntactically identical or compute the same value at runtime in C and C++ codebases.
42+
- :doc:`Hash consing and value numbering <hash-consing-and-value-numbering>`: You can use specialized CodeQL libraries to recognize expressions that are syntactically identical or compute the same value at runtime in C and C++ codebases.

docs/language/learn-ql/cpp/functions-in-cpp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can use CodeQL to explore functions in C and C++ code.
66
Overview
77
--------
88

9-
The standard CodeQL library for C and C++ represents functions using the ``Function`` class (see :doc:`CodeQL libraries for C and C++ <introduce-libraries-cpp>`).
9+
The standard CodeQL library for C and C++ represents functions using the ``Function`` class (see :doc:`CodeQL libraries for C and C++ <codeql-library-for-cpp>`).
1010

1111
The example queries in this topic explore some of the most useful library predicates for querying functions.
1212

@@ -28,7 +28,7 @@ This query is very general, so there are probably too many results to be interes
2828
Finding functions that are not called
2929
-------------------------------------
3030

31-
It might be more interesting to find functions that are not called, using the standard CodeQL ``FunctionCall`` class from the **abstract syntax tree** category (see :doc:`CodeQL libraries for C and C++ <introduce-libraries-cpp>`). The ``FunctionCall`` class can be used to identify places where a function is actually used, and it is related to ``Function`` through the ``FunctionCall.getTarget()`` predicate.
31+
It might be more interesting to find functions that are not called, using the standard CodeQL ``FunctionCall`` class from the **abstract syntax tree** category (see :doc:`CodeQL libraries for C and C++ <codeql-library-for-cpp>`). The ``FunctionCall`` class can be used to identify places where a function is actually used, and it is related to ``Function`` through the ``FunctionCall.getTarget()`` predicate.
3232

3333
.. code-block:: ql
3434

docs/language/learn-ql/cpp/refining-a-query-to-account-for-edge-cases.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can improve the results generated by a CodeQL query by adding conditions to
66
Overview
77
--------
88

9-
This topic describes how a C++ query was developed. The example introduces recursive predicates and demonstrates the typical workflow used to refine a query. For a full overview of the topics available for learning to write queries for C/C++ code, see ":doc:`CodeQL for C and C++ <ql-for-cpp>`."
9+
This topic describes how a C++ query was developed. The example introduces recursive predicates and demonstrates the typical workflow used to refine a query. For a full overview of the topics available for learning to write queries for C/C++ code, see ":doc:`CodeQL for C and C++ <codeql-for-cpp>`."
1010

1111
Finding every private field and checking for initialization
1212
-----------------------------------------------------------

docs/language/learn-ql/csharp/analyzing-data-flow-in-csharp.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ About this article
88

99
This article describes how data flow analysis is implemented in the CodeQL libraries for C# and includes examples to help you write your own data flow queries.
1010
The following sections describe how to use the libraries for local data flow, global data flow, and taint tracking.
11-
For a more general introduction to modeling data flow, see ":doc:`About data flow analysis <../intro-to-data-flow>`."
11+
For a more general introduction to modeling data flow, see ":doc:`About data flow analysis <../about-data-flow-analysis>`."
1212

1313
Local data flow
1414
---------------
@@ -553,7 +553,7 @@ This can be adapted from the ``SystemUriFlow`` class:
553553
Further reading
554554
---------------
555555

556-
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-paths.html>`__"
556+
- "`Exploring data flow with path queries <https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-data-flow-with-path-queries.html>`__"
557557

558558

559559
.. include:: ../../reusables/csharp-further-reading.rst

docs/language/learn-ql/csharp/codeql-for-csharp.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
66
.. toctree::
77
:hidden:
88

9-
basic-query-csharp
10-
introduce-libraries-csharp
11-
dataflow
9+
basic-query-for-csharp-code
10+
codeql-library-for-csharp
11+
analyzing-data-flow-in-csharp
1212

13-
- :doc:`Basic query for C# code <basic-query-csharp>`: Learn to write and run a simple CodeQL query using LGTM.
13+
- :doc:`Basic query for C# code <basic-query-for-csharp-code>`: Learn to write and run a simple CodeQL query using LGTM.
1414

15-
- :doc:`CodeQL library for C# <introduce-libraries-csharp>`: When you're analyzing a C# program, you can make use of the large collection of classes in the CodeQL library for C#.
15+
- :doc:`CodeQL library for C# <codeql-library-for-csharp>`: When you're analyzing a C# program, you can make use of the large collection of classes in the CodeQL library for C#.
1616

17-
- :doc:`Analyzing data flow in C# <dataflow>`: You can use CodeQL to track the flow of data through a C# program to its use.
17+
- :doc:`Analyzing data flow in C# <analyzing-data-flow-in-csharp>`: You can use CodeQL to track the flow of data through a C# program to its use.
1818

1919

docs/language/learn-ql/csharp/codeql-library-for-csharp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There is an extensive core library for analyzing CodeQL databases extracted from
1414
1515
Since this is required for all C# queries, it's omitted from code snippets below.
1616

17-
The core library contains all the program elements, including `files <#files>`__, `types <#types>`__, methods, `variables <#variables>`__, `statements <#statements>`__, and `expressions <#expressions>`__. This is sufficient for most queries, however additional libraries can be imported for bespoke functionality such as control flow and data flow. For information about these additional libraries, see ":doc:`CodeQL for C# <ql-for-csharp>`."
17+
The core library contains all the program elements, including `files <#files>`__, `types <#types>`__, methods, `variables <#variables>`__, `statements <#statements>`__, and `expressions <#expressions>`__. This is sufficient for most queries, however additional libraries can be imported for bespoke functionality such as control flow and data flow. For information about these additional libraries, see ":doc:`CodeQL for C# <codeql-for-csharp>`."
1818

1919
Class hierarchies
2020
~~~~~~~~~~~~~~~~~

docs/language/learn-ql/go/codeql-for-go.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
66
.. toctree::
77
:hidden:
88

9-
basic-query-go
10-
introduce-libraries-go
11-
ast-class-reference
12-
library-modeling-go
9+
basic-query-for-go-code
10+
codeql-library-for-go
11+
abstract-syntax-tree-classes-for-working-with-go-programs
12+
modeling-data-flow-in-go-libraries
1313

14-
- :doc:`Basic query for Go code <basic-query-go>`: Learn to write and run a simple CodeQL query using LGTM.
14+
- :doc:`Basic query for Go code <basic-query-for-go-code>`: Learn to write and run a simple CodeQL query using LGTM.
1515

16-
- :doc:`CodeQL library for Go <introduce-libraries-go>`: When you're analyzing a Go program, you can make use of the large collection of classes in the CodeQL library for Go.
16+
- :doc:`CodeQL library for Go <codeql-library-for-go>`: When you're analyzing a Go program, you can make use of the large collection of classes in the CodeQL library for Go.
1717

18-
- :doc:`Abstract syntax tree classes for working with Go programs <ast-class-reference>`: CodeQL has a large selection of classes for representing the abstract syntax tree of Go programs.
18+
- :doc:`Abstract syntax tree classes for working with Go programs <abstract-syntax-tree-classes-for-working-with-go-programs>`: CodeQL has a large selection of classes for representing the abstract syntax tree of Go programs.
1919

20-
- :doc:`Modeling data flow in Go libraries <library-modeling-go>`: When analyzing a Go program, CodeQL does not examine the source code for external packages.
20+
- :doc:`Modeling data flow in Go libraries <modeling-data-flow-in-go-libraries>`: When analyzing a Go program, CodeQL does not examine the source code for external packages.
2121
To track the flow of untrusted data through a library, you can create a model of the library.

0 commit comments

Comments
 (0)