SonarQube Integration
Connect SonarQube with Sprinto to automatically track code vulnerabilities, monitor remediation timelines, and stay compliant with security standards.
SonarQube is a self-hosted code quality and security platform that helps organisations detect vulnerabilities, bugs, and code issues across repositories.
By integrating SonarQube with Sprinto, you can continuously monitor vulnerabilities and ensure they are remediated within defined compliance timelines. Sprinto automatically tracks issues, maps them to controls, and flags overdue vulnerabilities.
How it works
Sprinto connects to your SonarQube instance using a user API token and your SonarQube instance URL.
Once connected:
Sprinto discovers projects from your SonarQube instance.
Vulnerabilities (issues of type VULNERABILITY) are continuously synced.
Branch-level data is used to track relevant code states.
Sprinto evaluates remediation timelines against compliance requirements.
Controls and checks are automatically updated based on vulnerability status.
Sprinto uses SonarQube APIs to:
List projects.
Fetch vulnerabilities.
Retrieve project branches.
Detect SonarQube version to determine authentication method.
Prerequisites
Before setting up the integration, ensure the following:
You have administrator access in Sprinto.
You have admin or sufficient permissions in your SonarQube instance.
Your SonarQube instance is accessible via a valid instance URL.
You are using a supported SonarQube version (8.x, 9.x, or 10.x).
You can generate a User Token (Project tokens are not supported).
The token owner has access to the projects you want to monitor.
Permissions required
Sprinto requires both global (instance-level) and project-level permissions.
Global permissions (instance level)
One of the following is required:
Administer System or Administer (recommended) Allows Sprinto to automatically discover all projects.
Alternative (if admin access is not available):
You must have Browse permission on every project you want to track.
Project-level permissions
For each project being monitored:
Browse Required to:
Fetch vulnerabilities.
Retrieve project branches.
Why these permissions are required
Sprinto uses the following SonarQube APIs:
Project discovery (list projects).
Vulnerability retrieval.
Branch information retrieval.
Without sufficient permissions:
Projects may not be visible.
Vulnerabilities may not be fetched.
Some checks may fail or remain incomplete.
Authentication behaviour
Sprinto automatically adapts authentication based on your SonarQube version:
10.x
Bearer token
9.x
Basic auth (token-based)
8.x
Basic auth
The integration detects your SonarQube version dynamically and applies the correct authentication method.
Set up the integration
Step 1: Generate API token in SonarQube
Log in to your SonarQube instance.
Click your avatar in the top-right corner.
Go to My Account.
Open the Security tab.
Generate a new token:
Token name: Sprinto
Token type: User Token
Expiration: No expiration

Click Copy to securely save the token.

Step 2: Connect SonarQube in Sprinto
Log in to the Sprinto dashboard.
Navigate to Settings → Integrations.
Search for SonarQube.
Click Connect.

In the connection drawer:
Review permissions and data usage.
Click Next.

Enter the following details:
API Token: Paste the generated token.
SonarQube URL: Enter your instance URL (e.g.,
https://sonar.company.com).
Click Connect SonarQube.

Once connected, the integration status will show as Connected.
Post-connection flow
After successfully connecting SonarQube, you must configure vulnerability monitoring for Sprinto to start evaluating compliance checks.
Add SonarQube as a monitoring source
Navigate to Data Library → Vulnerabilities.
Click Add monitoring source.
Select SonarQube from the list of available sources.
Select projects to monitor
Sprinto will display all accessible SonarQube projects.
Choose how you want to monitor projects:
All projects (default selection), or
Specific projects based on your requirements.
Confirm your selection.
Note: Only projects accessible to the API token will be available for selection.
Enable monitoring
Click Add SonarQube to complete the setup.
Sprinto will begin syncing vulnerability data.
Sync and evaluation timelines
Initial sync: Sprinto fetches all existing vulnerabilities across selected projects. This may take a few minutes depending on project size.
Subsequent syncs: Vulnerability data is periodically refreshed to capture new issues and status updates.
Evaluation: Sprinto evaluates:
Open vulnerabilities.
Severity levels.
Time taken to resolve issues.
These evaluations are mapped to relevant controls and checks.
Where to view data
Once monitoring is enabled:
Go to Data Library → Vulnerabilities to view imported issues.
Navigate to Monitoring to track compliance checks and failures.
Evidence is automatically attached to relevant controls.
Important considerations
If no projects appear, verify that the API token has the required permissions.
If vulnerabilities are not visible, ensure SonarQube analysis has been completed for the selected projects.
Changes in project access or permissions may impact ongoing monitoring.
What data is synced
Sprinto retrieves:
Vulnerability details (issues)
Severity
File/component information
Rule identifiers
Project identifiers
Branch information
This data is used to:
Track remediation timelines.
Power compliance checks.
Generate audit-ready evidence.
Version compatibility
10.x
Fully supported
9.x
Fully supported
8.x
Supported
7.x and earlier
Not officially supported
Troubleshooting
Invalid token or authentication errors
Ensure you are using a User Token, not a project token.
Regenerate the token if it has expired or is invalid.
Verify token format (especially for SonarQube 9+).
Unable to fetch projects
Ensure you have Administer permission at the instance level.
Alternatively, ensure Browse access is available for all required projects.
Vulnerabilities not syncing
Ensure projects have completed analysis in SonarQube.
Verify the token has access to those projects.
Allow time for the initial sync.
Some projects missing
The token may not have access to those projects.
Ensure Browse permission is enabled for those projects.
Integration fails intermittently
Check network connectivity to your SonarQube instance.
Verify the instance is publicly accessible (if required).
Ensure no firewall or proxy is blocking requests.
Disconnect SonarQube
Go to Settings → Integrations → SonarQube.
Click Disconnect.
This stops all data syncing and monitoring.
Need help?
If you face issues setting up or using the integration, contact Sprinto support.
Last updated

