Custom detector name (#1400)

* hacky way to add detector name to output

* set name in custom detectors
This commit is contained in:
Zachary Rice 2023-06-20 13:55:31 -05:00 committed by GitHub
parent e9cce62faf
commit 4938d67e66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}