import java.util.Map;
import java.util.Properties;
import java.util.TreeSet;
+import org.sonar.api.CoreProperties;
import org.sonar.api.batch.AnalysisMode;
import org.sonar.api.batch.BatchSide;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
}
private static boolean sensitive(String key) {
- return key.contains(".password") || key.contains(".secured");
+ return key.equals(CoreProperties.LOGIN) || key.contains(".password") || key.contains(".secured");
}
}
publisher.dumpModuleSettings(ProjectDefinition.create()
.setProperty("sonar.projectKey", "foo")
.setProperty("sonar.projectKey", "foo")
+ .setProperty("sonar.login", "my_token")
.setProperty("sonar.password", "azerty")
.setProperty("sonar.cpp.license.secured", "AZERTY"));
assertThat(FileUtils.readFileToString(writer.getFileStructure().analysisLog())).containsSequence(
"sonar.cpp.license.secured=******",
+ "sonar.login=******",
"sonar.password=******",
"sonar.projectKey=foo");
}