Configure SonarQube ingestion
Connect a SonarQube integration to Cortex Cloud through the tenant (UI) and map SonarQube projects to Cortex Cloud repositories. The same wizard serves all three onboarding paths; the product type and connection method you select determine which fields appear.
The SonarQube onboarding wizard has two steps: Connect SonarQube (connection details) and Map Repositories (project-to-repository mapping).
Prerequisites
Complete every item in Prerequisites that applies to your chosen path.
Onboarding steps
Step 1: Open the Connect SonarQube wizard
Navigate to Settings → Data Sources & Integrations → + Add New.
Search for and hover over Sonarqube and click Add, or Add Another Instance if an instance is already onboarded.
Step 2: Select the product type
On the Connect Sonarqube step, select the product type that matches your deployment:
SonarQube
You run a self-hosted / on-premises SonarQube Server. Select this option for both the Direct and the Via Transporter paths.
SonarCloud
You use the cloud-hosted SaaS service at https://sonarcloud.io.
The product-type selection changes the connection fields:
SonarQube (Server) presents the API Token, URL and Port, and Connection Method selector (Direct or Via Transporter) fields
SonarCloud presents the API Token and Organization Key field.
Step 3: Provide the connection details
Enter the connection inputs for your product type.
API Token
All paths
Required. Provide your API token. Generate the token in SonarQube from User > My Account > Security.
URL and Port
SonarQube Server
URL is required. Port is optional.
Provide the full base URL of the SonarQube Server. The URL must start with https://. For a self-hosted server on a non-standard port, specify the port (the SonarQube default is 9000), for example https://sonar.company.com:9000
Organization
SonarCloud only
Required.
The unique identifier for your SonarCloud organization. This is required to successfully link your workspace to Cortex Cloud. You can find it in your SonarCloud account menu or in your dashboard URL immediately following /organizations/.
IMPORTANT: The URL must start with https:// for every path. Cortex Cloud rejects a plain http:// URL. For an on-premises server behind a reverse proxy that redirects http:// to https://, supply the https:// URL directly to avoid connection failures.
Step 4: Select the connection method (SonarQube Server only)
This step applies only when the product type is SonarQube (self-hosted Server). SonarCloud skips this step.
The Connection Method selector offers two options:
Direct
The SonarQube Server is publicly accessible from Cortex Cloud. The integration connects over a direct internet path
Publicly reachable self-hosted servers
Via Transporter
The SonarQube Server is private or on-premises and not publicly accessible. The integration is routed through the Broker VM
Private / on-premises servers
To route the integration through the Broker VM AppSec Transporter:
Select Via Transporter. Two dropdowns are displayed: Broker VM and Transporter Connection.
From the Broker VM dropdown, select the Broker VM device that can reach the on-premises SonarQube Server.
From the Transporter Connection dropdown, select one of the AppSec Transporter connections defined on that Broker VM device.
A single AppSec Transporter connection can be associated with only one integration. If the connection is already used, Cortex Cloud rejects the request. Select a different connection or define another connection on the Broker VM applet.
Step 5: Authorize the integration
Select Authorize.
Cortex Cloud validates the connection. On success, the wizard advances to the Map Repositories step.
Troubleshoot: If authorization fails, Cortex Cloud reports that the SonarQube integration could not be authorized. Verify the API token and URL, confirm the URL starts with https://. For SonarCloud, confirm the organization key is correct. For the transporter path, confirm the Broker VM applet can reach the SonarQube Server over the internal network.
Step 6: Map SonarQube projects to repositories
On the Map Repositories step, Cortex Cloud lists the detected SonarQube projects and reports how many are mapped and unmapped. Each row shows the SonarQube Project, its SonarQube Branch, and, for SonarCloud, the Organization.
For each entry in the SonarQube Projects column, select a target in the Mapped Repository column.
In the Set branch column, select a branch or keep the auto-selected branch.
To map projects automatically, select Auto Map. To clear all mappings, select Unmap all.
To map projects added to SonarQube in the future automatically, select Auto-map new repositories.
Select Next to complete onboarding.
Last updated
Was this helpful?
