TLDR overview
- The SonarQube plugin for Devin Desktop adds dedicated
sonar-*skills so Devin Local can query quality gates, issues, coverage, duplication, and dependency risks from inside the Agents window. - The plugin fits developers who run Devin Desktop local sessions against a project that SonarQube already analyzes in CI, and want SonarQube results and standards available without leaving the editor.
- Running
/sonarqube:sonar-integrateafter installation in Devin Desktop enables secrets scanning, the SonarQube MCP Server, and Sonar Vortex (when entitled), so prompts and file reads are checked for credentials and the code Devin writes is guided and verified. - Setup installs the plugin with
devin plugins install, authenticates to SonarQube, and writes a global integration to~/.config/devin/that applies across every project and appears in the Customize panel.
The SonarQube plugin for Devin Desktop packages SonarQube capabilities as skills that Devin Local can call from the Agents and IDE view. Devin has no built-in view of a project's quality gate, existing issues, or coding standards, and nothing checks its output until CI runs after a pull request. This blueprint covers installing and activating the plugin, running the integration with SonarQube, reviewing what the integration configures, invoking the skills, scanning for secrets, and, optionally, using Sonar Vortex context and analysis to guide the agent and verify its output. The examples covered in this guide run against a fork of aws-cli, a large Python codebase analyzed in SonarQube Cloud through CI.
When to use this
Use this blueprint when you want Devin to work with your SonarQube data and standards directly in Devin Desktop:
- You run Devin Desktop local sessions (Devin Local) against a codebase that SonarQube already analyzes.
- You want dedicated skills for quality gate status, issue lists, coverage gaps, and dependency risks, all from within the same environment you use to generate code.
- You want issues caught in the agent's own loop rather than by a pull request that fails in CI.
What you'll achieve
- The SonarQube plugin installed for Devin Desktop (and Devin CLI), with dedicated
sonar-*skills available as/sonarqube:slash commands and listed in the Customize panel. - A global integration in
~/.config/devin/that registers the SonarQube MCP Server (sonar run mcp), secrets hooks, Vortex hooks, and aStophook. - A verified secrets block on a file read, and end-of-turn
DEEPanalysis on code the agent writes.
Architecture

The integration splits across two layers, and Devin Desktop shares both with Devin CLI. Devin Local is the same agent harness the CLI uses, so plugins, skills, hooks, and MCP servers follow the same formats and discovery paths in either one.
The plugin layer contributes skills, a sonarqube-reviewer agent, and a rule, and owns no runtime infrastructure. Devin installs it from the SonarSource/sonarqube-agent-plugins repository, where the Devin bundle lives in .devin-plugin/. Plugins install at the user level, so they apply to every workspace you open.
sonar integrate devin configures the integration once for your user account, under ~/.config/devin/ on macOS and Linux or %APPDATA%\devin on Windows. Your local Devin projects share the MCP registration and hooks, but Vortex analysis still resolves the SonarQube project for each file. sonar auth login saves your user token in the OS keychain; valid CLI environment credentials take precedence if configured. Devin starts sonar run mcp, which launches the SonarQube MCP Server container and communicates with it over stdio. The CLI supplies the credentials at runtime, so the generated MCP entry contains no SONARQUBE_TOKEN. The SonarQube hooks installed for Devin are short wrappers around sonar hook commands. They use the CLI’s active credentials, so you don’t need to sign in separately for each hook.
When enabled, Vortex analysis restores dependencies, compiled artifacts, type information, and build configuration from a prior CI analysis on a long-lived branch. SonarQube stores that context by project key and branch so Vortex can analyze changed files with CI-level precision without rerunning the full scan. Vortex context uses a different path: in the standard Devin integration, hooks introduce the context capabilities and Devin queries them through the local sonar context command. This setup doesn’t add Vortex context tools to Devin’s MCP tool list; a separately configured local MCP server can expose them. Vortex covers the Guide and Verify stages of Sonar's Agent Centric Development Cycle. It guides the agent with project-aware context and constraints, then verifies the agentic loop's output with CI-level precision.
Prerequisites
- Devin Desktop installed and authenticated, with Devin Local selected as the agent for new conversations (App settings → Agents → Devin Local → Enabled)
- The workspace is not in Restricted Mode, because hooks don't load or run there
- The
devincommand available in a terminal, for the plugin management commands (devin plugins), with plugins permitted by your organization - SonarQube Cloud on Enterprise, or Team with an annual plan, or SonarQube Server 2026.5 or later on Enterprise or Data Center edition
- A Sonar Vortex subscription active for your organization; secrets scanning and the remaining skills still work without it
- A container runtime operational: Docker, Podman, or nerdctl. The MCP server runs as a container
- (Optional) SonarQube CLI (
sonar) 1.13.0 or later, which adds theStophook. Thesonar-integrateskill installs or updates it, so you can skip this going in - (Optional) A
sonar-project.propertiesfile in the project root. The skills use it to resolve the project key
To follow along exactly, fork aws/aws-cli, import it into SonarQube Cloud with CI-based analysis, and analyze it on a long-lived branch through CI. If entitled, Vortex analysis restores the CI analysis context and Vortex context combines SonarQube project data with the local semantic navigation; without a prior run, results may degrade.
Step 1 — Install and activate the plugin
Install the plugin from the repository, from a terminal or the integrated terminal in Devin Desktop:
devin plugins install SonarSource/sonarqube-agent-pluginsConfirm it's installed:
devin skills list
devin plugins list
In Devin Desktop, open Customize from the agent sidebar in the Agents view. The Plugins tab lists sonarqube, and the Skills tab lists its sonar- skills.

The plugin is loaded at this point, but the SonarQube integration itself isn't yet configured.
Step 2 — Configure the integration
Open the project in Devin Desktop, start a new Devin Local session, and run the integration skill, invocable via the following slash command::
/sonarqube:sonar-integrate
The skill walks four checks:
- CLI check — verifies the SonarQube CLI is installed and current. If it isn't already on your machine, the skill walks you through the installation step by step.
- Auth check — runs
sonar auth status. If you're already authenticated to SonarQube, it skips ahead. - Auth login — If you’re not already signed in, choose SonarQube Cloud (EU or US) and enter your organization key, or choose SonarQube Server and enter its URL. Run the
sonar auth logincommand the skill provides and complete sign-in in your browser. The CLI saves your user token in your OS keychain. - Integration — runs
sonar integrate devin --non-interactive, which installs secrets hooks, Vortex, and the SonarQube MCP Server configuration. The skill doesn't ask whether to install for the current project or globally, because the install is always global.
Devin Desktop may ask you to approve the shell commands the skill runs.
If your organization has no Vortex subscription, the CLI skips the Vortex components and still installs secrets scanning and the MCP server.

Restart Devin Desktop. It loads hooks and MCP configuration at startup.
Step 3 — Review what the integration configured
The integration writes to ~/.config/devin/ in your user home. Nothing is written to your project, so there's no per-project config to commit or maintain. Devin Desktop and Devin CLI both read these files.
After the restart, the Customize panel shows what the agent loaded:
~/.config/devin/mcp_config.json registers the MCP server for every project:
{
"mcpServers": {
"sonarqube": {
"command": "sonar",
"args": ["run", "mcp"]
}
}
} The server starts through the CLI rather than a raw docker run, which is how the CLI detects your container runtime and hands off the keychain session. The registration is global, so it carries no project key.

~/.config/devin/config.json holds the hook registrations. This entry runs the secrets check before every file read:
{
"hooks": {
"PreToolUse": [
{
"matcher": "^read$",
"hooks": [
{
"type": "command",
"command": "'<home>/.config/devin/hooks/sonar-secrets/build-scripts/pretool-secrets.sh'",
"timeout": 60
}
]
}
]
}
} Six hooks are registered in total:

The two secrets hooks are installed regardless of a Vortex subscription, whereas the other four are Vortex hooks and are installed only when your organization is entitled.
On macOS and Linux, the integration installs Bash wrappers under ~/.config/devin/hooks/. With secrets detection and Vortex enabled, they’re grouped into sonar-secrets/, sonar-vortex/, sonar-sqaa/, and sonar-stop/. If a wrapper can’t find sonar on Devin’s PATH, it exits silently with status 0 without running the hook. On Windows, the integration installs PowerShell wrappers under %APPDATA%\devin\hooks\.
#!/bin/bash
if ! command -v sonar &> /dev/null; then
exit 0
fi
sonar hook devin-pre-tool-useWhen Vortex is installed and Devin attempts to finish a turn, the Stop hook invokes this command to check the current Git change set:
sonar hook agent-stop --agent devinThe Stop hook runs DEEP analysis on the current Git change set in Devin’s working directory. It runs deterministically and doesn't depend on the agent following prompt instructions. You don’t need to pass --project or --branch: the CLI resolves the owning SonarQube project for each file and uses the current Git branch when you’re on a named branch. If issues remain, the hook returns them to Devin so it can fix them before stopping. After three rounds of fixes, the agent may stop.
By default, the SonarQube CLI stores downloaded analyzer binaries in ~/.sonar/sonarqube-cli/bin/ and records installed integrations in ~/.sonar/sonarqube-cli/state.json. You can change the storage root with SONAR_USER_HOME.
Step 4 — Invoke the plugin skills
Open the aws-cli workspace in Devin Desktop and start a new Devin Local session. The MCPs tab under Customize should show sonarqube as Connected and toggled on.
Then invoke skills through plain language prompting, or directly by using the dedicated slash (skill) commands:
/sonarqube:sonar-list-projects
/sonarqube:sonar-list-issues
By default, Devin Local asks for approval before calling an MCP tool that hasn’t already been allowed. You can approve that tool or all tools on the sonarqube server, either for the current session or permanently.
For skills that query a specific project, you can often omit the project key. An MCP tool can use the integration’s default project when one is available; if the skill needs a key, it can look for sonar.projectKey in the repository’s root sonar-project.properties file. /sonarqube:sonar-dependency-risks also requires SonarQube Advanced Security.
Step 5 — Scan for secrets
Create a file that contains a fake credential. Use a random, plausible value, but don’t reveal a real key.
cat > creds-demo.txt << 'EOF'
AWS_ACCESS_KEY_ID=AKIAJ7QK4XPN2MWD5RTA
AWS_SECRET_ACCESS_KEY=w3Jq9ZxT5vLm2KdR8nYp0BhFc4UaGsE7oIt1VeNx
EOFThen ask Devin to read it:
Read the file creds-demo.txt and summarize what it contains.When the scanner finds a secret, the PreToolUse hook blocks Devin’s read call with the reason Sonar detected secrets in file: <path>. Devin does not receive the file’s contents from that call.

