FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add `xcrun`-based fallback for Xcode version detection by mbg · Pull Request #4278 · github/codeql-action · GitHub

Repository navigation

Add xcrun-based fallback for Xcode version detection - #4278

Merged
mbg merged 13 commits into
mainfrom
mbg/macos27/xcode-detection
Nov 2, 2026
Merged

mbg merged 13 commits into
mainfrom
mbg/macos27/xcode-detection

Conversation

mbg commented Oct 29, 2026

Copy link
Copy Markdown
Member

Add-on to #4221 which adds a fallback for the Xcode version detection which calls out to xcrun.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Advanced setup - Impacts users who have custom CodeQL workflows.
  • Managed - Impacts users with dynamic workflows (Default Setup, Code Quality, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.
  • Code Quality - The changes impact analyses when analysis-kinds: code-quality.
  • Other first-party - The changes impact other first-party analyses.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.
  • GHES - Impacts CodeQL workflows on GitHub Enterprise Server.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Feature flags - All new or changed code paths can be fully disabled with corresponding feature flags.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

mbg requested a review from henrymercer October 29, 2026 17:21
mbg self-assigned this Oct 29, 2026
mbg added this pull request to stack #4250 October 29, 2026 17:21
Copilot AI dynamic review requested due to automatic review settings October 29, 2026 17:21
mbg requested a review from a team as a code owner October 29, 2026 17:21
github-actions Bot added the size/M Should be of average difficulty to review label Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

🟡 Changes recommended

The fallback returns the macOS SDK version instead of the Xcode version, causing compatibility checks and diagnostics to use the wrong product version.

1 open issue 1 file not reviewed What changed in this PR

Adds an xcrun-based fallback to Xcode version detection, extending the platform compatibility checks introduced in #4221 for traced CodeQL analysis.

Changes:

  • Separates symlink-based detection from the new command-based fallback.
  • Makes Xcode version detection asynchronous and updates its caller.
  • Adds tests for command output, failures, and fallback execution.
File Description
src/​platform.ts Adds the command-based fallback and asynchronous detection wrapper.
src/​platform.test.ts Updates symlink tests and adds fallback coverage.
src/​languages/​traced.ts Awaits Xcode detection before checking compatibility.

Review effort: Balanced (auto)

Comment thread src/platform.ts Resolved
Base automatically changed from mbg/macos27/warn to main October 30, 2026 13:33
mbg force-pushed the mbg/macos27/xcode-detection branch from d4d1085 to 41e631a Compare October 30, 2026 14:50
mbg force-pushed the mbg/macos27/xcode-detection branch from 41e631a to be54d79 Compare October 30, 2026 14:59
Comment thread src/platform.test.ts Resolved
Comment thread src/platform.ts Resolved
Comment thread src/platform.ts Resolved
mbg requested review from henrymercer and a dynamic review from Copilot October 30, 2026 16:23
github-actions Bot added size/L May be hard to review and removed size/M Should be of average difficulty to review labels Oct 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

🟢 Approval recommended

No active review issues block approval of the macOS version-detection fallback changes.

No open issues 🎉

1 resolved since last review 1 file not reviewed

Review effort: Balanced (auto)

henrymercer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Two small things, otherwise LGTM

Comment thread src/languages/traced.ts Resolved
Comment thread src/languages/traced.ts Resolved
mbg enabled stacked auto-merge November 2, 2026 12:28
mbg added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 52cf185 Nov 2, 2026
230 checks passed
mbg deleted the mbg/macos27/xcode-detection branch November 2, 2026 12:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L May be hard to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL