Skip to content
Back to search

sonar

SkillGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sonarsource--sonarqube-agent-plugins/badge.svg)](/listings/sonarsource--sonarqube-agent-plugins)

HTML

<a href="/listings/sonarsource--sonarqube-agent-plugins"><img src="/api/listings/sonarsource--sonarqube-agent-plugins/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

- **Node.js** — for the SessionStart hook (`scripts/setup.js`). - Install **SonarQube CLI** if needed, then **`/sonarqube:sonar-integrate`** or **`sonar auth login`** + **`sonar integrate claude`**.

`sonar auth login` by scenario:

| Scenario | Command | |----------------------|---------------------------------------------------------| | SonarQube Cloud (EU) | `sonar auth login -o <org-key>` | | SonarQube Cloud (US) | `sonar auth login -o <org-key> -s https://sonarqube.us` | | SonarQube Server | `sonar auth login -s <server-url>` |

Optional: add **`sonar-project.properties`** in the project root with `sonar.projectKey`, sources, etc.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 18 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "sonar",
  3. "owner": {
  4. "name": "Sonar"
  5. },
  6. "metadata": {
  7. "description": "AI Agent Plugins by Sonar",
  8. "homepage": "https://sonarsource.com"
  9. },
  10. "plugins": [
  11. {
  12. "name": "sonarqube",
  13. "version": "2.7.0",
  14. "description": "SonarQube is the AI code quality and security verification platform used by millions of developers to catch bugs, vulnerabilities, and leaked secrets. This plugin enforces those standards in the agent coding loop: 7,500+ distinct issue types, secrets scanning, agentic analysis, and quality gates across 40+ languages.",
  15. "source": "./"
  16. }
  17. ]
  18. }
