Skip to content

cpp: Model BDE Base64 and hex pointer-buffer conversions - #22563

Open
kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:bde-bdlde-conversion-models
Open

kumarak wants to merge 1 commit into
github:mainfrom
trail-of-forks:bde-bdlde-conversion-models

Conversation

@kumarak

@kumarak kumarak commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Adds taint summaries for both convert overloads of BDE bdlde Base64Encoder, Base64Decoder, HexEncoder, and HexDecoder, propagating input bytes to the output buffer. The models match the member templates by signature and use subtypes: false, so hiding methods in derived classes do not inherit the summary.

API evidence: BDE bdlde headers at ec310b87e008199ecbdbc00a0b0264a53d806a0a under Apache 2.0.

Scope is limited to direct pointer-buffer conversion; stateful flows and endConvert are left for follow-up work.

Validation covers all four classes, overloads, const/mutable inputs, inheritance/hiding behavior, and external-model validation.

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

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.

🟢 Approval recommended

The summaries match the referenced API signatures and are comprehensively validated within the stated scope.

Pull request overview

Adds C++ taint summaries for BDE Base64 and hexadecimal pointer-buffer conversions.

Changes:

  • Models both convert overloads across four BDE converter classes.
  • Adds positive, negative, inheritance, and overload coverage.
  • Documents the new analysis support.
File summaries
File Description
cpp/ql/lib/ext/bdlde.model.yml Defines conversion summaries.
cpp/ql/lib/change-notes/2026-09-14-bdlde-conversion-models.md Adds the change note.
cpp/ql/test/library-tests/dataflow/bdlde/bdlde.h Declares test API fixtures.
cpp/ql/test/library-tests/dataflow/bdlde/test.cpp Exercises modeled behavior.
cpp/ql/test/library-tests/dataflow/bdlde/flow.ql Configures taint-flow testing.
cpp/ql/test/library-tests/dataflow/bdlde/flow.expected Records expected test output.
cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected Updates model-validation expectations.
Review details
  • Files reviewed: 6/7 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants