Skip to content

Find, verify, and analyze leaked credentials

chore: added github action custom detector name (#3417)

Sahil Silare3547a6efe162
diff --git a/pkg/output/github_actions.go b/pkg/output/github_actions.go
index f9457e68c..878a2de72 100644
--- a/pkg/output/github_actions.go
+++ b/pkg/output/github_actions.go
@@ -60,9 +60,14 @@ func (p *GitHubActionsPrinter) Print(_ context.Context, r *detectors.ResultWithM
}
dedupeCache[key] = struct{}{}
- message := fmt.Sprintf("Found %s %s result πŸ·πŸ”‘\n", verifiedStatus, out.DetectorType)
+ name := ""
+ if nameValue, ok := r.Result.ExtraData["name"]; ok {
+ name = fmt.Sprintf(" (%s)", nameValue)
+ }
+
+ message := fmt.Sprintf("Found %s %s%s result πŸ·πŸ”‘\n", verifiedStatus, out.DetectorType, name)
if r.DecoderType != detectorspb.DecoderType_PLAIN {
- message = fmt.Sprintf("Found %s %s result with %s encoding πŸ·πŸ”‘\n", verifiedStatus, out.DetectorType, out.DecoderType)
+ message = fmt.Sprintf("Found %s %s%s result with %s encoding πŸ·πŸ”‘\n", verifiedStatus, out.DetectorType, name, out.DecoderType)
}
fmt.Printf("::warning file=%s,line=%d,endLine=%d::%s",