README.md · README · 294 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # SonarQube agent integrations
  2. **Made by [Sonar](https://www.sonarsource.com/)**
  3. SonarQube is the AI code quality and security verification platform used by millions of developers to catch bugs, vulnerabilities, and leaked secrets. This plugin enforces those standards in the agent coding loop: 7,500+ distinct issue types, secrets scanning, agentic analysis, and quality gates across 40+ languages.
  4. SonarQube combines deterministic checks with AI-assisted workflows so quality rules apply consistently to code from both developers and agents. Where your stack supports it, analysis and secrets scanning can run inside the agent loop instead of only in CI.
  5. ## What do the plugins include
  6. The Plugin helps agents connect to [SonarQube CLI](https://cli.sonarqube.com/) and [SonarQube MCP Server](https://docs.sonarsource.com/sonarqube-mcp-server) for issue detection, checking project metrics such as test coverage and duplications, fetch dependency risks, etc. Claude Code, Copilot CLI, Codex, Antigravity, Devin, Pi, and OpenCode (through SonarQube CLI) install agent hooks for secrets scanning and, when entitled, Vortex analysis.
  7. How to use: Run `/sonarqube:sonar-integrate` after installation to walk through setup — CLI installation, authentication, and wiring up the MCP Server and hooks. From there, use slash commands like `/sonarqube:sonar-quality-gate` to check quality gates or interact naturally with prompts like "analyze my code for issues," "show open SonarQube findings," or "check my coverage." With Vortex analysis enabled, verification happens automatically after each edit with no manual invocation required.
  8. ## Prerequisites
  9. - A SonarQube account (**SonarQube Cloud**, **Server**, or **Community Build**). Some features (for example Vortex analysis) depend on your SonarQube Cloud organization settings.
  10. - **[SonarQube CLI](https://cli.sonarqube.com/)** (`sonar`) on your machine.
  11. - A **container runtime** (Docker, Podman, or Nerdctl) for the MCP server image.
  12. Authenticate once with **`sonar auth login`** (browser flow; credentials stay in your OS keychain). The MCP server uses that login.
  13. Check auth anytime:
  14. ```bash
  15. sonar auth status
  16. ```
  17. ---
  18. ## How plugins connect to SonarQube
  19. **SonarQube CLI** can wire everything for you:
  20. ```bash
  21. sonar integrate claude # Claude Code: MCP, hooks, secrets scanning, etc.
  22. sonar integrate copilot # GitHub Copilot CLI: MCP, hooks, secrets scanning, etc.
  23. sonar integrate codex # Codex: MCP, hooks, secrets scanning, Vortex analysis hook
  24. sonar integrate antigravity # Antigravity: hooks, instructions, CAG, MCP patch (after plugin install)
  25. sonar integrate cursor # Cursor: MCP, secret-scanning hooks, Vortex analysis instructions
  26. sonar integrate devin # Devin: MCP, hooks, secrets scanning, Vortex analysis
  27. sonar integrate pi # Pi: MCP, hooks, secrets scanning, Vortex analysis
  28. sonar integrate opencode # OpenCode: MCP, hooks, secrets scanning, Vortex analysis
  29. ```
  30. Run these **after** `sonar auth login`. Use the **`/sonarqube:sonar-integrate`** skill if you prefer a guided flow (install/update CLI, login, then integrate).
  31. ## Claude Code
  32. Install from Anthropic's marketplace **`claude-plugins-official`**:
  33. ```shell
  34. /plugin install sonarqube@claude-plugins-official
  35. ```
  36. ```shell
  37. claude plugin install sonarqube@claude-plugins-official
  38. ```
  39. ### One-time setup
  40. - **Node.js** — for the SessionStart hook (`scripts/setup.js`).
  41. - Install **SonarQube CLI** if needed, then **`/sonarqube:sonar-integrate`** or **`sonar auth login`** + **`sonar integrate claude`**.
  42. `sonar auth login` by scenario:
  43. | Scenario | Command |
  44. |----------------------|---------------------------------------------------------|
  45. | SonarQube Cloud (EU) | `sonar auth login -o <org-key>` |
  46. | SonarQube Cloud (US) | `sonar auth login -o <org-key> -s https://sonarqube.us` |
  47. | SonarQube Server | `sonar auth login -s <server-url>` |
  48. Optional: add **`sonar-project.properties`** in the project root with `sonar.projectKey`, sources, etc.
  49. ---
  50. ## GitHub Copilot CLI
  51. Plugin bundle: **`.github/plugin/`**.
  52. 1. Install **sonarqube** from the pre-packaged `awesome-copilot` plugins catalog:
  53. ```shell
  54. /plugin install sonarqube@awesome-copilot
  55. ```
  56. 2. Run **`sonar integrate copilot`**, or invoke the `/sonarqube:sonar-integrate` skill.
  57. Same workflows as **[Usage](#usage)** once MCP is connected.
  58. ---
  59. ## Cursor
  60. **`.cursor-plugin/`** with MCP via **`mcp.json`**.
  61. 1. Install **SonarQube** plugin through [Cursor's marketplace](https://cursor.com/marketplace/sonarsource):
  62. ```
  63. /add-plugin sonarqube
  64. ```
  65. 2. Run **`sonar integrate cursor`**, or invoke the `/sonarqube:sonar-integrate` skill.
  66. ---
  67. ## Antigravity
  68. Repo-root plugin: **`plugin.json`**, **`mcp_config.json`**, **`rules/sonarqube.md`**, and shared **`skills/`**. Hooks and managed instructions are **not** in the plugin bundle—they are installed by **`sonar integrate antigravity`**.
  69. ### Recommended flow (full integration)
  70. ```bash
  71. # 1. Plugin bundle — skills, rules, MCP
  72. agy plugin install https://github.com/SonarSource/sonarqube-agent-plugins
  73. # 2. Auth + hooks / instructions / CAG / MCP patch
  74. sonar auth login
  75. sonar integrate antigravity
  76. ```
  77. Or use **`/sonarqube:sonar-integrate`** inside Antigravity for a guided flow. Restart the agent session if MCP tools do not appear.
  78. ### Install options
  79. | Option | Command / path | What you get |
  80. |-------------------|-----------------------------------------------|---------------------------------------------------------|
  81. | **CLI global** | `agy plugin install <git-url\|path\|archive>` | Plugin copied to `~/.gemini/config/plugins/sonarqube/` |
  82. | **IDE workspace** | `<project>/.agents/plugins/sonarqube/` | Plugin for that workspace only |
  83. | **Monorepo dev** | Open `sonarqube-agent-plugins` as workspace | Auto-discovery from repo root — no `agy plugin install` |
  84. Installing the **whole repo** is acceptable — other agents' dot-folders are inert in Antigravity.
  85. Same workflows as **[Usage](#usage)** once MCP is connected.
  86. ---
  87. ## Factory Droid
  88. **`.factory-plugin/`** with MCP via **`mcp.json`** and the reviewer in **`droids/`**. No hooks: secrets scanning and Vortex analysis hooks are not available in Droid.
  89. 1. Install the plugin from the SonarSource marketplace:
  90. ```shell
  91. droid plugin marketplace add SonarSource/sonarqube-agent-plugins
  92. droid plugin install sonarqube@sonarqube-agent-plugins
  93. ```
  94. Droid names the marketplace after the repository, not after the `name` in `marketplace.json`, so the plugin is `sonarqube@sonarqube-agent-plugins`.
  95. 2. Run **`sonar auth login`**, or invoke the `/sonarqube:sonar-integrate` skill.
  96. <!-- Maintainers: droids/sonarqube-reviewer.md is the Droid version of agents/sonarqube-reviewer.agent.md. With its own manifest, Droid no longer imports agents/, so the droid keeps Factory frontmatter (Factory tool IDs, mcpServers) and the same body. Its Execute is unrestricted because Factory cannot scope commands per droid; without it the reviewer could not run git diff or sonar. It has no edit tools. Keep the bodies identical, and bump .factory-plugin/ with the other manifests at each release. -->
  97. ---
  98. ## Devin
  99. **`.devin-plugin/`** with MCP via **`mcp.json`**.
  100. 1. Install the plugin from GitHub:
  101. ```shell
  102. devin plugins install SonarSource/sonarqube-agent-plugins
  103. ```
  104. 2. Run **`sonar auth login`**, then **`sonar integrate devin`**, or invoke the `/sonarqube:sonar-integrate` skill. Restart the Devin session afterwards so the hooks and MCP configuration are loaded.
  105. ---
  106. ## Codex CLI
  107. Plugin bundle: **`.codex-plugin/`** — catalog **`sonar`**, plugin **`sonarqube`** (see **[`.codex-plugin/plugin.json`](.codex-plugin/plugin.json)**).
  108. 1. Add **SonarSource/sonarqube-agent-plugins** as a plugin marketplace in Codex CLI:
  109. ```shell
  110. codex plugin marketplace add SonarSource/sonarqube-agent-plugins
  111. ```
  112. 2. Install **sonarqube** plugin from that catalog:
  113. ```shell
  114. codex plugin add sonarqube@sonar
  115. ```
  116. 3. Run **`sonar auth login`**.
  117. 4. Run **`sonar integrate codex`**. This wires MCP in **`~/.codex/config.toml`**, secrets hooks, and—when your SonarQube Cloud org has Vortex analysis—a **PostToolUse** hook on **`apply_patch`** that runs analysis on the git change set after each edit, applying to all Codex sessions on this machine.
  118. Same workflows as **[Usage](#usage)** once MCP is connected.
  119. ---
  120. ## Kiro
  121. Plugin includes **MCP configuration** (**`kiro-power/mcp.json`**) that runs the **`mcp/sonarqube`** image and **relies on SonarQube CLI** for authentication—the same **`sonar auth login`** session.
  122. **`sonar auth login`**, then enable the power per Kiro’s documentation.
  123. ---
  124. ## OpenCode
  125. 1. Install the SonarQube plugin in OpenCode V2:
  126. ```bash
  127. opencode plugin add 'github:SonarSource/sonarqube-agent-plugins#master'
  128. ```
  129. 2. Run **`sonar integrate opencode`**, or invoke the **`/sonar-integrate`** skill.
  130. ---
  131. ## Pi
  132. 1. Install the SonarQube plugin:
  133. ```bash
  134. pi install git:github.com/SonarSource/sonarqube-agent-plugins
  135. ```
  136. 2. Run **`sonar integrate pi`**, or invoke the **`/skill:sonar-integrate`** skill.
  137. ---
  138. ## Usage
  139. Skills are the same across agents. Ask in natural language, invoke skills explicitly, or use the **SonarQube MCP** tools your client shows after MCP starts.
  140. On **Claude Code**, **GitHub Copilot CLI**, and **Cursor**, the plugin also ships a **`sonarqube-reviewer`** agent (`agents/sonarqube-reviewer.agent.md`) that composes the skills below into a single PR/diff review — quality gate, issues, dependency risks, duplication, and coverage — without editing code itself.
  141. MCP reference: [SonarQube MCP Server docs](https://docs.sonarsource.com/sonarqube-mcp-server/).
  142. ### Skills
  143. #### Set up
  144. ```
  145. /sonarqube:sonar-integrate
  146. ```
  147. #### List projects
  148. ```
  149. /sonarqube:sonar-list-projects
  150. /sonarqube:sonar-list-projects my-project
  151. ```
  152. #### List issues
  153. ```
  154. /sonarqube:sonar-list-issues
  155. /sonarqube:sonar-list-issues my-project --severities CRITICAL
  156. ```
  157. #### Fix an issue
  158. ```
  159. /sonarqube:sonar-fix-issue java:S1481 src/main/java/MyClass.java
  160. /sonarqube:sonar-fix-issue python:S2077 src/auth/login.py:34
  161. ```
  162. #### Quality gate / analyze / coverage / duplication / dependency risks
  163. ```
  164. /sonarqube:sonar-quality-gate
  165. /sonarqube:sonar-quality-gate my-project --branch main
  166. /sonarqube:sonar-analyze
  167. /sonarqube:sonar-analyze src/auth/login.py
  168. /sonarqube:sonar-coverage
  169. /sonarqube:sonar-coverage my-project --max 50
  170. /sonarqube:sonar-coverage my-project --file src/auth/login.py
  171. /sonarqube:sonar-duplication
  172. /sonarqube:sonar-duplication my-project --pr 42
  173. /sonarqube:sonar-dependency-risks
  174. /sonarqube:sonar-dependency-risks my-project --pr 42
  175. /sonarqube:sonar-triage-dependency-risks
  176. /sonarqube:sonar-triage-dependency-risks my-project --branch main --fix
  177. ```
  178. ---
  179. ## License
  180. Copyright (C) 2025-2026 SonarSource Sàrl. Licensed under [SSAL-1.0](LICENSE).
  181. ## Support
  182. - Community: https://community.sonarsource.com/

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.