CodeQL can now trace AI input flowing into your MCP server
CodeQL 2.27.5 and 2.27.6 add taint tracking for model-generated MCP tool arguments, a Rust deserialisation query, and a JDK bump that mitigates the Java4Shell bug.
GitHub shipped CodeQL 2.27.5 and 2.27.6 on 4 December, and the headline change is new taint tracking for Model Context Protocol servers. With the ai threat model enabled, CodeQL now follows model-generated arguments into tool, resource and prompt handlers built on the official MCP SDKs and fastmcp, across JavaScript, TypeScript and Python. A separate remote threat model tracks request headers and bearer tokens on their own path.
The same release adds a Rust query for unsafe deserialisation of user-controlled data, follows input through Zod’s parse and safeParse calls in JS/TS, and flags untrusted arguments passed to spawn or execFile when a shell is enabled. CodeQL 2.27.6 separately updates its bundled JDK to Temurin jdk-25.0.5.1+2, which mitigates Java4Shell (CVE-2026-114938), and disables HotSpot’s Base64 intrinsics when that JDK is in use. GitHub rolls every new CodeQL version out automatically to code scanning on github.com; GitHub Enterprise Server picks it up in a future 3.24 release, or sooner with a manual upgrade.
Why it matters: MCP servers accept input shaped by a model, not a user, and that input has mostly been invisible to static analysis. If you run code scanning on an MCP server and haven’t turned on the ai threat model, this is new coverage sitting unused. The Zod and Rust additions matter more broadly: both are now common enough in typical stacks that a precision gain there shows up in real scan results, not just benchmarks.