CodeQL 2.21.2 (2025-05-01)¶
This is an overview of changes in the CodeQL CLI and relevant CodeQL query and library packs. For additional updates on changes to the CodeQL code scanning experience, check out the code scanning section on the GitHub blog, relevant GitHub Changelog updates, changes in the CodeQL extension for Visual Studio Code, and the CodeQL Action changelog.
Security Coverage¶
CodeQL 2.21.2 runs a total of 452 security queries when configured with the Default suite (covering 168 CWE). The Extended suite enables an additional 136 queries (covering 35 more CWE).
CodeQL CLI¶
Bug Fixes¶
codeql generate log-summarynow correctly includesdependenciesmaps in predicate events forCOMPUTED_EXTENSIONALpredicates.
Query Packs¶
Bug Fixes¶
GitHub Actions¶
Assigned a
security-severityto the queryactions/excessive-secrets-exposure.
Breaking Changes¶
GitHub Actions¶
The following queries have been removed from the
security-and-qualitysuite. They are not intended to produce user-facing alerts describing vulnerabilities. Any existing alerts for these queries will be closed automatically.actions/composite-action-sinksactions/composite-action-sourcesactions/composite-action-summariesactions/reusable-workflow-sinks(renamed fromactions/reusable-wokflow-sinks)actions/reusable-workflow-sourcesactions/reusable-workflow-summaries
Minor Analysis Improvements¶
C#¶
Changes to the MaD model generation infrastructure:
Changed the query
cs/utils/modelgenerator/summary-modelsto use the implementation fromcs/utils/modelgenerator/mixed-summary-models.Removed the now-redundant
cs/utils/modelgenerator/mixed-summary-modelsquery.A similar replacement was made for
cs/utils/modelgenerator/neutral-models. That is, ifGenerateFlowModel.pyis provided with--with-summaries, combined/mixed models are now generated instead of heuristic models (and similar for--with-neutrals).
Improved detection of authorization checks in the
cs/web/missing-function-level-access-controlquery. The query now recognizes authorization attributes inherited from base classes and interfaces.The precision of the query
cs/invalid-string-formattinghas been improved. More methods and more overloads of existing format like methods are taken into account by the query.
Java/Kotlin¶
Changes to the MaD model generation infrastructure:
Changed the query
java/utils/modelgenerator/summary-modelsto use the implementation fromjava/utils/modelgenerator/mixed-summary-models.Removed the now-redundant
java/utils/modelgenerator/mixed-summary-modelsquery.A similar replacement was made for
java/utils/modelgenerator/neutral-models. That is, ifGenerateFlowModel.pyis provided with--with-summaries, combined/mixed models are now generated instead of heuristic models (and similar for--with-neutrals).
Rust¶
Changes to the MaD model generation infrastructure:
Changed the query
rust/utils/modelgenerator/summary-modelsto use the implementation fromrust/utils/modelgenerator/mixed-summary-models.Removed the now-redundant
rust/utils/modelgenerator/mixed-summary-modelsquery.A similar replacement was made for
rust/utils/modelgenerator/neutral-models. That is, ifGenerateFlowModel.pyis provided with--with-summaries, combined/mixed models are now generated instead of heuristic models (and similar for--with-neutrals).
Language Libraries¶
Major Analysis Improvements¶
Swift¶
Upgraded to allow analysis of Swift 6.1.
Minor Analysis Improvements¶
C#¶
Improved autobuilder logic for detecting whether a project references a SDK (and should be built using
dotnet).
Swift¶
Added AST nodes
ActorIsolationErasureExpr,CurrentContextIsolationExpr,ExtractFunctionIsolationExprandUnreachableExprthat correspond to new nodes added by Swift 6.0.
New Features¶
C/C++¶
New classes
TypeofType,TypeofExprType, andTypeofTypeTypewere introduced, which represent the C23typeofandtypeof_unqualoperators. TheTypeofExprTypeclass represents the variant taking an expression as its argument. TheTypeofTypeTypeclass represents the variant taking a type as its argument.A new class
IntrinsicTransformedTypewas introduced, which represents the type transforming intrinsics supported by clang, gcc, and MSVC.Introduced
hasDesignator()predicates to distinguish between designated and positional initializations for both struct/union fields and array elements.Added the
isVla()predicate to theArrayTypeclass. This allows queries to identify variable-length arrays (VLAs).