Question about Sonarqube's AI Features AI Code Assurance and AI CodeFix

  • Sonarqube 2025.1.1 LTA deployed via zip.
  • what are you trying to achieve- wanted to understand the AI Features of Sonarqube.

I have a couple of questions regarding the AI features in SonarQube:

  1. Could you please confirm whether the AI features are cloud-based or self-hosted? If they are self-hosted, can you assure that no data is shared externally?

  2. Who will have access to the data ingested and the output generated by the AI? Is this data visible within SonarQube’s UI, and do SonarSource or any third-party applications have access to it?

Thank you for your assistance.

Hi,

The docs should get you started. Note that you have the ability to use a self-hosted LLM for the AI CodeFix, and

When you select a self-hosted LLM, your code stays within your network. However, Sonar’s AI CodeFix service needs to send the latest prompts and supported rule descriptions therefore, your instance of SonarQube server will still need internet connectivity.

If you use Sonar’s AI CodeFix LLM, the affected code snippet will be sent by the AI CodeFix service to the selected LLM. Service agreements with Sonar’s LLMs prevent your code from being used to train those models.

 
HTH,
Ann

Hi G Ann, am I correct in my understanding about this:

When you select a self-hosted LLM, your code stays within your network. However, Sonar’s AI CodeFix service needs to send the latest prompts and supported rule descriptions therefore, your instance of SonarQube server will still need internet connectivity.

If you use Sonar’s AI CodeFix LLM, the affected code snippet will be sent by the AI CodeFix service to the selected LLM. Service agreements with Sonar’s LLMs prevent your code from being used to train those models.

With a self-hosted LLM, code stays inside your network, but SonarQube still needs internet access for updates (not for sending code). The update is like knowing if there’s a new Sonarqube version?

With Sonar’s AI CodeFix cloud LLM, code snippets are sent to Sonar’s servers, but not used for training or stored long-term.

Hi,

In the context of LLMs, it’s not about knowing there’s a new SonarQube version (altho that’s good to know :smiley: ). Again:

To be clear, we get lots of feedback, every day. We’re continually improving things, whether it’s rule descriptions, prompts, or the code itself. So that network connection is to get the best, most up-to-date data to send to your LLM.

Correct.

 
HTH,
Ann

Hey - Im particularly interested in this part too.

So that network connection is to get the best, most up-to-date data to send to your LLM.

So in this case, Sonar’s externally hosted service will be sending data to my LLM, but my prompts and and rule descriptions are not going to Sonar’s AI Service?

Hi @mayneframe,

I can only refer you to the docs (again):

When you select a self-hosted LLM, your code stays within your network. However, Sonar’s AI CodeFix service needs to send the latest prompts and supported rule descriptions therefore, your instance of SonarQube server will still need internet connectivity.

If you use Sonar’s AI CodeFix LLM, the affected code snippet will be sent by the AI CodeFix service to the selected LLM. Service agreements with Sonar’s LLMs prevent your code from being used to train those models.

 
HTH,
Ann

Hey Ann, thanks - ive read this a few times

Really what im looking for is, do we send anything to Sonars AI Codefix Service, or are we basically just pulling data?

Security just need to know which way data is flowing, and so i just need to know, if we are sending anything out, thats all

N

Hi N,

I’m not sure I can be much more clear than the docs:

 
HTH,
Ann

Hey Ann,

Thanks; i just need clarity of the sending of the prompts.

Is this Sonar sending us the prompts or us sending sonar the prompts.

I fully understand code won’t leave; it just that one section.

N

Hi,

Prompts are what gets sent to an LLM. If you own the LLM, then the prompts get sent to your LLM. But what prompt to use? For that you query us to get the most up-to-date, correct version.

 
HTH,
Ann

Hey Ann,

That’s perfect, so if we self host the LLM, the Sonar is sending us the latest Rules and Prompts, and so nothing leaves our system.

N