Skip to content

Find, verify, and analyze leaked credentials

Ignore errors from CustomRegex so the channel doesn't leak (#1149)

Miccah0fe9bf08681e
diff --git a/pkg/custom_detectors/custom_detectors.go b/pkg/custom_detectors/custom_detectors.go
index ba1962639..265b2d4fc 100644
--- a/pkg/custom_detectors/custom_detectors.go
+++ b/pkg/custom_detectors/custom_detectors.go
@@ -94,9 +94,8 @@ func (c *customRegexWebhook) FromData(ctx context.Context, verify bool, data []b
})
}
- if err := g.Wait(); err != nil {
- return nil, err
- }
+ // Ignore any errors and collect as many of the results as we can.
+ _ = g.Wait()
close(resultsCh)
for result := range resultsCh {