Document models-as-data barriers and barrier guards and add change notes#21523
Document models-as-data barriers and barrier guards and add change notes#21523owen-mc wants to merge 8 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds documentation and release notes describing how to model Models-as-Data (MaD) data-flow barriers and barrier guards across multiple CodeQL language libraries.
Changes:
- Added per-language change notes announcing support for MaD barriers/barrier guards in data extensions.
- Updated multiple “Customizing library models …” guides to list
barrierModel/barrierGuardModelextensibles and provide examples. - Added new barrier/barrier-guard example sections in several language guides (for example, Java/Go/Python/Ruby/JavaScript/C#/C++).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| rust/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds Rust library change note announcing barrier/barrier-guard support. |
| ruby/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds Ruby library change note with a link to the Ruby modeling guide. |
| python/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds Python library change note with a link to the Python modeling guide. |
| javascript/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds JavaScript library change note with a link to the JavaScript modeling guide. |
| java/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds Java library change note with a link to the Java/Kotlin modeling guide. |
| go/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds Go library change note with a link to the Go modeling guide. |
| csharp/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds C# library change note with a link to the C# modeling guide. |
| cpp/ql/lib/change-notes/2026-03-20-data-extensions-barriers.md | Adds C/C++ library change note with a link to the C/C++ modeling guide. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-ruby.rst | Documents Ruby barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst | Documents Python barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-javascript.rst | Documents JavaScript barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-java-and-kotlin.rst | Documents Java/Kotlin barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-go.rst | Documents Go barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-csharp.rst | Documents C# barrierModel / barrierGuardModel and adds examples. |
| docs/codeql/codeql-language-guides/customizing-library-models-for-cpp.rst | Documents C/C++ barrierModel / barrierGuardModel and adds examples. |
| --- | ||
| category: feature | ||
| --- | ||
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for C# <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-csharp/>`__. |
There was a problem hiding this comment.
This is a Markdown change note, but the “Title <url>__” construct is reStructuredText and is currently wrapped in backticks, so it will render as inline code (not as a link). Please switch to a Markdown link format so the docs URL renders correctly.
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for C# <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-csharp/>`__. | |
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for C#](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-csharp/). |
docs/codeql/codeql-language-guides/customizing-library-models-for-python.rst
Outdated
Show resolved
Hide resolved
docs/codeql/codeql-language-guides/customizing-library-models-for-go.rst
Outdated
Show resolved
Hide resolved
docs/codeql/codeql-language-guides/customizing-library-models-for-cpp.rst
Outdated
Show resolved
Hide resolved
| --- | ||
| category: feature | ||
| --- | ||
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Python <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-python/>`__. |
There was a problem hiding this comment.
This is a Markdown change note, but the “Title <url>__” construct is reStructuredText and is currently wrapped in backticks, so it will render as inline code (not as a link). Please switch to a Markdown link format so the docs URL renders correctly.
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Python <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-python/>`__. | |
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for Python](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-python/). |
| - ``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. | ||
| - ``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. |
There was a problem hiding this comment.
These signatures use namespace for the first parameter and boolean subtypes for the third, but the Java/Kotlin MaD extensible predicates use package as the first column and the third column is named subtypes (a boolean flag), consistent with sourceModel/sinkModel/summaryModel. Please align the parameter names here to avoid misleading readers.
| - ``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. | |
| - ``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. | |
| - ``barrierModel(package, type, subtypes, name, signature, ext, output, kind, provenance)``. This is used to model barriers, which are elements that stop the flow of taint. | |
| - ``barrierGuardModel(package, type, 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. |
| - ``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. | ||
| - ``summaryModel(namespace, type, subtypes, name, signature, ext, input, output, kind, provenance)``. This is used to model flow through elements. | ||
| - ``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. | ||
| - ``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. |
There was a problem hiding this comment.
In the predicate signature list, the third parameter is named subtypes elsewhere (and described as a boolean flag in examples). Using boolean subtypes here is inconsistent and reads like a typo; consider keeping the parameter name subtypes for consistency with the other signatures.
| - ``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. | |
| - ``barrierGuardModel(namespace, type, 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. |
| --- | ||
| category: feature | ||
| --- | ||
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Ruby <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-ruby/>`__. |
There was a problem hiding this comment.
This is a Markdown change note, but the “Title <url>__” construct is reStructuredText and is currently wrapped in backticks, so it will render as inline code (not as a link). Please switch to a Markdown link format so the docs URL renders correctly.
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Ruby <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-ruby/>`__. | |
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for Ruby](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-ruby/). |
| --- | ||
| category: feature | ||
| --- | ||
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Java and Kotlin <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-java-and-kotlin/>`__. |
There was a problem hiding this comment.
This is a Markdown change note, but the “Title <url>__” construct is reStructuredText and is currently wrapped in backticks, so it will render as inline code (not as a link). Please switch to a Markdown link format so the docs URL renders correctly.
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Java and Kotlin <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-java-and-kotlin/>`__. | |
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for Java and Kotlin](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-java-and-kotlin/). |
| --- | ||
| category: feature | ||
| --- | ||
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Go <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-go/>`__. |
There was a problem hiding this comment.
This is a Markdown change note, but the “Title <url>__” construct is reStructuredText and is currently wrapped in backticks, so it will render as inline code (not as a link). Please switch to a Markdown link format so the docs URL renders correctly.
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see `Customizing library models for Go <https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-go/>`__. | |
| * Data flow barriers and barrier guards can now be added using data extensions. For more information see [Customizing library models for Go](https://codeql.github.com/docs/codeql-language-guides/customizing-library-models-for-go/). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
3ab2153 to
052b41a
Compare
Note that there isn't yet a docs page called "Customizing library models for Rust" for me to add examples of models-as-data barriers or barrier guards to.
Models-as-data sanitizers haven't been added for actions because it doesn't have any barriers and for swift because doesn't have any models-as-data.