Skip to content

cpp: model BDE bslx in-stream deserialization taint flow - #22453

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

cpp: model BDE bslx in-stream deserialization taint flow#22453
kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:kumarak/cpp-bde-bslx-models

Conversation

@kumarak

@kumarak kumarak commented Aug 27, 2026

Copy link
Copy Markdown

Add flow summaries for the BDE byte-stream deserializers in BloombergLP::bslx:

  • ByteInStream and GenericInStream: constructing (or, for ByteInStream, resetting) from a buffer/streambuf taints the stream, and every get* method propagates that taint into its output variable. get* returns *this, so a fluent row keeps chained calls tainted.
  • InStreamFunctions::bdexStreamIn: the generic BDEX entry point that populates any bdex-compatible object from a stream, modeled as stream -> object.

Not a duplicate of the bsl.* container models or the std/bsl QL models, which cover only the bsl standard-library-alike types; the bslx BDE namespace had no coverage.

Add flow summaries for the BDE byte-stream deserializers in
BloombergLP::bslx:

- ByteInStream and GenericInStream<STREAMBUF>: constructing (or, for
  ByteInStream, reset-ing) from a buffer/streambuf taints the stream,
  and every get* method propagates that taint into its output variable.
  get* returns *this, so a fluent row keeps chained calls tainted.
- InStreamFunctions::bdexStreamIn: the generic BDEX entry point that
  populates any bdex-compatible object from a stream, modeled as
  stream -> object.

Not a duplicate of the bsl.* container models or the std/bsl QL models,
which cover only the bsl standard-library-alike types; the bslx BDE
namespace had no coverage. Verified with a BloombergLP::bslx-shaped stub
in the dataflow external-models harness.
@kumarak
kumarak requested a review from a team as a code owner August 27, 2026 16:59
Copilot AI balanced review requested due to automatic review settings August 27, 2026 16:59

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.

Pull request overview

Adds C++ taint-flow models for Bloomberg BDE bslx deserialization.

Changes:

  • Models ByteInStream, GenericInStream, and bdexStreamIn.
  • Covers scalar, string, array, reset, and fluent-call flows.
  • Adds comprehensive external-model tests and release notes.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
cpp/ql/lib/ext/bslx.model.yml Defines the new flow summaries.
cpp/ql/test/library-tests/dataflow/external-models/bslx.cpp Exercises modeled APIs and chaining.
cpp/ql/test/library-tests/dataflow/external-models/flow.expected Updates generated flow expectations.
cpp/ql/test/library-tests/dataflow/external-models/steps.expected Updates generated summary-step expectations.
cpp/ql/lib/change-notes/2026-08-27-bslx-models.md Documents the analysis improvement.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants