Harold Reese
Harold Reese

Reputation: 1

What is the Sonarqube dotnet SONAR_SCANNER_OPTS equivalent?

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?

Upvotes: 0

Views: 1801

Answers (1)

Harold Reese
Harold Reese

Reputation: 1

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"

Upvotes: 0

Related Questions