From 949029ca8964e22746be887c964825bed4b0d39e Mon Sep 17 00:00:00 2001 From: Cristhian Amaya Date: Fri, 30 Nov 2018 14:13:18 +0100 Subject: [PATCH] Change redacted behaviour on the line information The line information sometimes contains useful context information so instead of redacting the whole line, this change redacts only the secret --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index d3bbd20d..a311678e 100644 --- a/main.go +++ b/main.go @@ -669,7 +669,7 @@ func addLeak(leaks []Leak, line string, offender string, leakType string, diff g } if opts.Redact { leak.Offender = "REDACTED" - leak.Line = "REDACTED" + leak.Line = strings.Replace(line, offender, "REDACTED", -1) } if opts.Verbose {