Skip to content

Commit

Permalink
hit em w/ a min (#3316)
Browse files Browse the repository at this point in the history
  • Loading branch information
zricethezav committed Sep 23, 2024
1 parent 6c7c1ae commit b78be6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/detectors/openai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
for token := range uniqueMatches {
s1 := detectors.Result{
DetectorType: detectorspb.DetectorType_OpenAI,
Redacted: token[:3] + "..." + token[47:],
Redacted: token[:3] + "..." + token[min(len(token)-1, 47):],
Raw: []byte(token),
}

Expand Down

0 comments on commit b78be6d

Please sign in to comment.