Skip to content

Commit 6737abd

Browse files
committed
secretsource: do not panic on unknown values but redact them wiht a message
1 parent 32269d0 commit 6737abd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

secretsource/hook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ func recursiveReplace(v any, replacer *strings.Replacer) any {
6464
case time.Duration:
6565
return v
6666
}
67-
// replace this with a log after more testing
68-
panic(fmt.Sprintf("Had a logrus.fields value with type %T, please report that this is unsupported", v))
67+
return fmt.Sprintf("Had a logrus.fields value with type %T, "+
68+
"please report that this is unsupported and will be redacted in all logs in case it containing secrets", v)
6969
}

0 commit comments

Comments
 (0)