CloudQuery News

Introducing the new SonarQube source plugin

Code quality insights with SonarQube and CloudQuery

In this blog post, we'll guide you through the setup process and showcase how CloudQuery can transform raw SonarQube data into actionable insights. Get ready to dive deep into your organization’s projects code quality, identify potential risks, and make informed decisions that will save you time, money, and headaches down the line.

New SonarQube Source Plugin

The new plugin can get a lot of information from your SonarQube instances - ALM integrations, tasks, users, groups, projects, rules, hotspots, issues, and much more. Take a look at the SonarQube Source Plugin documentation. You can gain insights into your data and go through it in any manner you prefer.

Setting Up

Here’s a step-by-step guide on how to configure the SonarQube Source Plugin and use the data collected from your instance.

  1. Obtain your API Key: Start by getting the API Key from the SonarQube platform - follow these instructions
  2. Install CloudQuery CLI: Download and install the CloudQuery CLI on your machine by following steps on our download page.
  3. Set up the Sync Configuration: Create a CloudQuery configuration file by running the following init command. You can use any supported destination, for this example, we will use PostgreSQL:
    cloudquery init --source sonarqube --destination postgresql
  4. Update the Configuration File: Open the generated sonarqube_to_postgres.yaml file in your editor. Replace the placeholders:
    • ${SONARQUBE_BASE_URL} with the base URL to your instance (a local instance would be http://localhost:9000 )
    • ${SONARQUBE_USER_TOKEN} with the token generated in step 1. Also set the auth_mode to token . Or alternatively, use ${SONARQUBE_USER} and ${SONARQUBE_PASSWORD}, and use your credentials, or a dedicated SonarQube user.
    • ${POSTGRESQL_CONNECTION_STRING} with connection string to your PostgreSQL database.
  5. Sync with CloudQuery:
  • Log in using
cloudquery login
  • Run the following command:
cloudquery sync sonarqube_to_postgres.yaml

For more details, refer to the SonarQube Source Plugin documentation.

Querying Synced Data

Let’s explore how to use SQL to query the synced data.

Note that these examples assume the data was synced using the SonarQube to PostgreSQL configuration.

Get Issue count per severity for all your projects

SELECT
project,
impact->>'severity' AS severity,
COUNT(*) AS issue_count
FROM
sonarqube_issues,
JSONB_ARRAY_ELEMENTS(impacts) AS impact
WHERE
issue_status = 'OPEN'
GROUP BY
project,
severity
ORDER BY
project,
severity;

Get user info for all users in a specific SonarQube group

SELECT
u.*
FROM
sonarqube_users u
JOIN
sonarqube_group_memberships gm ON u.id = gm.user_id
JOIN
sonarqube_groups g ON gm.group_id = g.id
WHERE
g.name = 'sonar-users';

Get all issues for a project that require more than 20min of effort

You could possibly use some automation to automatically create Jira tickets for all of these issues (probably it would be a good idea to only do it for high severity issues)

SELECT
i.key,
i.project,
i.message,
i.effort,
i.impacts
FROM
sonarqube_issues i,
JSONB_ARRAY_ELEMENTS(i.impacts) AS impact
WHERE
i.issue_status = 'OPEN'
AND impact->>'severity' = 'HIGH'
AND (
(i.effort LIKE '%h%')
OR
(i.effort LIKE '%d%')
OR
(i.effort LIKE '%min%' AND
CAST(SUBSTRING(i.effort, 1, POSITION('min' IN i.effort) - 1) AS INTEGER) >= 20))
ORDER BY
i.project

With the SonarQube Source Plugin, you can work with you data, fine tune and create new querying to solve your problems or bring your ideas to life. Once you sync the data- you’ll have all of it within your destination of choice, whether it’s PostgreSQL, MySQL, BigQuery, or any other supported destination.

Get Started Today

Want to see CloudQuery in action? Schedule a demo with our team or check out the platform documentation to learn more.

The SonarQube Source Plugin is available now.

Want to see CloudQuery in action? Schedule a demo with our team or check out the platform documentation to learn more.

Got feedback or suggestions? Join the CloudQuery community to connect with other users and experts, or message our team directly here if you have any questions.

Try CloudQuery yourself

Self-hosted, open source, and free to start. Or schedule a demo to see the managed version.

Related posts

CloudQuery News

Introducing CloudQuery Insights: Cloud Intelligence That Connects the Dots

CloudQuery Insights automatically surfaces connected signals across your cloud inventory: security findings, cost data, policy violations, and audit trails.

Joe Karlsson

Joe Karlsson

April 21, 2026

Cloud Infrastructure

CloudQuery News

Introducing the Nautobot Source Integration

Sync Nautobot DCIM inventory data to PostgreSQL, BigQuery, or Snowflake and query it with SQL alongside your cloud provider data.

Joe Karlsson

Joe Karlsson

March 19, 2026

CloudQuery News

CloudQuery Is Merging with Env Zero

A letter from CloudQuery CEO Yevgeny Pats on the merger with env zero and what it means for customers.

Yevgeny Pats

Yevgeny Pats

March 17, 2026

CloudQuery News

Security

Introducing the Zoom Source Integration

New CloudQuery Zoom source plugin: sync Zoom meeting, user, and webinar data into your database for compliance, analytics, and user access governance reporting.

Joe Karlsson

Joe Karlsson

February 2, 2026

CloudQuery News

Product News

New in CloudQuery: Tines + Semgrep integration, and native visualizations,

CloudQuery October 2025 updates: Tines and Semgrep integration for security orchestration, plus native visualization support in the CloudQuery Platform.

Chris Reuter

Chris Reuter

October 31, 2025

CloudQuery News

Product News

Security

Introducing Data Access Control for CloudQuery Platform

CloudQuery Platform RBAC: Control cloud asset access with SQL-based permissions. Map Azure AD/Okta groups to roles. Available now on all environments.

Joe Karlsson

Joe Karlsson

October 28, 2025

AI

CloudQuery News

Understand your cloud infra faster using natural language

CloudQuery unifies AWS, GCP, Azure, and SaaS configs into SQL tables. The new AI assistant lets you query your cloud inventory using natural language.

Chris Reuter

Chris Reuter

September 29, 2025

CloudQuery News

Find the Cloud Waste Contest

Win CloudQuery swag by finding cloud waste in our dataset. Sync AWS data with CloudQuery, solve 3 SQL challenges, get t-shirts, sweatshirts, and mugs.

Joe Karlsson

Joe Karlsson

September 25, 2025

AI

CloudQuery News

Generate CloudQuery Configuration with Natural Language

Generate CloudQuery config files from natural language prompts. Use AI to quickly create source and destination plugin configs without manual YAML editing.

Chris Reuter

Chris Reuter

September 23, 2025

Own your pipeline.
Own your data.