Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Make connection issues less jarring (#2730)
Dustin Decker0ce02fc827f5
diff --git a/pkg/detectors/falsepositives.go b/pkg/detectors/falsepositives.goindex 7559cfe1a..856c4ecf7 100644--- a/pkg/detectors/falsepositives.go+++ b/pkg/detectors/falsepositives.go@@ -139,7 +139,6 @@ func FilterKnownFalsePositives(ctx context.Context, results []Result, falsePositswitch result.DetectorType {case detectorspb.DetectorType_CustomRegex:filteredResults = append(filteredResults, result)- breakcase detectorspb.DetectorType_GCP,detectorspb.DetectorType_URI,detectorspb.DetectorType_AzureBatch,@@ -149,7 +148,6 @@ func FilterKnownFalsePositives(ctx context.Context, results []Result, falsePositdetectorspb.DetectorType_MongoDB,detectorspb.DetectorType_JDBC:filteredResults = append(filteredResults, result)- breakdefault:if result.Raw != nil {if !IsKnownFalsePositive(string(result.Raw), falsePositives, wordCheck) {diff --git a/pkg/output/plain.go b/pkg/output/plain.goindex 81afc832f..202e44cc4 100644--- a/pkg/output/plain.go+++ b/pkg/output/plain.go@@ -17,12 +17,11 @@ import ()var (- boldYellowPrinter = color.New(color.Bold, color.FgYellow)- yellowPrinter = color.New(color.FgHiYellow)- greenPrinter = color.New(color.FgHiGreen)- boldGreenPrinter = color.New(color.Bold, color.FgHiGreen)- whitePrinter = color.New(color.FgWhite)- boldWhitePrinter = color.New(color.Bold, color.FgWhite)+ yellowPrinter = color.New(color.FgYellow)+ greenPrinter = color.New(color.FgHiGreen)+ boldGreenPrinter = color.New(color.Bold, color.FgHiGreen)+ whitePrinter = color.New(color.FgWhite)+ boldWhitePrinter = color.New(color.Bold, color.FgWhite))// PlainPrinter is a printer that prints results in plain text format.@@ -49,13 +48,12 @@ func (p *PlainPrinter) Print(_ context.Context, r *detectors.ResultWithMetadata)if out.Verified {boldGreenPrinter.Print("β Found verified result π·π\n")- } else if out.VerificationError != nil {- printer = yellowPrinter- boldYellowPrinter.Print("β οΈ Found result - unable to verify due to error π·πβοΈ\n")- printer.Printf("Verification Error: %s\n", out.VerificationError)} else {printer = whitePrinterboldWhitePrinter.Print("Found unverified result π·πβ\n")+ if out.VerificationError != nil {+ yellowPrinter.Printf("Verification issue: %s\n", out.VerificationError)+ }}printer.Printf("Detector Type: %s\n", out.DetectorType)printer.Printf("Decoder Type: %s\n", out.DecoderType)