Skip to content

Commit 07a25a2

Browse files
committed
Update threat model documentation
1 parent 6443221 commit 07a25a2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/codeql/reusables/threat-model-description.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ A threat model is a named class of dataflow sources that can be enabled or disab
44

55
The ``kind`` property of the ``sourceModel`` determines which threat model a source is associated with. There are two main categories:
66

7-
- ``remote`` which represents requests and responses from the network.
8-
- ``local`` which represents data from local files (``file``), command-line arguments (``commandargs``), database reads (``database``), and environment variables(``environment``).
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").
9+
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+
12+
The less commonly used categories are:
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).
918

1019
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)