-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: Diff-informed queries: phase 3 (non-trivial locations) #20073
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
…bably need to add MaD source)
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
This PR enables diff-informed mode on C++ security queries that select locations other than dataflow source or sink. The changes add location override predicates to allow these queries to work with diff-informed analysis, which is part of the final phase of mass-enabling diff-informed queries across all languages.
Key changes include:
- Addition of
observeDiffInformedIncrementalMode()
predicates to enable diff-informed mode - Implementation of
getASelectedSourceLocation()
andgetASelectedSinkLocation()
predicates to specify relevant locations - Creation of test files for CWE-020 (External API) and CWE-313 (Cleartext SQLite Database) queries
Reviewed Changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated no comments.
File | Description |
---|---|
Multiple security query files | Added diff-informed mode configuration with location override predicates |
CleartextSqliteDatabase test files | Added comprehensive test case with SQLite security vulnerabilities |
ExternalAPI test files | Added test infrastructure for external API queries |
ExternalAPIsSpecific.qll files | Disabled diff-informed mode for library code used by multiple queries |
This PR enables diff-informed mode on queries that select a location other than dataflow source or sink. This entails adding a non-trivial location override that returns the locations that are actually selected.
Prior work includes PRs like #19663, #19759, and #19817. This PR uses the same patch script as those PRs to find candidate queries to convert to diff-enabled. This is the final step in mass-enabling diff-informed queries on all the languages.
Commit-by-commit reviewing is recommended.
Potentially tricky cases: