# Sonar

Open SonarQube Cloud security issues and hotspots in the files your agent changes are judged on every turn, so real ones get fixed.

With SonarQube Cloud connected, LeoPrevent judges the open security issues and hotspots in the files your agent changes, on every turn. Real ones go to the agent as existing flaws, to fix in the same change when that is safe. Likely false positives are confirmed with the agent and listed in **Security tools** for you to mark in Sonar.

Sonar projects are matched to repositories through their repository binding. The integration works with SonarQube Cloud.

Available to Admins and Owners.

## Before you start

In SonarQube Cloud, open **My Account > Access Tokens** and generate a personal token. Set it to **No expiration**. The token acts as your user, who needs **Browse** on the projects, and **Administer Issues** and **Administer Security Hotspots** to mark false positives.

## Connect Sonar

1. Open **Integrations** and select **Sonar**.
2. Choose your **Region**: EU (sonarcloud.io) or US (sonarqube.us).
3. Enter the **Organization key**, as it appears in its URL, and the **Token**.
4. Select **Connect**.

## What you get

- **Security tools > Sonar**: findings as LeoPrevent judged them, and the likely false positives to **Confirm false positive** or **Mark as real**.
- A **Findings fixed** column on **Repositories** (**Sonar findings fixed** when Sonar is your only security tool): findings flagged on a turn and confirmed fixed when the fix was checked again.

With [Auto ignore false positives](https://help.leotrace.io/auto-ignore-false-positives/) on, a false positive the agent confirms is marked in Sonar for you; otherwise a Member, Admin or Owner confirms it. Fixed issues close in Sonar on its next analysis. No code is sent to Sonar.

There is no sweep for Sonar: its findings are judged only in the files your agent changes.

## Disconnect

Select **Disconnect** in the Sonar drawer. Reviews stop checking your Sonar findings. To remove access completely, revoke the token in SonarQube Cloud.

Source: https://help.leotrace.io/sonar/ (updated 2026-11-19)
