-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: mass-enable diff-informed queries phase 2 - getASelected{Source,Sink}Location() { none() }
#19759
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
fa3a2b0
to
41cf298
Compare
There was a problem hiding this 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 incremental mode by adding a required stub predicate across data-flow and taint-tracking configurations, and overrides the source-location selection for one query.
- Mass-add
predicate observeDiffInformedIncrementalMode() { any() }
to various modules - Add
getASelectedSourceLocation(DataFlow::Node) { none() }
override in WordexpTainted
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql | Added observeDiffInformedIncrementalMode stub and source-location override |
cpp/ql/src/Security/CWE/CWE-611/XXE.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll | Added stub observeDiffInformedIncrementalMode |
cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql | Added stub observeDiffInformedIncrementalMode |
cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll | Added stub observeDiffInformedIncrementalMode |
Comments suppressed due to low confidence (1)
cpp/ql/src/experimental/Security/CWE/CWE-190/AllocMultiplicationOverflow.ql:34
- No tests have been added to validate diff-informed incremental mode. Consider adding unit tests or query tests to ensure observeDiffInformedIncrementalMode() stubs behave as expected.
predicate observeDiffInformedIncrementalMode() { any() }
@@ -30,6 +30,8 @@ module MultToAllocConfig implements DataFlow::ConfigSig { | |||
// something that affects an allocation size | |||
node.asExpr() = any(HeuristicAllocationExpr ae).getSizeExpr().getAChild*() | |||
} | |||
|
|||
predicate observeDiffInformedIncrementalMode() { any() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The identical stub predicate observeDiffInformedIncrementalMode() is added across many modules. Consider defining a default implementation or mixin to reduce duplication and ease future updates.
predicate observeDiffInformedIncrementalMode() { any() } | |
import CommonConfig |
Copilot uses AI. Check for mistakes.
41cf298
to
2316b8c
Compare
Stacks on top of earlier PR: #19659
Uses patch from: https://github.com/github/codeql-patch/pull/88/commits/ec5681e740c18c792443099fb3e413446616a0ee
Adds
getASelected{Source,Sink}Location() { none() }
override to a query that selects a dataflow source or sink as a location, but not both.