Skip to content

C++: Add flow sources for winreg.h - #22242

Merged
MathiasVP merged 7 commits into
github:mainfrom
MathiasVP:add-reg-flow-sources
Jul 28, 2026
Merged

C++: Add flow sources for winreg.h#22242
MathiasVP merged 7 commits into
github:mainfrom
MathiasVP:add-reg-flow-sources

Conversation

@MathiasVP

Copy link
Copy Markdown
Contributor

Pretty simple stuff: I noticed that we don't model flow sources for various windows registry reads from winreg.h.

There's a TODO we can't resolve until Tom gets back from so we can get #22145 merged, after which I can finish my PR which adds support for access paths at sources in MaD.

@MathiasVP
MathiasVP marked this pull request as ready for review July 28, 2026 12:29
@MathiasVP
MathiasVP requested a review from a team as a code ownerJuly 28, 2026 12:29
CopilotAI review requested due to automatic review settings July 28, 2026 12:29

CopilotAI 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++ data-flow source models for Windows Registry query APIs.

Changes:

  • Models six ANSI/Wide registry query functions.
  • Adds source and dereference-flow tests.
  • Updates generated test expectations.
Show a summary per file
FileDescription
cpp/ql/lib/ext/Windows.model.ymlAdds registry source models.
cpp/ql/test/library-tests/dataflow/external-models/windows.cppAdds registry query tests.
cpp/ql/test/library-tests/dataflow/external-models/sources.expectedUpdates source expectations.
cpp/ql/test/library-tests/dataflow/external-models/flow.expectedUpdates flow expectations.

Review details

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment threadcpp/ql/lib/ext/Windows.model.yml

@jketemajketema 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.

LGTM if DCA is happy.

@MathiasVP

Copy link
Copy Markdown
ContributorAuthor

4 new results that look genuine 🎉 Merging!

@MathiasVP
MathiasVP merged commit 478878c into github:mainJul 28, 2026
16 checks passed
Sign up for freeto 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.

3 participants

@MathiasVP@jketema