diff options
author | Claire Villard <claire.villard@sonarsource.com> | 2024-12-18 15:57:28 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-12-19 20:03:04 +0000 |
commit | df62520f58574f1737d8a0761c8a724235a0aaee (patch) | |
tree | d7c0890fd63d061b55749f3abc4917c881799406 /sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap | |
parent | 5bb7879366bffed259b4278d7d004feb175050cc (diff) | |
download | sonarqube-df62520f58574f1737d8a0761c8a724235a0aaee.tar.gz sonarqube-df62520f58574f1737d8a0761c8a724235a0aaee.zip |
SONAR-23968 Log a warning when encrypted properties are used on Scanner side
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java index 85b0fcd41bd..a766101f54a 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/bootstrap/ScannerProperties.java @@ -23,6 +23,8 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.annotation.concurrent.Immutable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.sonar.api.config.internal.Encryption; import static org.sonar.api.CoreProperties.ENCRYPTION_SECRET_KEY_PATH; @@ -33,6 +35,7 @@ import static org.sonar.api.CoreProperties.PROJECT_KEY_PROPERTY; */ @Immutable public class ScannerProperties { + private static final Logger LOG = LoggerFactory.getLogger(ScannerProperties.class); private final Map<String, String> properties; private final Encryption encryption; @@ -43,6 +46,7 @@ public class ScannerProperties { for (Map.Entry<String, String> entry : properties.entrySet()) { String value = entry.getValue(); if (value != null && encryption.isEncrypted(value)) { + LOG.warn("Property '{}' is encrypted. The encryption of scanner properties is deprecated and will soon be removed.", entry.getKey()); try { value = encryption.decrypt(value); } catch (Exception e) { |