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/codeql/reusables/threat-model-description.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ A threat model is a named class of dataflow sources that can be enabled or disab
5
5
The ``kind`` property of the ``sourceModel`` determines which threat model a source is associated with. There are two main categories:
6
6
7
7
- ``remote`` which represents requests (``request``) and responses (``response``) from the network.
8
-
- ``local`` which represents data from local files (``file``), command-line arguments (``commandargs``), database reads (``database``), environment variables(``environment``) and Windows registry values ("windows-registry").
8
+
- ``local`` which represents data from local files (``file``), command-line arguments (``commandargs``), database reads (``database``), environment variables(``environment``) and Windows registry values ("windows-registry"). Currently, Windows registry values are used by C# only.
9
9
10
10
Note that subcategories can be turned included or excluded separately, so you can specify ``local`` without ``database``, or just ``commandargs`` and ``environment`` without the rest of ``local``.
11
11
12
12
The less commonly used categories are:
13
13
14
-
- ``android`` which represents reads from external files in Android (``android-external-storage-dir``) and parameter of an entry-point method declared in a ``ContentProvider`` class (``contentprovider``).
15
-
- ``database-access-result`` which represents a database access (currently only used by javascript).
16
-
- ``file-write`` which represents opening a file in write mode (currently only used in C#).
17
-
- ``reverse-dns`` which represents reverse DNS lookups (currently only used in java).
14
+
- ``android`` which represents reads from external files in Android (``android-external-storage-dir``) and parameter of an entry-point method declared in a ``ContentProvider`` class (``contentprovider``). Currently only used by Java/Kotlin.
15
+
- ``database-access-result`` which represents a database access. Currently only used by JavaScript.
16
+
- ``file-write`` which represents opening a file in write mode. Currently only used in C#.
17
+
- ``reverse-dns`` which represents reverse DNS lookups. Currently only used in Java.
18
18
19
19
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