Skip to content

Commit 00ba5a6

Browse files
Add terminal output for analyze, if detector support it (#3959)
1 parent ca270a7 commit 00ba5a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/output/plain.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ func (p *PlainPrinter) Print(_ context.Context, r *detectors.ResultWithMetadata)
100100
for _, k := range aggregateDataKeys {
101101
printer.Printf("%s: %v\n", cases.Title(language.AmericanEnglish).String(k), aggregateData[k])
102102
}
103+
104+
// if analysis info is not nil, means the detector added key for analyzer and result is verified
105+
if r.Result.AnalysisInfo != nil && r.Result.Verified {
106+
printer.Printf("Analyze: Run `trufflehog analyze` to analyze this key's permissions\n")
107+
}
108+
103109
fmt.Println("")
104110
return nil
105111
}

0 commit comments

Comments
 (0)