The UserPromptSubmit hook checks prompts before they’re sent to Devin. If it detects the fake key in your prompt, it blocks the submission.
Remove the demo file:
rm creds-demo.txtStep 6 (optional) — Guide the agent with project-aware context and constraints
Vortex injects project context when a session starts, and Devin can query it on demand. Ask for the guidelines that apply to the project (in plain language):
what are the coding guidelines for this project?Devin retrieves guidelines with sonar context guidelines get and answers with rules specific to the codebase, drawn from the project's issue history and narrowed to the task and languages involved, rather than a generic style list.
Then inquire about the project’s structure:
show me the top-level architecture of this projectThe answer comes from Vortex's architecture context for the analyzed project, and it describes the module layout and the main execution path through the aws-cli package.

Step 7 (optional) — Verify the agentic loop
Ask Devin to write new code, and watch how the integration shapes the turn:
Add s3_helper.py at the project root with an upload_with_retry(
bucket, key, file_path, max_retries=3
) function.
Implement a small boto3-based S3 upload helper using the standard upload_file
transfer API. Retry transient upload failures with exponential backoff, log each
attempt, and raise a clear error after all retries fail. Keep the public function
signature as specified. Include a TODO for adding metric emission later.Devin starts with a plan: retrieve project guidance, implement the helper, then run focused tests and a Vortex DEEP analysis. It fetches the project's Python guidelines with sonar context guidelines get --languages python, writes s3_helper.py and tests/unit/test_s3_helper.py, and runs the tests.


