Skip to content

Commit

Permalink
fix: fixed validation logic for calendarific (#3480)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahil9001 authored Oct 28, 2024
1 parent fa9c442 commit c6aa491
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/detectors/calendarific/calendarific.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package calendarific

import (
"context"
regexp "github.com/wasilibs/go-re2"
"net/http"
"strings"

regexp "github.com/wasilibs/go-re2"

"github.com/trufflesecurity/trufflehog/v3/pkg/common"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
Expand All @@ -20,7 +21,7 @@ var (
client = common.SaneHttpClient()

// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"calendarific"}) + `\b([a-z0-9]{40})\b`)
keyPat = regexp.MustCompile(detectors.PrefixRegex([]string{"calendarific"}) + `\b([a-zA-Z0-9]{32})\b`)
)

// Keywords are used for efficiently pre-filtering chunks.
Expand Down

0 comments on commit c6aa491

Please sign in to comment.