Merge branch next and update CodeQL to v2.23.9 - #1154
Open
mbaluda wants to merge 116 commits into
Open
Conversation
Observe that `sizeof(...)` might not occur as a dataflow node if it has a parent node with a concrete value. That value will be a dataflow node instead. Hence, the query has be changed to check for expressions where `sizeof(...)` is a child of an expression with a concrete value.
Note that we now properly report the offending cast instead of the expression that is being cast.
As it is the dataflow used by `asctime` that is relevant, and not the pointer, use the indirect expression.
These use the new dataflow library
Since the new dataflow library uses use-use dataflow and not def-use dataflow, we now need to check for definitions. Note that these queries can probably be improved by using a dataflow configuration - possibly limited to the local context of a function by including `DataFlow::FeatureEqualSourceSinkCallContext`
…ataflow library" This reverts commit b18c7b4. This change broke some tests.
|
🏁 Beep Boop! One or things failed during performance testing. Please check the release engineering repo for details. |
mbaluda
force-pushed
the
mbaluda-next-merge
branch
from
August 17, 2026 10:20
b5970a4 to
d66ec8d
Compare
Co-authored-by: mbaluda <5237080+mbaluda@users.noreply.github.com>
Collaborator
|
/test-performance |
|
🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades
codeql/cpp-alland related CodeQL dependencies, migrating queries and shared libraries off the deprecatedsemmle.code.cpp.dataflow.DataFlow/TaintTrackingmodules andcodingstandards.cpp.Concurrencyonto theirnew/ConcurrencyNewreplacements. This is a mechanical, repo-wide migration touching ~90 rules; most changes are import swaps only, with dataflow-node API updates (asIndirectExpr(),asDefiningArgument(),isBarrierIn, etc.) where required by the new library.Four regressions were found and fixed, with matching test coverage:
RULE-1-2: false negative for_Decimal32/_Decimal64/_Decimal128compiler-extension detection.ENV30-C/RULE-21-19/RULE-25-5-2(ConstLikeReturnValueshared query): duplicate alert on the same pointer write.INT31-C: false positive on the standard-permitted(time_t)-1conversion.RULE-14-3: false negative where an always-false compound loop condition (e.g.1 == 0 && p1 > 12) was incorrectly treated as a permitted literal-0exception.Modified rules:
RULE-1-2,ENV30-C,RULE-21-19,RULE-25-5-2,INT31-C,RULE-14-3ARR39-C,CON30-C,CON34-C,EXP16-C,EXP37-C,FIO44-C,MSC33-C,RULE-17-5,RULE-21-14,A15-2-2,A20-8-4,A5-1-7,M9-3-1,CTR55-CPP,MEM52-CPP.These updates include changes from the
nextbranch to maintain compatibility with the evolving CodeQL ecosystem.Change request type
.ql,.qll,.qlsor unit tests)Rules with added or modified queries
Release change checklist
A change note (development_handbook.md#change-notes) is required for any pull request which modifies:
If you are only adding new rule queries, a change note is not required.
Author: Is a change note required?
🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.
Reviewer: Confirm that either a change note is not required or the change note is required and has been added.
Query development review checklist
For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:
Author
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
Reviewer
As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.