CodeQL 2.23.5 adds support for Swift 6.2, new Java queries, and improved analysis accuracy
CodeQL is the static analysis engine behind GitHub code scanning, which finds and remediates security issues in your code. We’ve recently released CodeQL 2.23.5, introducing three new Java security queries for detecting concurrency issues and improving the accuracy of your code scanning results.
Language and framework support
- Swift: CodeQL now supports Swift 6.2, ensuring you can analyze projects built with this version.
- Rust: We’ve added support for the
actix-webweb framework and extended support for themysqlandmysql_asynclibraries. - C#: We’ve added tracer support for macOS and Linux when the .NET CLI (
dotnet) directly invokes the C# compiler (csc), providing basic tracing and extraction capabilities for .NET 10 RC2 on these platforms.
Query changes
C#
- We’ve completely rewritten the
cs/dereferenced-value-may-be-nullquery, which removes a very significant number of false positives. This query has also been changed from apath-problemquery to aproblemquery, so paths are no longer reported. - We’ve updated the
cs/constant-conditionquery to report a wider range of high confidence results. - We’ve improved the
cs/web/missing-x-frame-optionsquery, so it now correctly handles configuration nested in root “ elements.
Java/Kotlin
- We’ve promoted the
java/sensitive-cookie-not-httponlyquery from experimental to the main query pack. - We’ve added three new queries to detect concurrency issues in classes marked as
@ThreadSafe:java/escapingdetects values escaping from thread-safe classes.java/not-threadsafedetects data races in thread-safe classes.java/safe-publicationdetects unsafe publication in thread-safe classes.
- Calls to
String.matchesare now treated as sanitizers for thejava/ssrfquery, which can reduce the occurrence of false positives.
Python
- We’ve split the
py/insecure-cookiequery into multiple queries:py/insecure-cookiechecks for cases where theSecureflag isn’t set.py/client-exposed-cookiechecks for cases where theHttpOnlyflag isn’t set.py/samesite-nonechecks for cases where theSameSiteattribute is set toNone.
- These queries now only alert when the cookie is detected to contain sensitive data.
For a full list of changes, refer to the complete changelog for version 2.23.5.
Availability
Each new version of CodeQL is automatically deployed to users of GitHub code scanning on github.com. The new functionality in CodeQL 2.23.5 will also be included in GitHub Enterprise Server (GHES) release 3.20. If you use an older version of GHES, manually upgrade your CodeQL version.