CodeQL changes for macOS 27, Xcode 27, and Swift 6.4 #210464
Replies: 5 comments 10 replies
|
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. |
_ Treat with caution The following claims are not mentioned in the announcement itself:
These may be informed assumptions or observations from users, but they are not officially confirmed in the GitHub post. |
|
Are there any plans to support CodeQL on macOS 27, Xcode 27, and Swift 6.4 in the future? |
|
Thanks for posting this. Since the post lists several separate changes, here's a practical checklist for working out whether you're affected and what to change. 1. What is and isn't affected
2. Pin the runner and Xcode explicitly (Swift and other traced builds) Don't rely on Check the "Set up job" log of a recent run to confirm which image version and Xcode were actually used, and compare it against the runner-images release notes. 3. Switch to build mode The docs list Trade-offs to be aware of:
4. Intel runners If you use 5. Rollout suggestion
Hope this helps anyone planning the migration. |

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