Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
Developer

Devin

Install the SonarQube plugin for the Devin CLI and Devin Desktop to bring code analysis, issue management, and secrets detection into your AI coding sessions.

The SonarQube plugin for Devin connects your AI coding agent to SonarQube's code quality and security features. It works with SonarQube Cloud or SonarQube Server.

Use the plugin from the Devin CLI and from Devin Desktop in Local mode. Devin Cloud sessions are not covered.

Features

The plugin gives Devin SonarQube skills that you invoke as slash commands, a SonarQube reviewer subagent, and access to the full set of Tools exposed by the SonarQube MCP Server, including:

  • Code analysis: analyze code snippets and files in the agent context.

  • Issues: search, review, and update code issues.

  • Quality gates: check the quality gate status for a project.

  • Security hotspots: search and review security hotspots.

  • Coverage: find under-covered files and review line-by-line coverage.

  • Dependencies: check third-party dependencies for software composition analysis (SCA) issues.

Through the SonarQube CLI integration set up by sonar integrate devin, Devin also receives:

  • Secrets detection: hooks that keep credentials out of the files the agent reads and the prompts sent to Devin.

  • Vortex analysis (available with a Vortex subscription: SonarQube Cloud Team (annual) or Enterprise plan, or SonarQube Server 2026.5 or newer Enterprise and Data Center editions): a hook that runs after Devin edits files.

  • Vortex context (available with a Vortex subscription: SonarQube Cloud Team (annual) or Enterprise plan, or SonarQube Server 2026.5 or newer Enterprise and Data Center editions): hooks that inject project guidelines, architecture, semantic-navigation, and dependency context when a session starts and when a subagent starts.

Prerequisites

  • A SonarQube Cloud organization or SonarQube Server instance.

  • The Devin CLI or Devin Desktop installed.

  • The SonarQube CLI 1.11.0 or newer installed, with sonar on the PATH that Devin uses. Earlier versions do not include the sonar integrate devin command. The plugin's MCP Server starts through the sonar command and uses your sonar auth login session.

  • A container runtime (Docker, Podman, or nerdctl) to run the SonarQube MCP Server image. The first start pulls the image, which can take a moment.

Install

Install the plugin from the SonarSource/sonarqube-agent-plugins repository:

This installs the latest changes from the repository's default branch, not a tagged release.

Configuration

After installing the plugin, finish setup in two steps.

Step 1: Authenticate

Log in so the MCP Server can connect:

Use the command for your scenario:

Scenario
Command

SonarQube Cloud (EU)

sonar auth login -o <YourOrganizationKey>

SonarQube Cloud (US)

sonar auth login -o <YourOrganizationKey> -s https://sonarqube.us

SonarQube Server

sonar auth login -s <YourServerURL>

Your browser opens to complete login, and the token is stored in your system keychain. Check your authentication anytime with sonar auth status.

Step 2: Install secrets hooks, Vortex analysis, and Vortex context

Run the integration command:

In an interactive terminal, the command shows these recommended components, then asks you to install them (Install recommended) or customize the selection: the secrets-detection hooks, the SonarQube MCP Server configuration, and, with a Vortex subscription, the Vortex analysis hook and the Vortex context hooks. The integration is global: it applies to all Devin sessions on this machine.

Run the guided integration skill from a Devin session instead:

Restart the Devin session afterward so that Devin loads the new hooks and MCP configuration.

Verify that it works

Test the secrets hook

  1. Restart Devin so the newly installed hooks are active. To confirm they're loaded, run /hooks in Devin.

  2. Compose a prompt to Devin that contains a fake-looking but secret-shaped value:

  3. Send the prompt.

  4. Devin should block the prompt and report that Sonar detected secrets in it.

Test the MCP server

In Devin, run /mcp. The sonarqube server should show as connected. Then ask: "List my SonarQube projects." Devin should call the SonarQube MCP server and return your project list. If it does not, run sonar auth status to confirm the underlying token is healthy, check that your container runtime is running, and restart Devin.

Test Sonar Vortex

To confirm that Vortex analysis and context are both working, see Checking that Vortex works properly.

Non-interactive install

For provisioning scripts and onboarding automation, skip the interactive prompts and run the SonarQube CLI directly:

In non-interactive mode the CLI does not prompt. Run sonar auth status afterward to confirm the integration is wired up. See Devin in the SonarQube CLI docs for full details.

Usage

After setup, invoke SonarQube skills in Devin using slash commands or natural language. Both options are shown for each skill.

List projects

Or in natural language:

  • "List my SonarQube projects."

  • "Search for projects with auth in the name."

List issues

Or in natural language:

  • "List the issues in my-project."

  • "Show me critical issues in my-project."

  • "Search issues in my-project on branch main."

Fix an issue

Or in natural language:

  • "Fix the issue java:S1481 in src/main/java/MyClass.java."

  • "Help me fix python:S2077 on line 34 of src/auth/login.py."

Quality gate

Or in natural language:

  • "Check the quality gate status for my-project."

  • "Show me the quality gate for my-project on pull request 42."

Analyze a file

Or in natural language:

  • "Analyze src/auth/login.py for code quality and security issues."

  • "Run analysis on the current file."

Coverage

Or in natural language:

  • "What files in my-project have less than 50% coverage?"

  • "Show me line-by-line coverage for src/auth/login.py."

Duplication

Or in natural language:

  • "Find duplicated files in my-project."

  • "Show duplications in my-project on pull request 42."

Dependency risks

Dependency risks require SonarQube Advanced Security.

Or in natural language:

  • "List dependency risks in my-project."

  • "Show me SCA issues on pull request 42."

Security hotspots

Access security hotspots through the same sonar-list-issues skill:

Or in natural language:

  • "Search security hotspots in my-project."

  • "Show hotspots in my-project that are still to review."

For the full reference of what the agent can call, see the Tools page.

Uninstall

To remove the SonarQube plugin from Devin, run:

Removing the plugin removes the skills, the subagent, and the MCP wiring that it registered. The secrets hooks, Vortex hooks, Vortex instructions in AGENTS.md, and SonarQube MCP Server configuration written by sonar integrate devin stay in your Devin configuration until you remove them. To remove those, see Uninstall on the SonarQube CLI integration page.

Last updated

Was this helpful?