Skip to content

Commit 1140f1d

Browse files
Potential fix for code scanning alert no. 395: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent d04edf3 commit 1140f1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/analyzer/analyzer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,13 @@ func sanitizeArguments(args []interface{}) []interface{} {
312312
args[i] = sanitizeMap(v)
313313
case []interface{}:
314314
args[i] = sanitizeArguments(v)
315+
case plan.AuthenticationMysqlNativePassword:
316+
args[i] = "[PASSWORD_REDACTED]"
315317
default:
316318
if reflect.TypeOf(arg).Kind() == reflect.Struct {
317319
args[i] = "[STRUCT_REDACTED]"
320+
} else {
321+
args[i] = "[REDACTED]"
318322
}
319323
}
320324
}

0 commit comments

Comments
 (0)