0

We have the following scenario: scan two projects in Windows 10 using sonarqube.

  1. Project to be scanned with sonar scanner cli (Java version)
  2. Project to be scanned with sonar scanner dotnet (dotnet global tool version)

The sonarqube server is secured, which means we must use the proper certificates (.pfx/.pkcs12).

In the cli version (Java), the setup is pretty straight forward, simply set the environment variable :

SONAR_SCANNER_OPTS = -Djavax.net.ssl.keyStore=cert.pfx -Djavax.net.ssl.keyStorePassword=mypass

However, in the dotnet version, this doesn't work. How can we set up certificates to be used with the sonarscanner dotnet global tool?

Thanks in advance.

1 Answers1

0

Found it on the source code. Just pass this parameters

  • sonar.clientcert.path
  • sonar.clientcert.password
... /d:sonar.clientcert.path="CERTPATH" /d:sonar.clientcert.password="CERTPASS"