Skip to content

ci(codeql): advanced setup — scope Swift autobuild to macos/** + weekly#1015

Merged
100yenadmin merged 1 commit into
mainfrom
ci/codeql-advanced-scoped
Jun 18, 2026
Merged

ci(codeql): advanced setup — scope Swift autobuild to macos/** + weekly#1015
100yenadmin merged 1 commit into
mainfrom
ci/codeql-advanced-scoped

Conversation

@100yenadmin

Copy link
Copy Markdown
Member

What & why

Analyze (swift) runs on every PR (including pure-Python/QA ones) because CodeQL is on GitHub default setup, which autobuilds the macOS Swift app per-language with no path filter — the slow/expensive job. This replaces default setup with committed advanced workflows that keep full language coverage but scope the Swift autobuild to when it actually matters.

  • codeql.ymlpython + javascript-typescript + actions on ubuntu-latest, build-mode: none (build-free), every PR/push to main + weekly. Same coverage, cheap.
  • codeql-swift.ymlswift on macos-latest, build-mode: autobuild, scoped to paths: macos/** (+ the workflow file) and a weekly schedule — so the app still gets periodic scanning, but a Python/QA PR no longer pays the Swift-autobuild tax.

⚠️ Required one-time toggle (owner)

Default CodeQL setup and advanced setup cannot both runcodeql-action/init fails by design while default is enabled. After merging, flip:

Settings → Code security and analysis → Code scanning → "CodeQL analysis" → switch from "Default" to "Advanced"

Until that toggle is flipped, these workflows will show red (init refuses). Recommend flipping it right at merge.

Coverage parity

Default setup analyzed: actions, javascript-typescript, python, swift. This keeps all four — only the trigger for swift changes (scoped vs every-PR). No security coverage is dropped.

Replace GitHub CodeQL default setup (which autobuilds the Swift macOS app on EVERY PR,
no path filter — the 20M+ per-PR tax) with committed advanced workflows:

- codeql.yml: python + javascript-typescript + actions on ubuntu, build-free, every
  PR/push + weekly. Cheap, unchanged coverage.
- codeql-swift.yml: swift on macos-latest, autobuild, scoped to paths: macos/** (+ the
  workflow itself) + a weekly schedule — so the app still gets periodic security scanning
  but a pure-Python/QA PR no longer triggers the Swift autobuild.

REQUIRES a one-time repo-owner toggle: Settings -> Code security and analysis ->
Code scanning -> CodeQL analysis -> switch Default to Advanced (default + advanced cannot
both run; codeql-action/init fails by design until default setup is disabled).
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@100yenadmin, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 52 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7a2542b3-3605-48b8-92b0-6c3b9b92248e

📥 Commits

Reviewing files that changed from the base of the PR and between 3d84b77 and 1cbc567.

📒 Files selected for processing (2)
  • .github/workflows/codeql-swift.yml
  • .github/workflows/codeql.yml

Comment @coderabbitai help to get the list of available commands and usage tips.

@100yenadmin 100yenadmin merged commit 3c42dc1 into main Jun 18, 2026
19 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant