Skip to content

cpp: Model BlazingMQ bmqa message and property taint flow - #22538

Open
kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:kumarak/cpp-bmqa-models
Open

cpp: Model BlazingMQ bmqa message and property taint flow#22538
kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:kumarak/cpp-bmqa-models

Conversation

@kumarak

@kumarak kumarak commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds flow summaries for BlazingMQ public bmqa C++ client API, covering message payloads, properties, iterators, and message events. This allows taint from incoming messages and properties to continue through the corresponding accessors and copy operations.

Scalar property getters are deliberately not modeled, consistent with the treatment of scalar integer outputs, as documented by no-flow tests.

@kumarak
kumarak requested a review from a team as a code owner September 9, 2026 22:38
Copilot AI balanced review requested due to automatic review settings September 9, 2026 22:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Property setter summaries currently lose taint carried by property names before iterator access.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds BlazingMQ bmqa taint-flow summaries for messages, payloads, properties, iterators, and events.

Changes:

  • Models payload and property propagation through accessors, setters, copies, and serialization.
  • Adds comprehensive external-model flow tests, including deliberate scalar no-flow cases.
  • Adds a minor-analysis change note.
File summaries
File Description
cpp/ql/lib/ext/bmqa.model.yml Defines BlazingMQ flow summaries.
cpp/ql/lib/change-notes/2026-09-09-bmqa-models.md Documents the new models.
cpp/ql/test/library-tests/dataflow/external-models/bmqa.cpp Adds model test cases.
cpp/ql/test/library-tests/dataflow/external-models/flow.expected Updates expected flow results.
cpp/ql/test/library-tests/dataflow/external-models/steps.expected Updates expected summary steps.
cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected Updates model validation output.
cpp/ql/test/library-tests/dataflow/taint-tests/test_mad-signatures.expected Updates recognized signatures.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +24 to +25
- ["BloombergLP::bmqa", "MessageProperties", true, "setPropertyAsString", "", "", "Argument[1]", "Argument[-1]", "taint", "manual"]
- ["BloombergLP::bmqa", "MessageProperties", true, "setPropertyAsBinary", "", "", "Argument[1]", "Argument[-1]", "taint", "manual"]
Add flow summaries for BloombergLP::bmqa: Message payload and
properties, MessageProperties getters/setters, the property iterator,
and the MessageEvent -> MessageIterator -> Message chain. Scalar
property getters are deliberately not modelled.
@kumarak
kumarak force-pushed the kumarak/cpp-bmqa-models branch from 7edbdbf to d3a53bd Compare September 9, 2026 23:04
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