When Devin attempts to finish the turn, the Stop hook runs the DEEP analysis and returns any actionable issues so Devin can fix them before it stops.
The first DEEP run reports one finding, python:S7608. The rule raises when an S3 operation runs without verifying bucket ownership. Without ExpectedBucketOwner, a naming collision or a dynamically constructed bucket name can send the upload to a bucket in a different AWS account. For upload_file, the issue message asks you to add ExpectedBucketOwner to the ExtraArgs parameter. The tests pass and the code reads correctly, but the upload call has no ownership check, and CI analysis would report the same rule after the pull request.
Devin fixes the findings on the lines it touched. It confirms that boto3 accepts ExpectedBucketOwner as an upload argument by checking S3Transfer.ALLOWED_UPLOAD_ARGS, then patches s3_helper.py and the test file. Your prompt told Devin to keep the public signature, so the fix doesn't add a parameter. The helper reads the owner from the AWS_EXPECTED_BUCKET_OWNER environment variable and passes it when it's set.
Devin then re-runs the unit tests, and the Stop hook runs the DEEP analysis again. With that, S7608 is resolved. One finding remains, the TODO that the prompt asked for. Devin keeps the TODO on purpose and says so in its summary.
Analysis runs once, at the end of the turn, over every file the turn changed. It uses DEEP depth even for a single file so it includes cross-file findings. Vortex supplies the catch and the verify, and Devin performs the fix.
Step 8 (optional) — Run multi-file DEEP analysis
To check for issues that span files in the same SonarQube project, analyze the files together. In the integrated terminal, pass --file once for each path. With two or more files, the CLI defaults to DEEP analysis:
sonar analyze agentic --file awscli/clidriver.py --file s3_helper.py --file awscli/customizations/s3/subcommands.py! awscli/clidriver.py · 1 issue
[1] line 289 Complete the task associated to this "TODO" comment. python:S1135
! s3_helper.py · 1 issue
[1] line 27 Complete the task associated to this "TODO" comment. python:S1135
! awscli/customizations/s3/subcommands.py · 10 issues
[1] line 903 Define a constant instead of duplicating this literal "%s\nError: Invalid argument type" 3 times. python:S1192
[2] line 555 Define a constant instead of duplicating this literal 's3://' 8 times. python:S1192
[3] line 771 Define a constant instead of duplicating this literal "<S3Uri>" 4 times. python:S1192
[4] line 429 Using HTTP protocol is insecure. Use HTTPS instead. python:S5332
[5] line 925 Complete the task associated to this "TODO" comment. python:S1135
[6] line 1096 Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. python:S3776
[7] line 1248 Either merge this branch with the identical one on line "1230" or change one of the implementations. python:S1871
[8] line 1474 Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed. python:S3776
[9] line 1510 Use the opposite operator ("!=") instead. python:S1940
[10] line 1594 Replace the unused local variable "bucket" with "_". python:S1481
3 files analyzed · 3 with issues · 12 issues found · DEEP analysisThe s3_helper.py finding is the intentional TODO from Step 7. The subcommands.py findings are pre-existing issues in the upstream codebase, which the agent leaves alone unless you ask.
These flags and defaults govern this command:
- Analysis depth — one explicit
--filedefaults toSTANDARD; two or more default toDEEP. If you omit--fileand analyze a Git change set, the default is alsoDEEP. Use--depth STANDARDor--depth DEEPto override the default. - Project and branch — if you omit
--project, the CLI analyzes each file against the SonarQube project that owns it. If you omit--branch, it uses the current Git branch when you’re on a named branch. - Large runs — in an interactive terminal with text output, the CLI asks for confirmation when the change set contains more than 50 files. Pass
--forceto skip the prompt. - Exit code — the command exits with
51when it reports issues and0when it completes successfully without reporting any. An empty change set also returns0.
Verify the setup
Run these in order in a terminal to confirm every layer is live:
sonar auth status # authentication and connectivity
sonar system status # MCP status and, with Vortex, subscription and usage
sonar --version # 1.13.0 or later
docker ps --filter "ancestor=sonarsource/sonarqube-mcp"Then, in a fresh Devin Local session in Devin Desktop, confirm each layer:
- Plugin and MCP. The
sonar-skills appear on the Skills tab,sonarqubeis listed on the MCPs tab, and/sonarqube:sonar-list-projectsreturns your project. - Hooks. The Hooks tab lists the Sonar hooks from Step 3.
- Secrets detection. The agent refused to read
creds-demo.txtin Step 5. - (Optional) context is injecting. Ask an architecture question rather than a coding task. A module graph means context arrived.
- (Optional) Verify end-of-turn Vortex analysis. With Vortex enabled, ask Devin to edit a file. The
PostToolUsehook runsSTANDARDanalysis after the edit. When Devin attempts to finish the turn, confirm that theStophook ranDEEPanalysis on the changed files.
Your user home should now carry these artifacts, and your project directory should carry none of them:
What to know
- Skills that query SonarQube data depend on prior CI analysis. Both Vortex capabilities restore stored CI analysis context. Without a prior CI analysis on a long-lived branch, results degrade, and Java projects analyzed through Automatic Analysis return only basic results.
- The integration is global and applies to every Devin project on your machine. Without a Vortex subscription, the Vortex components are skipped, and
sonar system statustells you which case applies. When a usage limit is reached, the hooks stay installed and analysis pauses until usage resets. - Language coverage differs per capability. Vortex analysis spans 25 languages including Python, but taint analysis is limited to Java, JavaScript, TypeScript, C#, and VB.NET, and semantic navigation to Java, C#, JavaScript, TypeScript, Python, and Rust.
- Secrets checks cover prompts and the
readtool only. Output from other tools, such as a shell command that prints a file, isn't scanned, and hooks don't run in Restricted Mode, so treat the hooks as a safeguard, not a guarantee. - Restart Devin after you integrate. If MCP shows as failed or not started, check that your container runtime is running, then restart. Re-running
sonar integrate devinin your home terminal refreshes the hooks and fixes drift. If you integrated with an older CLI version, re-running it also removes Sonar's old managed blocks from~/.config/devin/AGENTS.mdand preserves your own instructions. Running it interactively and choosing Customize removes the integration.sonar system statusis the fastest check on whether the Vortex subscription is active. - If your organization restricts MCP access, ask your Devin administrator to confirm that MCP is enabled and that the SonarQube MCP Server is permitted by your organization’s policy.
Next steps
Related Sonar guides:
- Set up the SonarQube plugin for GitHub Copilot in VS Code
- Set up the SonarQube plugin for GitHub Copilot CLI
- Set up the SonarQube plugin for Claude Code
- Set up the SonarQube plugin for Codex
- Introducing Sonar Vortex
- The Future is AC/DC: the Agent Centric Development Cycle
Documentation:
