Skip to content

Commit dafed6b

Browse files
committed
Python docs: remove confusing reference to SSA as 'dataflow' and add a reference to the taint-tracking library from the library overview page.
1 parent 562f4ef commit dafed6b

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

docs/language/learn-ql/python/introduce-libraries-python.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ The QL Python library incorporates a large number of classes, each class corresp
2020

2121
- **Syntactic** - classes that represent entities in the Python source code.
2222
- **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.
2525

2626
Syntactic classes
2727
~~~~~~~~~~~~~~~~~
@@ -289,10 +289,6 @@ The classes in the control-flow part of the library are:
289289
- `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.
290290
- `BasicBlock <https://help.semmle.com/qldoc/python/semmle/python/Flow.qll/type.Flow$BasicBlock.html>`__ – A non branching list of control-flow nodes.
291291

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

297293
Type-inference classes
298294
----------------------
@@ -322,8 +318,23 @@ Summary
322318

323319
These classes are explained in more detail in :doc:`Tutorial: Points-to analysis and type inference <pointsto-type-infer>`.
324320

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.
325+
326+
327+
Summary
328+
~~~~~~~
329+
330+
- `TaintKind <https://help.semmle.com/qldoc/python/semmle/python/security/TaintTracking.qll/type.TaintTracking$TaintKind.html>`__
331+
- `Configuration <https://help.semmle.com/qldoc/python/semmle/python/security/TaintTracking.qll/type.TaintTracking$TaintTracking$Configuration.html>`__
332+
333+
These classes are explained in more detail in :doc:`Tutorial: Taint tracking and data flow analysis in Python <taint-tracking>`.
334+
335+
325336
What next?
326337
----------
327338

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

Comments
 (0)