Skip to main content

Connecting the SonarQube Integration


This guide walks you through setting up and verifying your SonarQube Integration to enable code quality analysis, security vulnerability tracking, and test coverage metrics.
  1. Once you logged in you will navigate to Dashboard.
  2. Go to the integration and click on Connect button to add SONARQUBE Datasource.
  3. Enter Account Name (e.g., Production-SONARQUBE).
  4. Environment: Click the dropdown menu and select the environment type (e.g., Production, Staging, Development).
  5. Enter Base URL and Organization name (Click on view guide to generate Base URL and Organization name).
  6. Enter User Token .

title: “SonarQube Integration Setup Guide” description: “Set up SonarQube credentials and configure the integration for Zero-X.”

SonarQube Integration Setup Guide

This guide explains how to access SonarQube, generate an authentication token, and prepare the integration configuration for Zero-X.

1. Understand the Required Configuration

Your integration configuration contains the following fields:Replace the example values with the correct details for your organization.

2. Prerequisites

Before starting, make sure you have:
  • Access to your SonarQube server, for example, https://sonarqube.xyz.com.
  • An authorized organization account with permission to create or manage tokens.
  • Access to the projects required by the Zero-X integration.
If you cannot access the URL, contact your SonarQube administrator rather than creating a separate account or server.

3. Log In to SonarQube

Step 1: Open SonarQube

Open the following URL in your browser:https://sonarqube.xyz.comSign in using your authorized organization credentials.

Step 2: Verify Access

Confirm that the SonarQube dashboard opens and that you can view the projects your team maintains.If the server is unavailable or access is denied, ask your administrator to verify your account permissions and network or VPN access.

4. Generate a SonarQube Token

The token allows Zero-X to authenticate API requests to SonarQube.

Step 1: Open Account Security Settings

  1. Sign in to SonarQube.
  2. Select your profile icon.
  3. Choose My Account.
  4. Open the Security tab.
You can also try opening the security settings directly:Open SonarQube Security Settings

Step 2: Enter Token Details

Use the following suggested values:
  • Token name: zerox-xyz-integration, or another descriptive name approved by your team.
  • Token type: Choose the narrowest token type that supports the operations required by your approved integration.
  • Expiration: Select an expiry period permitted by your organization’s security policy.

Step 3: Generate and Copy the Token

  1. Select Generate.
  2. Copy the token immediately.
  3. Store it in an approved secrets manager or password manager.
Important: SonarQube generally displays the token only when it is generated. If you lose it, generate a replacement and revoke the old token when appropriate.

Which Token Type Should You Choose?

Note: Available token types and permissions can vary by SonarQube edition and version. Confirm the appropriate token type and permissions with your SonarQube administrator and the Zero-X integration requirements.

5. Prepare the Integration Configuration

After generating the token, create the configuration using the fields described in Section 1.The following JSON is a template, not a working configuration. Replace the placeholder values with your actual settings and verify the organization identifier before saving.
  1. Click Verify to validate the provided Sonarqube details.
  2. After successful verification, click Connect.