跳到正文

SonarQube CLI 版本记录

SonarSource SA · 面向开发者的命令行界面,用于 SonarQube 分析、质量门禁、问题管理及支持的编程代理集成。

Cask开发工具 306
主页
安装命令
brew install --cask sonarqube-cli
近 30 天安装
1,381
App榜第 232
近一年安装
4,838
365 天累计
最新版本
1.13.1.18209
下载大小
93MB
bin
更新节奏
每两周
近 30 天 3 个版本
  1. 1.13.1.18209

    最新补丁

    OpenNavo 编辑 Homebrew 收录

    SonarQube CLI 1.13.1 不再打印 1.13.0 在每条命令上显示的启动警告。

    修复
    启动警告不再在每条命令上打印。

    SonarQube CLI 1.13.1 不再在每条命令上打印警告。这条警告是 1.13.0 引入的。

    SonarSource 于 2026 年 11 月 24 日发布 1.13.1.18209。

    来源:https://github.com/SonarSource/sonarqube-cli/releases/tag/1.13.1.18209

    • 命令行不再在每条命令上打印启动警告。
  2. 1.13.0.18157

    补丁

    GitHub Release Homebrew 收录

    SonarQube CLI v1.13.0

    This release adds a shared completion hook for seven coding agents and moves sonar init to Beta with monorepo, non-interactive, and dry-run support.

    Features

    • Reliable end-of-turn Sonar Vortex analysis for coding agents: Claude Code, Codex, Copilot, Cursor, Devin, OpenCode, and Pi now share a deterministic completion hook (sonar hook agent-stop). When an agent finishes a turn, the CLI runs Sonar Vortex analysis on the changed files and sends any actionable issues back so the agent fixes them before it stops. This no longer depends on the agent following prompt instructions, and the agent is never stuck: after three rounds of fixes, it is allowed to stop.
    • sonar init is now Beta: Guided setup from zero to your first SonarQube Cloud analysis, now with monorepo support (--monorepo), non-interactive mode for agents and CI (--non-interactive), a preview mode that writes nothing (--dry-run), and a searchable folder picker for choosing project roots.
    • Architecture coverage (SonarQube Cloud only): Read architecture coverage (covered vs. total artifacts, per language) through the CLI.
    • Connection source in sonar auth login: The command now prints the absolute path of the file (.sonar-config.json, sonar-project.properties, or a .sonarlint binding) that supplied the server or organization, so you can see where a pre-filled URL came from.
    • Vortex Context Augmentation Code navigation now also covers Go, Kotlin, C and C++.

    Bug Fixes

    • Completion hook with a corrupt state database: Agents can now stop cleanly instead of being blocked indefinitely.
    • Staged files with special characters: Secrets scanning in the pre-commit hook now handles staged files whose names contain spaces or special characters.
  3. 1.12.0.17622

    补丁

    GitHub Release Homebrew 收录

    SonarQube CLI v1.12.0

    This release redacts secrets instead of blocking them for Copilot and Codex, extends import support to SonarQube Server, previews sonar init (Alpha) for guided project setup, and includes a range of bug fixes and security hardening.

    Features

    • Secrets redacted instead of blocked (Copilot and Codex): A secret in your session no longer stops your work. SonarQube masks it, tells the agent it was redacted, and the session continues. It covers prompts in Copilot and file reads in Codex. Anything that can't be masked safely is still blocked.
    • sonar import on SonarQube Server: Import GitHub, GitLab, Bitbucket Cloud, Bitbucket Server, and Azure DevOps repositories onto SonarQube Server.
    • sonar link project picker: Running sonar link without a project key now shows an interactive project picker instead of failing.
    • sonar auth logout --server <url>: Removes the saved connection and its keychain entry for a specific server URL, including inactive connections.
    • Architecture findings and filtering (SonarQube Cloud only): sonar architecture findings reads architecture deviations, flaws, and smells from existing analysis results. Current architecture dependency views can now be filtered by source/destination subtree and paginated.
    • sonar init (Alpha): Go from zero to your first analysis in one guided command. It connects to SonarQube, sets up your project (import a repository, link an existing project, or start unbound), runs a first scan, and offers to set up your IDE or agent integrations.

    Bug Fixes

    • Server trust prompt: The "Connect to: <url>?" confirmation in sonar auth login now defaults to No, so a server URL taken from repository files is not accepted by accident.
    • Secrets scanner: Filenames starting with - (e.g. --help) can no longer change scanner options, and timeout errors now give actionable guidance and advise against scanning entire repository trees.
    • Proxy and TLS: SONAR_NO_PROXY exclusions are now respected over generic HTTP_PROXY/HTTPS_PROXY variables. Feature-flag retrieval now honors the CLI's proxy, custom CA, and client-certificate settings.
    • Dependency installation: Managed executables such as sonar-secrets are no longer treated as installed before signature verification completes, and concurrent installers now coordinate correctly.
    • Hook permissions: Reinstalling a managed Git hook now restores missing executable permissions on POSIX systems. Git silently ignored non-executable hooks.
    • Integrations: The YAML adapter no longer overwrites or deletes files that contain malformed YAML.
    • Agentic analysis: The default analysis now works before the first Git commit.
    • sonar update PATH message: The CLI no longer asks you to open a new terminal or export PATH when the install directory is already on PATH.
    • Architecture exports: Intended architecture exports from a different project are now rejected with a clear error.

    Miscellaneous

    • Updated node-forge to v1.4.3 and follow-redirects to v1.16.2 (security fixes).
    • The MCP server now receives proxy and TLS JVM settings through a temporary read-only argument file, which is cleaned up on exit.
    • Internal refactors and dependency bumps.
  4. 1.11.0.16877

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.11.0

    This release expands monorepo support across analysis features, introduces architecture commands, adds new multi-project linking tools, and rounds out several agent integrations — alongside a range of bug fixes and security updates.

    Features

    • Devin and Pi integrations: New sonar integrate devin and sonar integrate pi commands set up secrets scanning, Vortex analysis and context augmentation, and the SonarQube MCP server.
    • OpenCode 2.0 support: sonar integrate opencode now installs plugins compatible with OpenCode 2.0.
    • Monorepo support for analysis: SCA dependency analysis, Vortex code analysis, and Vortex context augmentation now all work correctly in monorepos. Each affected project is analyzed independently, and ambiguous project resolution produces clear guidance to re-run from the correct subdirectory.
      • sonar link list: New command to look up which SonarQube project covers a given file or directory path, with pagination support — useful in large monorepos with many linked projects.
      • Link multiple projects with sonar link: sonar link can now create and update multi-project configurations, letting you map several subdirectories to different SonarQube projects without editing .sonar-config.json manually.
    • Architecture commands: New sonar architecture commands let you read current and intended project architecture and update intended architecture models. An architecture skill installer is also available in Beta.
    • sonar auth org: New command to switch the active SonarQube Cloud organization without logging out and back in. When no organization key is provided, an interactive list is shown. (sonar auth login --org points to this command when reusing a stored token.)
    • MCP container networking for self-hosted SonarQube: Set mcp.container.autoNetwork=true to automatically configure container access to SonarQube Server running on localhost. Disabled by default.
    • Vortex context failure reporting: When the SessionStart hook cannot inject Vortex context (e.g., because the project cannot be resolved), the failure and discovery diagnostics are now reported clearly instead of silently skipped.

    Bug Fixes

    • Env-var auth no longer overwrites saved login: Running a command with SONARQUBE_CLI_TOKEN / SONARQUBE_CLI_SERVER environment variables no longer replaces the connection saved by sonar auth login. The stored login is preserved for subsequent commands that do not use env vars.
    • Stored token scoped to server URL: The CLI no longer reuses a stored token for a different scheme, port, or base path on the same hostname. The token is now matched against the full recorded server URL.
    • Interactive prompts cancelled cleanly on closed stdin: Interactive prompts (e.g., on Windows) no longer freeze the terminal when stdin is closed — they are cancelled immediately.
    • Self-update compatibility: Fixed a crash in older CLI processes that access telemetry state after an update.
    • Vortex wording: Revised agentic analysis instructions to reduce the risk of agents interpreting them as a prompt injection attempt.
    • Concurrent state-file writes: Multiple CLI processes (hooks, MCP server, telemetry, parallel integrations) can no longer corrupt or reset state.json through simultaneous writes.
    • sonar api error messages: API error responses from SonarQube are now surfaced in full rather than showing only the HTTP status code.
    • Organization conflict detection: Commands such as sonar list issues, sonar remediate, and sonar analyze dependency-risks now detect when the active organization does not match the project and fail with a clear error instead of silently returning wrong results.
    • Git secrets scanning: Pre-commit and pre-push hooks now block the operation when Git cannot list the files to scan, preventing scanning from being silently skipped.

    Miscellaneous

    • Standalone CLI binaries no longer automatically load .env or bunfig.toml files from the working directory to prevent potential security risks.
    • Internal refactors to support multiple project bindings in the project model and declarative feature availability in sonar integrate.
    • Bundled Context Augmentation upgraded to 0.24.0.
  5. 1.10.1.16776

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.10.1

    This is a maintenance release with a security update.

    Security

    • Internal dependency updates including the Bun runtime, SCA scanner, secret analysis engine, and context augmentation components.
  6. 1.10.0.16040

    展开

    OpenNavo 编辑 Homebrew 收录

    新增 OpenCode 集成、持久化配置、组织列表和密钥扫描白名单管理;修复管道、密钥链及遥测问题。

    SonarQube CLI 1.10.0.16040 — 更新说明

    以下为官方更新说明的分类摘要。

    • sonar integrate opencode 为 OpenCode 安装文件读取与提示提交时的密钥扫描钩子,自动配置 SonarQube MCP 服务,并配置逐次编辑质量扫描及上下文增强技能。

    • 新增 sonar config 的 set、get、unset、list 命令,管理代理、CA、mTLS、日志等配置。敏感值存入系统密钥链并脱敏;优先级为 sonar-env > stored config > environment variable。

    • 新增 sonar list org / sonar list orgs,支持表格和 --format json;sonar allowlist secrets 提供 show、add、remove、clear,add 带 TTY 安全检查,clear 支持 --force。

    • pre-push 钩子改为扫描被推送提交的实际内容,而非工作目录。遥测与统计同意设置改用 sonar config set/get,移除 sonar config telemetry 和 sonar config stats 子命令。

    • 修复提前关闭管道导致的 EPIPE 崩溃;无系统密钥链的容器、CI 和 Factory 环境可更稳健运行。Windows 遥测工作进程阻塞代理 stdout 以及 Linux 更新后的 ENOENT 修复分别限定于这些平台。

    • 内置 SonarText 更新至 2.53.0.13730,改善 CA 处理并签名 macOS/Windows 产物;改进敏感配置显示、错误报告版本标识及依赖,并清理无效集成代码。

    构建标识

    1.10.0.16040

    官方来源

  7. 1.9.0.15656

    展开

    OpenNavo 编辑 Homebrew 收录

    新增全局集成、仓库导入和本地统计。

    集成
    将集成移至全局配置,并在首次运行时迁移。在开放测试版中新增仓库导入,并在 Alpha 阶段新增本地统计。
    工作流
    新增非交互式令牌登录和一致的结构化输出。将更新状态改为子命令,并支持 GitLab 作业模板。
    安全
    加强 OAuth 回环绑定和身份验证回调验证。验证服务器 URL,并拒绝 URL 和项目密钥中的换行符。
    修复
    将推送前扫描限制为已更改的文件,而非整个仓库。修复 Vortex 保留/移除决策不一致以及错误原因缺失的问题。

    SonarQube CLI 1.9.0.15656

    新增全局集成、仓库导入和本地统计。

    集成

    • 将集成移至全局配置,并在首次运行时迁移。
    • 在开放测试版中新增仓库导入,并在 Alpha 阶段新增本地统计。

    工作流

    • 新增非交互式令牌登录和一致的结构化输出。
    • 将更新状态改为子命令,并支持 GitLab 作业模板。

    安全

    • 加强 OAuth 回环绑定和身份验证回调验证。
    • 验证服务器 URL,并拒绝 URL 和项目密钥中的换行符。

    修复

    • 将推送前扫描限制为已更改的文件,而非整个仓库。
    • 修复 Vortex 保留/移除决策不一致以及错误原因缺失的问题。

    仓库导入仍处于开放测试版,本地统计仍处于 Alpha 阶段。本地统计的同意选项与常规遥测分开;全局迁移会更改集成配置。

    来源:官方发布说明。

  8. 1.8.0.5274

    展开

    OpenNavo 编辑 Homebrew 收录

    扩展质量门禁详情查看功能,并新增手动项目关联。

    质量门禁
    新增类别控件,以及查看表现最差的文件或问题详情的控件。支持文件或目录范围,以及自动解析拉取请求。
    项目
    新增 sonar link,用于手动将仓库绑定到项目。新增文件筛选,默认列出未关闭或已确认的问题。
    集成
    支持全局 Vortex 钩子和会话启动时的上下文传递。在 Alpha 中新增 GitLab CI 入门配置。
    修复
    修正 Cloud 项目筛选器和 Server 新代码问题筛选器。验证变更集路径是否位于仓库边界内。

    SonarQube CLI 1.8.0.5274

    扩展质量门禁下钻功能,并新增手动项目关联功能。

    质量门禁

    • 新增类别及最差文件或问题的下钻控件。
    • 支持文件或目录范围,并自动解析拉取请求。

    项目

    • 新增 sonar link,用于手动绑定代码仓库与项目。
    • 新增文件筛选功能,默认列出处于开放或已确认状态的问题。

    集成

    • 支持全局 Vortex 钩子和会话启动时的上下文传递。
    • 新增 Alpha 阶段的 GitLab CI 接入引导。

    修复

    • 修正 Cloud 项目和 Server 新代码问题的筛选器。
    • 根据代码仓库边界验证变更集路径。

    此版本将支持的最低 SonarQube Server 版本提升至 25.1。高级下钻数据取决于所连接的服务及项目权限。

    来源:官方发布说明。

  9. 1.7.0.4638

    展开

    OpenNavo 编辑 Homebrew 收录

    新增终端质量门禁判定,并改进 Git 钩子的串联。

    命令
    新增质量门禁状态,为不同判定提供不同的退出码。将 sonar context 从公开测试版升级为稳定版。
    集成
    安装全局 Git 钩子时,串联现有的本地钩子。通过 Server CAG Hub 检查 Vortex 使用权限。
    修复
    将自定义 SONAR_USER_HOME 传入生成的 MCP 配置。将 Claude Code 钩子锚定到项目目录。清理已超时的 stdin 监听器,并保留共享二进制文件。

    SonarQube CLI 1.7.0.4638

    新增终端质量门禁判定结果,并改进 Git 钩子串联。

    命令

    • 新增质量门禁状态,并为不同判定结果提供不同的退出码。
    • 将 sonar context 从公开测试版升级为稳定版。

    集成

    • 安装全局 Git 钩子时,串联现有的本地钩子。
    • 检查 Server CAG Hub 中的 Vortex 使用权限。

    修复

    • 将自定义 SONAR_USER_HOME 传入生成的 MCP 配置。
    • 将 Claude Code 钩子固定到项目目录。
    • 清理超时的 stdin 监听器,并保留共享二进制文件。

    来源:官方发布说明。

  10. 1.6.0.4255

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.6.0

    This release brings Vortex entitlement visibility into sonar system status, automatic cleanup of Vortex when entitlement is lost, and foundational work on the Private Beta command gating system.

    Features

    • Vortex status in sonar system status: A new Vortex section now appears in sonar system status, showing your current entitlement and usage state. Genuine entitlement loss is surfaced as an unhealthy status with a recommendation to re-enable Vortex or remove its integration; usage-limit exhaustion remains healthy.
    • Automatic Vortex uninstall on entitlement loss: sonar integrate now automatically removes Vortex and its associated configuration when entitlement is genuinely lost, keeping your setup clean without manual intervention.
    • Improved secrets pre-push hook output: Output formatting for the secrets pre-push hook has been improved for better readability.

    Miscellaneous

    • Internal work on end-of-turn Vortex instructions for the Codex integration.
    • Internal refactors and infrastructure improvements.
  11. 1.5.0.4158

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.5.0

    This release brings unified Vortex integration across all supported AI agents, improvements to sonar import, better error messaging for authentication, and several bug fixes.

    Features

    • Vortex integration for all agents: sonar integrate now installs a unified Vortex feature (combining SonarQube Agentic Analysis and context augmentation) for Claude Code, Copilot, Codex, Cursor, and Antigravity — with a single entitlement check, a single prompt, and automatic migration of any previously installed separate SQAA/CAG features.
    • Claude Code context augmentation hooks: sonar integrate claude now installs PostToolUse and PostToolUseFailure hooks so Claude can forward relevant tool output for context augmentation.
    • Vortex entitlement awareness: The CLI now distinguishes genuine entitlement loss from usage-limit exhaustion when Vortex API calls are rejected, showing distinct, actionable messages for each case and throttling repeated entitlement-loss warnings.
    • Keychain error messaging: When the system keychain is unavailable, the error message now mentions environment variable authentication as an alternative, including the relevant variable names.
    • MDM deployment scripts: Reference scripts for enterprise MDM deployment are now published as part of the CLI repository.

    Bug Fixes

    • Telemetry proxy support: Telemetry events were bypassing configured proxy and TLS settings. They are now routed through the resolved network configuration, ensuring correct behavior in corporate proxy environments.
    • Telemetry test isolation: Test runs were inadvertently sending fixture data to the production telemetry endpoint; this has been fixed.

    Documentation

    • Updated the README to include Codex, Cursor, and Antigravity in the list of supported AI agents.
    • Made the CLI landing page mobile-responsive and updated the quickstart guide.
    • Published sample telemetry events documentation for enterprise customers.

    Miscellaneous

    • Continued foundational work on the Vortex (formerly Agentic Analysis / Context Augmentation) product unification, including internal hook dispatch refactoring, a shared entitlement resolver, subfeature resource ownership, post-update migration logic, and allowlist-gating for context augmentation hooks.
    • Extensive internal restructuring of the source tree (moving code under src/core/, src/commands/, and related directories) to improve contributor ergonomics; no user-facing behavior changed.
    • Updated bundled sonar-context-augmentation binary to 0.19.0.3620.
    • Dependency updates including @sonar/scan, js-yaml (security), eslint, typescript-eslint, @sentry/bun, and others.
  12. 1.4.0.3748

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.4.0

    This release brings enterprise network configuration support for the MCP server, several improvements to agentic workflows, expanded sonar import capabilities, and a collection of bug fixes.

    Features

    • MCP Server: Proxy, CA Certificate, and mTLS Support: The run mcp command now forwards proxy settings, custom CA certificates, and mTLS configuration stored in the CLI to the MCP server container, enabling use in enterprise network environments.
    • MCP Server: WSL Container Runtime Support: run mcp can now detect and use container runtimes (e.g., Docker) running inside WSL on Windows systems.
    • Auto-detect Git Branch for Agentic Analysis: sonar analyze agentic and the associated hooks now automatically detect the current git branch and pass it as context to SonarQube, improving analysis accuracy without requiring --branch to be specified manually.
    • sonar update Command: Introduced sonar update as the new name for sonar self-update. The old command still works but prints a deprecation warning pointing to the new name.
    • Agent-Friendly Syntax Hints: Interactive prompts now display the equivalent non-interactive flag syntax before prompting, helping AI agents discover the correct flags instead of getting stuck waiting for input.
    • Hook Failures on Missing Auth or Binary: Pre-commit/pre-push hooks no longer fail silently when the user is unauthenticated or the secrets scanner binary is missing — they now surface a clear error so the problem is immediately visible.
    • Git Worktree Support for Agentic Integrations: Project key resolution for sonar analyze agentic and the Code Augmentation binary now works correctly when operating from a git worktree.
    • sonar api: Automatic SonarQube Cloud API Host Rewriting: When connected to SonarQube Cloud, sonar api now automatically rewrites /api/v2/... paths to the correct Cloud API host, fixing failures against endpoints such as SCA issue releases.
    • analyze dependency-risks: The incorrect beta label has been removed from the analyze dependency-risks command.

    Bug Fixes

    • State File Corruption on Read Failure: A failed or corrupt read of the internal state file no longer silently overwrites it with defaults, which previously caused unexpected logouts.
    • Secrets Hook State Written Even When Declined: Fixed an issue where declining the secrets scanning hooks prompt during sonar integrate claude still recorded the hooks as installed in internal state.
    • Hook Command Paths with Spaces: Hook command paths written to agent configuration files (e.g., .claude/settings.json) are now properly quoted, fixing failures when the project or home path contains spaces or other shell metacharacters.
    • Unknown Subcommands for analyze: Running sonar analyze <unknown> now reports the unrecognized subcommand clearly instead of showing a misleading "too many arguments" error.
    • Entitlement Check for sonar integrate: Integration setup now correctly distinguishes between not being entitled to a feature and having exceeded consumption limits, preventing incorrect failures at startup.

    Installation & Distribution

    • Homebrew and Mise Documentation: The README and documentation website now mention Homebrew and Mise as supported installation methods.
    • macOS Signing: The macOS binary is now signed under the updated Apple Developer ID for SonarSource Sàrl.

    Miscellaneous

    • Continuation of the foundational work for the bulk project onboarding (creation of SonarQube project from the selected repository, concurrent import of repositories).
    • Updated the Context Augmentation binary to version 0.18.0.
  13. 1.3.0.3493

    展开

    GitHub Release Homebrew 收录

    SonarQube CLI v1.3.0

    This release brings support for enterprise network configurations, major improvements to the sonar integrate experience, a new version-update notifier, and several bug fixes.

    Features

    • Mutual TLS — PEM and PKCS12 support: The CLI now supports client certificate authentication via environment variables, covering both PEM (SONAR_TLS_CLIENT_CERT, SONAR_TLS_CLIENT_KEY_FILE, SONAR_TLS_CLIENT_PASSPHRASE) and PKCS12 file formats. These credentials are also forwarded automatically to underlying analysis binaries.*
    • sonar integrate bare command: Running sonar integrate with no subcommand now presents an interactive menu to discover and set up any available integration (Claude, Copilot, Codex, Cursor, Git, …), then delegates to that integration's existing flow.
    • sonar integrate — Feature uninstall: Re-running sonar integrate <agent> on an already-configured integration now lets you keep or remove individual features. Declining to keep a feature walks you through removal, cleaning up resources, state, and orphaned binaries. Files left empty after uninstallation are deleted automatically rather than left as empty husks.
    • New version-available notifier: The CLI now checks once per day whether a newer version is available and displays an update prompt for commands with human-readable output (not --json), so you never miss a new release.
    • Graceful handling of revoked Vortex entitlements: If your Vortex entitlement is revoked, hooks that call the Agentic Analysis API now surface a clear, actionable message ("Run sonar integrate to uninstall unavailable hooks") instead of failing silently or with an unhandled error.

    Bug Fixes

    • Feature name casing: Integration feature names are now consistently lowercase across all agents (Claude, Copilot, Codex, Cursor, Git).
  14. 1.2.0.3278

    展开

    GitHub Release

    SonarQube CLI v1.2.0

    This release improves agent integrations, network transparency, and installation experience.

    Features

    • Multi-file Agentic Analysis: sonar analyze agentic now accepts repeatable --file flags — passing two or more files automatically triggers DEEP analysis for richer cross-file results.
    • Network Configuration in Status: sonar system status now displays active proxy and custom CA certificate configuration, including the source (e.g. environment variables) and the relevant URLs or file paths, with credentials redacted.
    • Updated MCP Docker Image: sonar run mcp now pulls from the official sonarsource/sonarqube-mcp image by default.
    • Always-current install scripts: The install.sh / install.ps1 scripts and sonar self-update no longer hardcode a version number — they now fetch the latest stable version automatically from binaries.sonarsource.com.

    Bug Fixes

    • Fixed sonar integrate antigravity writing content to .agents/instructions/ (ignored by Antigravity) instead of the correct .agents/rules/ location.
  15. 1.2.0
  16. 1.1.0.3122

    展开

    GitHub Release

    SonarQube CLI v1.1.0

    SonarQube CLI 1.1 adds native CLI integration with Antigravity (ex Gemini CLI) and Cursor, brings dependency risk scanning into the git pre-commit hook, and ships several security fixes.

    Features

    • sonar integrate antigravity — Antigravity support: Integrates SonarQube into Antigravity (Google's successor to Gemini CLI) by installing secrets hooks, Agentic Analysis instructions, and the SonarQube MCP server. Supports both project and global scope.
    • sonar integrate Cursor — Cursor support: Integrates SonarQube into Cursor by installingbeforeReadFile and preToolUse hooks to intercept file reads for secret scanning, including a fix for Windows. Added a custom rule to run Agentic Analysis on file edited by agents.
    • Dependency risks in git pre-commit hook: sonar integrate git --dependency-risks adds an optional SCA scan to the pre-commit hook alongside secrets scanning. It aborts the commit if manifest files contain secrets before running SCA.
    • Severity filter for dependency risks: sonar analyze dependency-risks accepts a --severities flag to filter results to specific risk severities.
    • Automatic project discovery in pre-commit hook: The pre-commit hook now auto-discovers the SonarQube project key from Git remotes, removing the need to configure it manually.
    • SQAA multi-file analysis: Agentic Analysis now sends change sets as chunked multi-file requests for more efficient and accurate analysis.
    • Old SonarQube Server severities: The CLI now correctly handles and displays severity values from older SonarQube Server versions.
    • Documentation moved to sonarsource.com: cli.sonarqube.com now redirects to the official docs at sonarsource.com/sonarqube/cli.

    Bug Fixes

    • [Security] Bearer token leak via HTTP redirect: The CLI no longer forwards Authorization headers when following HTTP redirects to a different host, preventing token exfiltration.
    • [Security] PostToolUse hook path traversal: The PostToolUse hook now restricts file reads to within the project directory, preventing access to files outside the project scope.
    • OAuth callback on IPv6: Fixed an OAuth callback failure when the loopback address resolves to an IPv6 address.
    • TAR extractor long filename handling: Fixed a POSIX compliance issue in the TAR parser where filenames longer than 100 characters were incorrectly parsed.
  17. 1.0.0.2628

    展开

    GitHub Release

    SonarQube CLI v1.0.0

    This milestone marks SonarQube CLI becoming an official public release and getting out of open beta.

    SonarQube CLI 1.0 makes SonarQube a practical day-to-day tool in the terminal. It helps developers catch secrets, surface code quality and security issues on local work, and plug SonarQube into AI assistants, git hooks, and automation so feedback arrives earlier than CI.

    The main commands are simple: sonar auth connects to SonarQube, sonar analyze runs local analysis workflows, sonar list queries projects and issues, and sonar integrate sets up agent and git integrations. That gives teams one CLI for interactive use, scripting, and AI-assisted development.

    For more information, explore our interactive command browser, or dive into the detailed documentation.

    This specific version introduces the sonar system status and sonar system reset commands, a fully interactive sonar integrate experience, automatic project discovery from Git remotes, and a wide range of polish and bug fixes across the board.

    Features

    • New sonar system status command: It provides a full overview of your CLI health — authentication, installed binaries, active integrations, MCP server state, and recommended actions. Supports --json for agent consumption.
    • New sonar system reset command: It cleanly uninstalls all Sonar-managed integrations, hooks, binaries, and auth state, conducting a "factory-reset" and leaving your environment as it was before setup.
    • New --project option for sonar analyze: The sonar analyze command now accepts a --project flag, consistent with how it is advertised in command help.
    • Revamped, interactive sonar integrate command: Claude Code, Copilot, Codex, and Git integrations now present a per-feature opt-in prompt during installation, giving users fine-grained control over what gets installed and where (global vs. project scope). The command now offers a refreshed UI and consistent display for all subcommands.
    • Auto-discovery of project binding from Git remote: When no local project config is found, the CLI now queries the server using the repository's origin remote URL to automatically resolve the project key and organization.
    • New PostToolUse hook for Codex: sonar integrate codex now installs a PostToolUse: apply_patch hook that runs Agentic Analysis inline after each file edit, mirroring the Claude Code hook experience.
    • sonar auth login confirmation prompt: The confirmation dialog now clearly displays the URL you are connecting to (e.g. Connect to: https://your-server.com?) for a more secure experience.
    • Agentic Analysis skipped during global agent integration: sonar integrate <agent> --global no longer writes project-scoped Agentic Analysis hooks or instruction files; users are advised to run without --global if they want analysis hooks.

    Bug Fixes

    • Fixed sonar analyze --file output: Running sonar analyze --file <path> without a configured project no longer prints the full help menu; the secrets success message now reads "Secrets scan completed successfully", and excess blank lines have been removed.
    • Fixed Codex AGENTS.md path: sonar integrate codex now correctly writes AGENTS.md at the repository root instead of .codex/AGENTS.md.
    • Reduced macOS Keychain prompts: Fixed a code-signing identifier issue that caused macOS to show a Keychain access dialog on every invocation after sonar self-update. The binary now uses a stable, version-independent identifier so the Keychain ACL remains valid across updates.
    • Line endings preserved on managed file writes: The CLI now detects and preserves existing line endings (CRLF / LF) when writing or updating managed resource blocks, preventing unintended line-ending changes on Windows.

    Miscellaneous

    • Dynamically built help menu: The sonar root help is now built dynamically, ensuring commands, subcommands, and descriptions are always up to date.
  18. 0.14.1.2338

    展开

    GitHub Release

    SonarQube CLI v0.14.1

    This release fixes a bug in the context augmentation skill output, and a bug in the sonar integrate command that was overwriting AGENTS.md.

    Bug Fixes

    • Context augmentation skill: Fixed an issue where the generated skill file (e.g., SKILL.md for Claude, Copilot, or Codex integrations) instructed agents to invoke the raw sonar-context-augmentation binary directly instead of the correct sonar context wrapper command.
    • AGENTS.md: Fixed an issue where sonar integrate for Copilot and Codex was overwriting the whole AGENTS.md file instead of appending content to it.
  19. 0.14.0.2245

    展开

    GitHub Release

    SonarQube CLI v0.14.0

    This release introduces Codex support alongside Context Augmentation, which equips AI assistants with crucial code architecture and SonarQube-based coding guidelines. We’ve also added Software Composition Analysis (SCA) to proactively flag security and license issues in your project dependencies. Finally, the CLI gets a major usability boost with streamlined authentication, installation, and error handling.

    Features

    • Codex integration: Added sonar integrate codex, including prompt secret-scanning hooks, Codex instructions, and SonarQube MCP configuration.
    • Context Augmentation: Added the sonar context command and setup for supported Claude, Copilot, and Codex integrations.
    • Dependency risk analysis: Added sonar analyze dependency-risks to analyze project dependencies for security and license risks.
    • Analysis command: sonar analyze is now the primary entry point for Agentic Analysis.
    • Authentication flow: sonar auth login now guides Server vs Cloud selection and confirms the selected server before continuing.
    • Telemetry: Setting the DO_NOT_TRACK=1 environment variable now disables both usage telemetry and crash reporting. sonar config telemetry reports when telemetry is disabled this way.
    • Project auto-resolution: The CLI now explicitly shows when and how a project key was resolved automatically, removing implicit "magic" from the output.

    Bug Fixes

    • Error handling: Fixed CLI and API error rendering so common failures now show clearer and more consistent remediation hints.
    • Agentic Analysis feedback: Fixed cases where SonarQube Agentic Analysis could be skipped silently; the CLI now reports the problem explicitly.
    • Installation compatibility: Unix release artifacts now use the .bin extension, and the install scripts automatically fall back to .exe for older releases.

    Miscellaneous

    • Removed sonar auth purge and the --with-token login option. For CI and automation, use environment variables instead.
    • Continued foundational work on declarative integration management and Context Augmentation support across agent integrations.
  20. 0.13.0.1692

    展开

    GitHub Release

    SonarQube CLI v0.13.0

    This release includes enhancement of GitHub Copilot integration with Agentic Analysis, and several improvements to error handling and integrations.

    Features

    • GitHub Copilot Integration: Added Agentic Analysis integration for Copilot CLI, instructing Copilot to automatically analyze modified files during sessions
    • Enhanced Error Messages: Errors now include helpful remediation hints showing you how to fix common issues
    • Debug Logging: sonar run mcp now logs the exact container command being executed in debug mode

    Bug Fixes

    • Fixed Git hooks to fail gracefully when the CLI crashes outside CI environments, preventing blocked commits while still failing hard in CI pipelines

    Miscellaneous

    • Continued foundational work on the upcoming SCA dependency analysis command, including downloading the SCA scanner binary for the current platform and wiring it into the analysis pipeline (not yet user-facing).
    • Introduced an internal declarative framework for describing and managing integrations (foundational scaffolding for future integration improvements).
    • Internal fixes to the automated documentation version update process.
  21. 0.12.0.1512

    展开

    GitHub Release

    SonarQube CLI v0.12.0

    This release significantly expands the agentic analysis capabilities of the CLI and introduces sonar remediate — a new command to submit issues for automated fixing via the SonarQube Remediation Agent.

    Features

    • Agentic Analysis from the Working Tree: sonar analyze agentic (renamed from sonar analyze sqaa) now automatically detects your Git change set — no --file argument needed. By default it analyzes staged and unstaged changes plus untracked files.

      • Use --staged to restrict to staged files only, or --base <ref> to diff against a branch or commit.
      • Live per-file progress is displayed in TTY environments. Use --format json for structured output compatible with piping.
      • Binary files and files above 10 MB are automatically excluded and reported. Exit code 51 signals issues were found; 0 means clean.
    • Issue Remediation: New sonar remediate command lets you interactively select open issues fixable by the SonarQube Remediation Agent and submit them as a single job — without leaving the terminal.

      • Use --issues <key>,<key> for non-interactive mode, suitable for use with AI agents such as Claude Code.
      • Available on SonarQube Cloud only. A pre-flight entitlement check catches unsupported plans with a clear message before hitting the API.
    • Improved Project Key Guidance: When no project key is detected, the CLI now explains how to configure one via sonar-project.properties or .sonarlint/connectedMode.json.

    • Updated Bundled Text Analyzer: Updated to version 2.43.0.11106, adding new detection rules for lock files across multiple languages and support for user-defined issue messages for S6784.

    Bug Fixes

    • Agentic Analysis Hook: Fixed an issue where file paths containing .. or ~ components were sent to the server unnormalized, causing 400 errors in the PostToolUse hook
  22. 0.11.0.1439

    展开

    GitHub Release

    SonarQube CLI v0.11.0

    This release introduces seamless integration with Copilot CLI, allowing you to leverage SonarQube’s intelligence directly within your AI-assisted workflows.

    Features

    • Copilot CLI Integration: Added the sonar integrate copilot command. This automates the setup for the SonarQube MCP Server and installs a pre-tool-use secrets-scanning hook. -- Note: This also generates an instructions.md file to help Copilot identify and block prompts containing sensitive information.
    • Simplified MCP Configuration: Added the sonar run mcp command, designed to be used in agent configuration files. Once authenticated via the CLI, the SonarQube MCP Server can be initialized automatically by your AI agent without additional manual configuration.
  23. 0.10.0.1266

    展开

    GitHub Release

    SonarQube CLI v0.10.0

    New Features & Enhancements

    • Platform Support: Added support for Linux ARM64. Thanks to @mcfedr for the contribution!
    • Issue Filtering: Added the ability to filter issues by statuses and by severities simultaneously.
    • Environment Variables in Auth: sonar auth status now properly displays when a connection is being sourced from environment variables.
    • Agentic analysis: Added a clear warning when no project is configured for SonarQube Agentic Analysis.

    Security & Authentication

    • Keychain Migration: Replaced the external keytar dependency with Bun.secrets for native OS backend keychain management, simplifying token state management and removing the need for macOS entitlements.
    • Token Validation & Generation: * sonar auth status now actively checks if the current token is valid.
      • Adjusted the token generation URL to support SonarQube Server 2026.2+.

    Bug Fixes

    • Hooks: Fixed an issue to ensure pre-commit hooks are not duplicated.
    • SonarQube Cloud US Region Support: Fixed an issue where Cloud API calls were hardcoded to the EU base URL, breaking SQC US environments, and properly added SQC US auth/mentions to the CLI help and README.

    Performance & Installation

    • Windows Installation: Sped up install.ps1 by silencing the progress bar.
  24. 0.9.0.977

    展开

    GitHub Release

    SonarQube CLI v0.9.0

    This release makes possible to run any SonarQube capability from the CLI through SonarQube Web APIs

    Features

    • Generic API command sonar api. Power users can now invoke any SonarQube Server or SonarQube Cloud HTTP endpoint directly from the CLI, enabling full Web API integration beyond built-in commands

    Bug fixes

    • Project key detection — The project key is now correctly resolved from .sonarlint/connectedMode.json when present in the workspace.
    • Pre-commit hook — Fixed a failure in the pre-commit hook when the sonar CLI is not installed on the machine.
    • Telemetry initialization — Fixed incorrect Sentry SDK initialization: the CLI now uses the correct @Sentry/node package instead of @Sentry/bun.