Skip to content

Commit

Permalink
Custom detector name (trufflesecurity#1400)
Browse files Browse the repository at this point in the history
* hacky way to add detector name to output

* set name in custom detectors
  • Loading branch information
zricethezav authored Jun 20, 2023
1 parent e9cce62 commit 4938d67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/custom_detectors/custom_detectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func (c *customRegexWebhook) FromData(ctx context.Context, verify bool, data []b
close(resultsCh)

for result := range resultsCh {
// NOTE: I don't believe this is being set anywhere else, hence the map assignment.
result.ExtraData = map[string]string{
"name": c.GetName(),
}
results = append(results, result)
}

Expand Down

0 comments on commit 4938d67

Please sign in to comment.