mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Make connection issues less jarring (#2730)
* Make connection issues less jarring * lint * fix lint issue * print just the connection issue in yellow * update terminology
This commit is contained in:
parent
f03aa38726
commit
0ce02fc827
2 changed files with 8 additions and 12 deletions
|
@ -139,7 +139,6 @@ func FilterKnownFalsePositives(ctx context.Context, results []Result, falsePosit
|
|||
switch result.DetectorType {
|
||||
case detectorspb.DetectorType_CustomRegex:
|
||||
filteredResults = append(filteredResults, result)
|
||||
break
|
||||
case detectorspb.DetectorType_GCP,
|
||||
detectorspb.DetectorType_URI,
|
||||
detectorspb.DetectorType_AzureBatch,
|
||||
|
@ -149,7 +148,6 @@ func FilterKnownFalsePositives(ctx context.Context, results []Result, falsePosit
|
|||
detectorspb.DetectorType_MongoDB,
|
||||
detectorspb.DetectorType_JDBC:
|
||||
filteredResults = append(filteredResults, result)
|
||||
break
|
||||
default:
|
||||
if result.Raw != nil {
|
||||
if !IsKnownFalsePositive(string(result.Raw), falsePositives, wordCheck) {
|
||||
|
|
|
@ -17,8 +17,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
boldYellowPrinter = color.New(color.Bold, color.FgYellow)
|
||||
yellowPrinter = color.New(color.FgHiYellow)
|
||||
yellowPrinter = color.New(color.FgYellow)
|
||||
greenPrinter = color.New(color.FgHiGreen)
|
||||
boldGreenPrinter = color.New(color.Bold, color.FgHiGreen)
|
||||
whitePrinter = color.New(color.FgWhite)
|
||||
|
@ -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 = whitePrinter
|
||||
boldWhitePrinter.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)
|
||||
|
|
Loading…
Reference in a new issue