Skip to content

Find, verify, and analyze leaked credentials

Drop tabs for filenames with spaces (#1115)

Bill Richf1582aafa90a
diff --git a/pkg/gitparse/gitparse.go b/pkg/gitparse/gitparse.go
index a4c67f16b..6f1afa0ff 100644
--- a/pkg/gitparse/gitparse.go
+++ b/pkg/gitparse/gitparse.go
@@ -257,7 +257,7 @@ func (c *Parser) fromReader(ctx context.Context, stdOut io.Reader, commitChan ch
case isIndexLine(line):
// NoOp
case isPlusFileLine(line):
- currentDiff.PathB = strings.TrimRight(string(line[6:]), "\n")
+ currentDiff.PathB = strings.TrimRight(strings.TrimRight(string(line[6:]), "\n"), "\t") // Trim the newline and tab characters. https://github.com/trufflesecurity/trufflehog/issues/1060
case isMinusFileLine(line):
// NoOp
case isPlusDiffLine(line):