markt-de / puppet-sonarqube

Puppet module for Sonarqube
Apache License 2.0
1 stars 20 forks source link

Add support for sonar.search.javaAdditionalOpts #17

Closed hdep closed 2 years ago

hdep commented 2 years ago

Hello,

I'm looking to configured my sonarqube to mitigate the famous log4 vulnerability. For this I need to set an option into sonar.properties according to : https://community.sonarsource.com/t/sonarqube-sonarcloud-and-the-log4j-vulnerability/54721

I do not see in the puppet code a way to provide this option. I tried to use sonar.search.javaOpts which is available in the module, but this breaks sonarqube.

Thank you for your feedback !

fraenki commented 2 years ago

That's currently not easily possible. A new parameter needs to be introduced to allow passing arbitrary additional options to the sonar.properties.epp template.

The $config parameter might be a temporary workaround: https://github.com/markt-de/puppet-sonarqube/blob/master/REFERENCE.md#config However, this replaces the whole sonar.properties.epp template with the contents of this parameter, so you have to build the whole config from scratch (effectively eleminating most of the features of this module).

hdep commented 2 years ago

Hello,

I'll try to propose a PR for managing this parameter.