Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

C++: mass enable diff-informed data flow#19663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
d10c wants to merge2 commits intogithub:main
base:main
Choose a base branch
Loading
fromd10c:d10c/cpp/diff-informed

Conversation

d10c
Copy link
Contributor

@d10cd10c commentedJun 3, 2025

An auto-generated patch that enables diff-informed data flow in the obvious cases.

Builds on#18342 andhttps://github.com/github/codeql-patch/pull/88

An auto-generated patch that enables diff-informed data flow in the obvious cases.Builds ongithub#18342 andgithub/codeql-patch#88
@d10cd10c marked this pull request as ready for reviewJune 4, 2025 11:39
@CopilotCopilotAI review requested due to automatic review settingsJune 4, 2025 11:39
@d10cd10c requested a review froma team as acode ownerJune 4, 2025 11:39
Copy link
Contributor

@CopilotCopilotAI 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

Enables diff-informed data flow analysis by injecting anobserveDiffInformedIncrementalMode stub into multiple DataFlow and TaintTracking configurations.

  • Adds a stub predicateobserveDiffInformedIncrementalMode() { any() } to enable diff-informed incremental analysis.
  • Applies across various security checks (CWE rules) and likely-bugs modules.
  • Prepares QL libraries for improved incremental performance on code changes.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-611/XXE.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qllAdded stubobserveDiffInformedIncrementalMode
cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.qlAdded stubobserveDiffInformedIncrementalMode
cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qllAdded stubobserveDiffInformedIncrementalMode
Comments suppressed due to low confidence (2)

cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql:34

  • [nitpick] Add a brief comment above this predicate explaining its role in enabling diff-informed incremental analysis to help future maintainers understand its purpose.
predicate observeDiffInformedIncrementalMode() { any() }

cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql:34

  • No tests were added to verify that diff-informed data flow actually takes effect. Consider adding regression tests for one or two representative modules to validate this new mode behaves as expected.
predicate observeDiffInformedIncrementalMode() { any() }

@d10cd10c marked this pull request as draftJune 5, 2025 16:03
@d10c
Copy link
ContributorAuthor

d10c commentedJun 5, 2025

It turns out that some of the generated changes in the PRs were not correct, e.g. because they should have also generated agetASelected{Source,Sink}Location() override but didn't (see Chuan-kai's comment here). So for now I'm putting them back in Draft until I make sure (via the patch script) that we are correctly handling all 3documented query patterns, starting with the simplest one (both source and sink are used as location sources). Thanks for the review and stay tuned for an update as to what has changed in the meantime!

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

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@d10c

[8]ページ先頭

©2009-2025 Movatter.jp