Skip to content

Commit 7fab0b6

Browse files
committed
List extensible predicates for barriers and barrier guards
1 parent 8ab0a5b commit 7fab0b6

7 files changed

+14
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ The CodeQL library for CPP analysis exposes the following extensible predicates:
5858
- ``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-cpp>`."
5959
- ``sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data may be 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.
61+
- ``barrierModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model barriers, which are elements that stop the flow of taint.
62+
- ``barrierGuardModel(namespace, type, boolean subtypes, name, signature, ext, input, acceptingvalue, kind, provenance)``. This is used to model barrier guards, which are elements that can stop the flow of taint depending on a conditional check.
6163

6264
The extensible predicates are populated using the models defined in data extension files.
6365

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ The CodeQL library for C# analysis exposes the following extensible predicates:
5858
- ``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>`."
5959
- ``sinkModel(namespace, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data may be 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.
61+
- ``barrierModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model barriers, which are elements that stop the flow of taint.
62+
- ``barrierGuardModel(namespace, type, boolean subtypes, name, signature, ext, input, acceptingvalue, kind, provenance)``. This is used to model barrier guards, which are elements that can stop the flow of taint depending on a conditional check.
6163
- ``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. Manual neutral models (those with a provenance such as ``manual`` or ``ai-manual``) can be used to override generated summary models (those with a provenance such as ``df-generated``), so that the summary model will be ignored. Other than that, neutral models have no effect.
6264

6365
The extensible predicates are populated using the models defined in data extension files.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ The CodeQL library for Go analysis exposes the following extensible predicates:
5858
- ``sourceModel(package, 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-go>`."
5959
- ``sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance)``. This is used to model sinks where tainted data may be used in a way that makes the code vulnerable.
6060
- ``summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements.
61+
- ``barrierModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model barriers, which are elements that stop the flow of taint.
62+
- ``barrierGuardModel(namespace, type, boolean subtypes, name, signature, ext, input, acceptingvalue, kind, provenance)``. This is used to model barrier guards, which are elements that can stop the flow of taint depending on a conditional check.
6163
- ``neutralModel(package, 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. Manual neutral models (those with a provenance such as ``manual`` or ``ai-manual``) can be used to override generated summary models (those with a provenance such as ``df-generated``), so that the summary model will be ignored. Other than that, neutral models have no effect.
6264

6365
The extensible predicates are populated using the models defined in data extension files.

docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ The CodeQL library for Java and Kotlin analysis exposes the following extensible
6363
- ``sourceModel(package, 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-java>`."
6464
- ``sinkModel(package, 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.
6565
- ``summaryModel(package, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements.
66+
- ``barrierModel(namespace, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model barriers, which are elements that stop the flow of taint.
67+
- ``barrierGuardModel(namespace, type, boolean subtypes, name, signature, ext, input, acceptingvalue, kind, provenance)``. This is used to model barrier guards, which are elements that can stop the flow of taint depending on a conditional check.
6668
- ``neutralModel(package, 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. Manual neutral models (those with a provenance such as ``manual`` or ``ai-manual``) override generated summary models (those with a provenance such as ``df-generated``) so that the summary will be ignored. Other than that, neutral models have a slight impact on the dataflow dispatch logic, which is out of scope for this documentation.
6769

6870
The extensible predicates are populated using the models defined in data extension files.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The CodeQL library for JavaScript exposes the following extensible predicates:
2626
- **sinkModel**\(type, path, kind)
2727
- **typeModel**\(type1, type2, path)
2828
- **summaryModel**\(type, path, input, output, kind)
29+
- **barrierModel**\(type, path, kind)
30+
- **barrierGuardModel**\(type, path, branch, kind)
2931

3032
We'll explain how to use these using a few examples, and provide some reference material at the end of this article.
3133

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The CodeQL library for Python exposes the following extensible predicates:
2626
- **sinkModel**\(type, path, kind)
2727
- **typeModel**\(type1, type2, path)
2828
- **summaryModel**\(type, path, input, output, kind)
29+
- **barrierModel**\(type, path, kind)
30+
- **barrierGuardModel**\(type, path, branch, kind)
2931

3032
We'll explain how to use these using a few examples, and provide some reference material at the end of this article.
3133

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The CodeQL library for Ruby exposes the following extensible predicates:
2727
- **sinkModel**\(type, path, kind)
2828
- **typeModel**\(type1, type2, path)
2929
- **summaryModel**\(type, path, input, output, kind)
30+
- **barrierModel**\(type, path, kind)
31+
- **barrierGuardModel**\(type, path, branch, kind)
3032

3133
We'll explain how to use these using a few examples, and provide some reference material at the end of this article.
3234

0 commit comments

Comments
 (0)