Update references and remove unwanted reusable

This commit is contained in:
Felicity Chapman
2024-08-12 12:08:44 +01:00
parent 36e32f43ef
commit f0bc55e8d7
3 changed files with 3 additions and 9 deletions

View File

@@ -1,7 +1,5 @@
.. _advanced-dataflow-scenarios-cpp:
.. include:: ../reusables/cpp-new-dataflow-api-note.rst
Advanced dataflow scenarios for C/C++
======================================
@@ -102,7 +100,7 @@ This data flow is simple to match because the CodeQL database contains the infor
Flow from a qualifier to a field access
---------------------------------------
Sometimes field accesses are not visible to CodeQL (for example, because the implementation of the function isn't included in the database), and so dataflow cannot match up all stores with reads. This leads to missing (false negative) results.
Sometimes field accesses are not visible to CodeQL (for example, because the implementation of the function isn't included in the database), and so dataflow cannot match up all stores with reads. This leads to missing (false negative) results.
For example, consider an alternative setup where our source of data starts as the outgoing argument of a function ``write_user_input_to``. We can model this setup in the dataflow library using the following ``isSource``:
@@ -456,4 +454,4 @@ The ``allowImplicitRead`` predicate specifies that if we're at a node that satis
3. The data flowing to the indirection of ``&b`` (i.e., the object ``b``).
4. An implicit read of the field ``x`` followed by an implicit read of the field ``a`` at the sink.
Thus, we end up at a node that satisfies ``isSink`` with an empty access path, and successfully track the full dataflow path.
Thus, we end up at a node that satisfies ``isSink`` with an empty access path, and successfully track the full dataflow path.

View File

@@ -14,7 +14,6 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
expressions-types-and-statements-in-cpp
conversions-and-classes-in-cpp
analyzing-data-flow-in-cpp
analyzing-data-flow-in-cpp-new
refining-a-query-to-account-for-edge-cases
detecting-a-potential-buffer-overflow
using-the-guards-library-in-cpp
@@ -35,7 +34,7 @@ Experiment and learn how to write effective and efficient queries for CodeQL dat
- :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.
- :doc:`Analyzing data flow in C and C++ <analyzing-data-flow-in-cpp-new>`: You can use data flow analysis to track the flow of potentially malicious or insecure data that can cause vulnerabilities in your codebase. For information about converting queries from the legacy workflow, see `New dataflow API for CodeQL query writing <https://gh.io/codeql-new-dataflow-api>`__.
- :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. For information about converting queries from the legacy workflow, see `New dataflow API for CodeQL query writing <https://gh.io/codeql-new-dataflow-api>`__.
- :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.

View File

@@ -1,3 +0,0 @@
.. pull-quote:: Note
The data flow library described here is available from CodeQL 2.12.5 onwards. With the release of CodeQL 2.13.0 the library uses the new modular API for data flow. For information on the previous version of the library, see :ref:`Analyzing data flow in C and C++ <analyzing-data-flow-in-cpp>` and for information about the new modular API and how to migrate any existing queries to the updated data flow library, see `New dataflow API for CodeQL query writing <https://gh.io/codeql-new-dataflow-api>`__.