Skip to content

Document models-as-data barriers and barrier guards and add change notes#21523

Open
owen-mc wants to merge 8 commits intogithub:mainfrom
owen-mc:docs/mad/barriers
Open

Document models-as-data barriers and barrier guards and add change notes#21523
owen-mc wants to merge 8 commits intogithub:mainfrom
owen-mc:docs/mad/barriers

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Mar 20, 2026

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.

@github-actions github-actions bot added C# JS C++ Java Python Go Ruby Rust Pull requests that update Rust code labels Mar 20, 2026
@owen-mc owen-mc marked this pull request as ready for review March 24, 2026 10:31
@owen-mc owen-mc requested a review from a team as a code owner March 24, 2026 10:31
Copilot AI review requested due to automatic review settings March 24, 2026 10:31
@owen-mc owen-mc requested review from a team as code owners March 24, 2026 10:31
@owen-mc owen-mc changed the title Document MaD barriers and barrier guards and add change notes Document models-as-data barriers and barrier guards and add change notes Mar 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / barrierGuardModel extensibles 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/>`__.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* 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/).

Copilot uses AI. Check for mistakes.
---
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/>`__.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* 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/).

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +67
- ``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.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- ``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.

Copilot uses AI. Check for mistakes.
- ``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.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- ``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.

Copilot uses AI. Check for mistakes.
---
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/>`__.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* 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/).

Copilot uses AI. Check for mistakes.
---
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/>`__.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* 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/).

Copilot uses AI. Check for mistakes.
---
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/>`__.
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
* 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/).

Copilot uses AI. Check for mistakes.
owen-mc and others added 2 commits March 24, 2026 11:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@owen-mc owen-mc force-pushed the docs/mad/barriers branch from 3ab2153 to 052b41a Compare March 24, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants