Skip to content

Commit fd4d2cd

Browse files
committed
Sonar logging issue
1 parent 8f24569 commit fd4d2cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

application/src/main/java/org/togetherjava/tjbot/logging/discord/DiscordLogging.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ private static Optional<URI> parseWebhookUri(String webhookUri) {
6464
}
6565
}
6666

67+
// Security warning about configuring logs. It is safe in this case, the only user input are the
68+
// webhook URIs, which cannot inject anything malicious.
69+
// The only risk is changing the target to an attackers' server, but therefore they need access
70+
// to the config.
71+
@SuppressWarnings("squid:S4792")
6772
private static void addDiscordLogAppender(String name, Filter filter, URI webhookUri,
6873
Configuration logConfig) {
6974
// NOTE The whole setup is done programmatically in order to allow the webhooks

0 commit comments

Comments
 (0)