CodeQL changes for macOS 27, Xcode 27, and Swift 6.4 #210464
Replies: 3 comments
|
Why This Is Happening CodeQL’s traditional autobuild and manual build modes rely on traced extraction. During compilation, a native tracer injects into compiler process calls to capture source files and AST representations. Starting with macOS 27 and Xcode 27, Apple stripped legacy universal x86_64 architecture code from several core system binaries and developer libraries. Because parts of CodeQL's macOS tracing wrapper depended on hooks into those Intel/universal binaries, CodeQL can no longer attach to compiler invocations when Xcode 27 is installed. Key Failure Points & The "Silent Zero" RiskFloating runs-on: macos-latest: If your GitHub Actions workflow uses a floating tag, an image update to Xcode 27 or macOS 27 will break traced compilation for C/C++, C#, Go, Java, Kotlin, and Swift without warning. Silent False Negatives on Swift 6.4: Teams running Swift 6.4 have noted runs returning exit code 0 with zero detected alerts, while the SARIF logs contain extraction errors. CodeQL may exit cleanly even though 0% of the Swift codebase was actually scanned. Intel Mac Runners Deprecation: Self-hosted Intel (x86_64) Mac runners will reach end-of-support in mid-December 2026. Practical Fixes for GitHub Actions1. Pin Your Runner Image and Xcode Version (For Swift, Go, Kotlin)Because Swift, Go, and Kotlin do not have a build-mode: none option in CodeQL, the only current path is to explicitly lock your runner and Xcode version:YAMLjobs:
|
|
If you use CodeQL on macOS, pin your workflows to macOS 26/Xcode 26 for now. Swift 6.4 is unsupported, and C/C++/C#/Java users can consider build-mode: none as a workaround. |

Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Question
💬 Feature/Topic Area
Code scanning
Discussion Details
Starting with macOS 27 and Xcode 27, Apple no longer includes Intel (x86_64) code in some of the system binaries and libraries that CodeQL relies on to trace builds. As a result, CodeQL can't support traced scans on these versions or analyze Swift 6.4.
What's affected
How to keep your scans running
If you scan Swift or use traced builds for other languages, pin your workflows to macOS 26 or earlier and Xcode 26 or earlier. If you use GitHub Actions, pin the runner image and toolchain in your workflow rather than relying on the latest versions.
For C/C++, C#, and Java, you can switch to build mode none, which doesn't require tracing a build.
All reactions