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/language/learn-ql/python/introduce-libraries-python.rst
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,8 @@ The QL Python library incorporates a large number of classes, each class corresp
20
20
21
21
- **Syntactic** - classes that represent entities in the Python source code.
22
22
- **Control flow** - classes that represent entities from the control flow graphs.
23
-
- **Data flow** - classes that assist in performing data flow analyses on Python source code.
24
-
- **Type inference** - classes that represent the inferred types of entities in the Python source code.
23
+
- **Type inference** - classes that represent the inferred values and types of entities in the Python source code.
24
+
- **Taint tracking** - classes that represent the source, sinks and kinds of taint used to implement taint-tracking queries.
25
25
26
26
Syntactic classes
27
27
~~~~~~~~~~~~~~~~~
@@ -289,10 +289,6 @@ The classes in the control-flow part of the library are:
289
289
- `ControlFlowNode <https://help.semmle.com/qldoc/python/semmle/python/Flow.qll/type.Flow$ControlFlowNode.html>`__ – A control-flow node. There is a one-to-many relation between AST nodes and control-flow nodes.
290
290
- `BasicBlock <https://help.semmle.com/qldoc/python/semmle/python/Flow.qll/type.Flow$BasicBlock.html>`__ – A non branching list of control-flow nodes.
291
291
292
-
Data flow
293
-
~~~~~~~~~
294
-
295
-
The ``SsaVariable`` class represents `static single assignment form <http://en.wikipedia.org/wiki/Static_single_assignment_form>`__ variables (SSA variables). There is a one-to-many relation between variables and SSA variables. The ``SsaVariable`` class provides an accurate and fast means of tracking data flow from definition to use; the ``SsaVariable`` class is an important element for building data flow analyses, including type inference.
296
292
297
293
Type-inference classes
298
294
----------------------
@@ -322,8 +318,23 @@ Summary
322
318
323
319
These classes are explained in more detail in :doc:`Tutorial: Points-to analysis and type inference <pointsto-type-infer>`.
324
320
321
+
Taint-tracking classes
322
+
----------------------
323
+
324
+
The QL library for Python also supplies classes to specify taint-tracking analyses. The ``Configuration`` class can be overrridden to specify a taint-tracking analysis, by specifying source, sinks, sanitizers adn additional flwo steps. For those analyses that require additional types of taint to be tracked the ``TaintKind`` class can be overridden.
These classes are explained in more detail in :doc:`Tutorial: Taint tracking and data flow analysis in Python <taint-tracking>`.
334
+
335
+
325
336
What next?
326
337
----------
327
338
328
-
- Experiment with the worked examples in the QL for Python tutorial topics: :doc:`Functions <functions>`, :doc:`Statements and expressions <statements-expressions>`, :doc:`Control flow <control-flow>` and :doc:`Points-to analysis and type inference <pointsto-type-infer>`.
339
+
- Experiment with the worked examples in the QL for Python tutorial topics: :doc:`Functions <functions>`, :doc:`Statements and expressions <statements-expressions>`, :doc:`Control flow <control-flow>`, :doc:`Points-to analysis and type inference <pointsto-type-infer>` and :doc:`Taint tracking and data flow analysis in Python <taint-tracking>`.
329
340
- Find out more about QL in the `QL language handbook <https://help.semmle.com/QL/ql-handbook/index.html>`__ and `QL language specification <https://help.semmle.com/QL/QLLanguageSpecification.html>`__.
0 commit comments