CodeQL 2.21.3 (2025-05-15)¶
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.3 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¶
Miscellaneous¶
Windows binaries for the CodeQL CLI are now built with
/guard:cf, enabling Control Flow Guard.
Query Packs¶
Minor Analysis Improvements¶
C#¶
Changed the precision of the
cs/equality-on-floatsquery from medium to high.
JavaScript/TypeScript¶
Type information is now propagated more precisely through
Promise.all()calls, leading to more resolved calls and more sources and sinks being detected.
Query Metadata Changes¶
C/C++¶
The tag
external/cwe/cwe-14has been removed fromcpp/memset-may-be-deletedand the tagexternal/cwe/cwe-014has been added.The tag
external/cwe/cwe-20has been removed fromcpp/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcpp/count-untrusted-data-external-api-irand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcpp/untrusted-data-to-external-api-irand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcpp/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcpp/late-check-of-function-argumentand the tagexternal/cwe/cwe-020has been added.
C#¶
The tag
external/cwe/cwe-13has been removed fromcs/password-in-configurationand the tagexternal/cwe/cwe-013has been added.The tag
external/cwe/cwe-11has been removed fromcs/web/debug-binaryand the tagexternal/cwe/cwe-011has been added.The tag
external/cwe/cwe-16has been removed fromcs/web/large-max-request-lengthand the tagexternal/cwe/cwe-016has been added.The tag
external/cwe/cwe-16has been removed fromcs/web/request-validation-disabledand the tagexternal/cwe/cwe-016has been added.The tag
external/cwe/cwe-20has been removed fromcs/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcs/serialization-check-bypassand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromcs/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-12has been removed fromcs/web/missing-global-error-handlerand the tagexternal/cwe/cwe-012has been added.
Golang¶
The tag
external/cwe/cwe-20has been removed fromgo/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromgo/incomplete-hostname-regexpand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromgo/regex/missing-regexp-anchorand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromgo/suspicious-character-in-regexand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromgo/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromgo/untrusted-data-to-unknown-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-90has been removed fromgo/ldap-injectionand the tagexternal/cwe/cwe-090has been added.The tag
external/cwe/cwe-74has been removed fromgo/dsn-injectionand the tagexternal/cwe/cwe-074has been added.The tag
external/cwe/cwe-74has been removed fromgo/dsn-injection-localand the tagexternal/cwe/cwe-074has been added.The tag
external/cwe/cwe-79has been removed fromgo/html-template-escaping-passthroughand the tagexternal/cwe/cwe-079has been added.
Java/Kotlin¶
The tag
external/cwe/cwe-20has been removed fromjava/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromjava/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-93has been removed fromjava/netty-http-request-or-response-splittingand the tagexternal/cwe/cwe-093has been added.
JavaScript/TypeScript¶
The tag
external/cwe/cwe-79has been removed fromjs/disabling-electron-websecurityand the tagexternal/cwe/cwe-079has been added.The tag
external/cwe/cwe-20has been removed fromjs/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromjs/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed fromjs/untrusted-data-to-external-api-more-sourcesand the tagexternal/cwe/cwe-020has been added.
Python¶
The tags
security/cwe/cwe-94andsecurity/cwe/cwe-95have been removed frompy/use-of-inputand the tagsexternal/cwe/cwe-094andexternal/cwe/cwe-095have been added.The tag
external/cwe/cwe-20has been removed frompy/count-untrusted-data-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed frompy/untrusted-data-to-external-apiand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed frompy/cookie-injectionand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-20has been removed frompy/incomplete-url-substring-sanitizationand the tagexternal/cwe/cwe-020has been added.The tag
external/cwe/cwe-94has been removed frompy/js2py-rceand the tagexternal/cwe/cwe-094has been added.
Ruby¶
The precision of
rb/useless-assignment-to-localhas been adjusted frommediumtohigh.The tag
external/cwe/cwe-94has been removed fromrb/server-side-template-injectionand the tagexternal/cwe/cwe-094has been added.
Language Libraries¶
Bug Fixes¶
C/C++¶
Fixed an infinite loop in
semmle.code.cpp.rangeanalysis.new.RangeAnalysiswhen computing ranges in very large and complex function bodies.
Minor Analysis Improvements¶
JavaScript/TypeScript¶
Enhanced modeling of the fastify framework to support the
allroute handler method.Improved modeling of the
shelljsandasync-shelljslibraries by adding support for thewhich,cmd,asyncExecandenv.Added support for the
fastifyaddHookmethod.
Python¶
Added modeling for the
hdbcliPyPI package as a database library implementing PEP 249.Added header write model for
send_headerinhttp.server.
New Features¶
Java/Kotlin¶
Kotlin versions up to 2.2.0x are now supported. Support for the Kotlin 1.5.x series is dropped (so the minimum Kotlin version is now 1.6.0).
Swift¶
Added AST nodes
UnsafeCastExpr,TypeValueExpr,IntegerType, andBuiltinFixedArrayTypethat correspond to new nodes added by Swift 6.1.