Skip to content

Commit 65db990

Browse files
committed
Remove threat model mentions
1 parent bb86ce5 commit 65db990

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Extensible predicates used to create custom models in C#
5555

5656
The CodeQL library for C# analysis exposes the following extensible predicates:
5757

58-
- ``sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data. The ``kind`` of the sources defined using this predicate determine which threat model they are associated with. Different threat models can be used to customize the sources used in an analysis. For more information, see ":ref:`Threat models <threat-models-csharp>`."
58+
- ``sourceModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model sources of potentially tainted data.
5959
- ``sinkModel(namespace, 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.
6060
- ``summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements.
6161
- ``neutralModel(namespace, 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.
@@ -146,7 +146,7 @@ The sixth value should be left empty and is out of scope for this documentation.
146146
The remaining values are used to define the ``access path``, the ``kind``, and the ``provenance`` (origin) of the source.
147147

148148
- The seventh value ``ReturnValue`` is the access path to the return of the method, which means that it is the return value that should be considered a source of tainted input.
149-
- The eighth value ``remote`` is the kind of the source. The source kind is used to define the threat model where the source is in scope. ``remote`` applies to many of the security related queries as it means a remote source of untrusted data. As an example the SQL injection query uses ``remote`` sources. For more information, see ":ref:`Threat models <threat-models>`."
149+
- The eighth value ``remote`` is the kind of the source. The source kind is used to define the threat model where the source is in scope. ``remote`` applies to many of the security related queries as it means a remote source of untrusted data. As an example the SQL injection query uses ``remote`` sources.
150150
- The ninth value ``manual`` is the provenance of the source, which is used to identify the origin of the source.
151151

152152
Example: Add flow through the ``Concat`` method
@@ -329,19 +329,3 @@ The first four values identify the callable (in this case the getter of the ``No
329329
- The fourth value ``()`` is the method input type signature.
330330
- The fifth value ``summary`` is the kind of the neutral.
331331
- The sixth value ``manual`` is the provenance of the neutral.
332-
333-
.. _threat-models-csharp:
334-
335-
Threat models
336-
-------------
337-
338-
.. include:: ../reusables/beta-note-threat-models-java.rst
339-
340-
A threat model is a named class of dataflow sources that can be enabled or disabled independently. Threat models allow you to control the set of dataflow sources that you want to consider unsafe. For example, one codebase may only consider remote HTTP requests to be tainted, whereas another may also consider data from local files to be unsafe. You can use threat models to ensure that the relevant taint sources are used in a CodeQL analysis.
341-
342-
The ``kind`` property of the ``sourceModel`` determines which threat model a source is associated with. There are two main categories:
343-
344-
- ``remote`` which represents requests and responses from the network.
345-
- ``local`` which represents data from local files (``file``), command-line arguments (``commandargs``), database reads (``database``), and environment variables(``environment``).
346-
347-
When running a CodeQL analysis, the ``remote`` threat model is included by default. You can optionally include other threat models as appropriate when using the CodeQL CLI and in GitHub code scanning. For more information, see `Analyzing your code with CodeQL queries <https://docs.github.com/code-security/codeql-cli/getting-started-with-the-codeql-cli/analyzing-your-code-with-codeql-queries#including-model-packs-to-add-potential-sources-of-tainted-data>`__ and `Customizing your advanced setup for code scanning <https://docs.github.com/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#extending-codeql-coverage-with-threat-models>`__.

0 commit comments

Comments
 (0)