Skip to content

Commit d7123c6

Browse files
authored
Fix Honeycomb detector with both key formats (#777)
1 parent 65a7855 commit d7123c6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/detectors/honeycomb/honeycomb.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ var (
2020
client = common.SaneHttpClient()
2121

2222
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
23-
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"Honeycomb"}) + `\b([0-9a-zA-Z]{22})\b`)
23+
// Older + Newer API key format. See pull#687 for discussion
24+
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"Honeycomb"}) + `\b([0-9a-f]{32}|[0-9a-zA-Z]{22})\b`)
2425
)
2526

2627
// Keywords are used for efficiently pre-filtering chunks.

0 commit comments

Comments
 (0)