Skip to main content
Post

CodeQL 2.27.4 improves accuracy and query metadata

CodeQL 2.27.4 is out, the update to the static analysis engine behind GitHub code scanning. It cuts false positives in several languages and adds a safety check for query packs.

On the query side, java/log-injection now recognizes more sanitizers and sanitizer guards from the JDK, Apache Commons Lang and Text, Guava, OWASP Java Encoder, and Spring Framework. Path-injection queries pick up more substring guards and string replace/remove operations from Apache Commons Lang and Guava. Rust has fewer false positives in rust/uncontrolled-allocation-size, rust/log-injection, and rust/cleartext-logging. In C/C++, cpp/suspicious-pointer-scaling no longer flags intentional pointer arithmetic on std::byte* buffers, and the unused-variable queries skip anything marked [[maybe_unused]].

If you build or publish query packs, codeql pack bundle and codeql pack publish now check that each file is still inside the pack root after symbolic links are resolved. Files that resolve outside it are left out of the archive, with a warning. The CLI also writes Java virtual machine warnings and initialization errors to standard error, so they no longer end up in JSON or other machine-readable output.

CodeQL also dropped the CWE-730 tag from the ReDoS and regex-injection queries across C#, Java/Kotlin, JavaScript/TypeScript, Python, Ruby, and Swift, since MITRE has marked that CWE as prohibited for vulnerability mapping. Those queries keep their other CWE tags.

GitHub deploys new CodeQL versions automatically for code scanning on github.com. The changes will also ship in GitHub Enterprise Server 3.24; older GHES versions need a manual CodeQL upgrade.

Loading replies