Skip to content

Find, verify, and analyze leaked credentials

update regex (#2184)

ahravf772fd8b44d8
diff --git a/pkg/detectors/huggingface/huggingface.go b/pkg/detectors/huggingface/huggingface.go
index a464e0098..1d463e6f5 100644
--- a/pkg/detectors/huggingface/huggingface.go
+++ b/pkg/detectors/huggingface/huggingface.go
@@ -22,7 +22,7 @@ var _ detectors.Detector = (*Scanner)(nil)
var (
defaultClient = common.SaneHttpClient()
// Make sure that your group is surrounded in boundary characters such as below to reduce false positives.
- keyPat = regexp.MustCompile(`\bhf_[a-zA-Z]{34}\b`)
+ keyPat = regexp.MustCompile(`\bhf_[a-zA-Z0-9]{34}\b`)
)
// Keywords are used for efficiently pre-filtering chunks.