In the similar question Sonar-Runner talks to the local database "David RACODON - SonarSource" wrote:
The SonarQube Runner needs to talk to both the database and the web server.
I'm will try to understand why Sonar Runner talks do sonar database, because somebody who use sonar runner will known database user and password and do anything on it, for example change admin password and take control on Sonar instance.
On the other hand, at sonar runner docs (http://docs.sonarqube.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner) I see info:
The SonarQube Runner is recommended as the default launcher to analyze a project with SonarQube.
So, it means that I should give database password to each developer of my team? This is inconsistent. Could somebody explain it?
The connection string consists of the jdbc driver, our server (‘localhost’) and the database JPORA11 on the default port 1521 of Oracle. Then we indicate the Oracle user and his password, to access the ‘sonar’ schema. Et voilà. To run the SonarQube Runner, you just have to launch the ‘sonar-runner.bat’ file located into the ‘..\bin’ directory.
The SonarQube Runner allows us to perform source code analyzes without using tools such as Ant or Maven.
These toos are well known from J2EE (or any other new technology) development teams, but let’s remember that our objective in this serie about the installation of SonarQube, and more generally in our blog, is to allow anyone to perform code quality and applications analyzes, without requiring any knowledge of these new technologies.
SonarQube needs to talk to the database in order to save the results (metrics) of the analysis.
I will not talk about all the different possibilities that you can implement in order to avoid SonarQube's users to know the admin login, but here is the one I use:
This post (on my blog) is 1 year old http://qualilogy.com/en/install-sonarqube-the-sonarqub-jenkins-plugin/) but it will give you an idea.
You already have SonarQube + Runner installed.
Then, when configuring and running an analysis from Jenkins, no need to use any DB login as a parameter.
Hope it helps.
As of version 5.2, this is no longer the case. Now, all DB credentials/connections are managed by Sonar itself, not the runner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With