mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 04:34:46 +01:00
feat(generate): generate global (#1546)
This commit is contained in:
1 parent
f6e549901c
commit
82d737d851
6 files changed
+361
-499
No files matched your search
@@ -6,6 +6,7 @@ package utils
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/base"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
"github.com/zricethezav/gitleaks/v8/detect"
|
||||
"strings"
|
||||
@@ -82,8 +83,8 @@ func createSingleRuleDetector(r *config.Rule) *detect.Detector {
|
||||
rules := map[string]config.Rule{
|
||||
r.RuleID: *r,
|
||||
}
|
||||
return detect.NewDetector(config.Config{
|
||||
Rules: rules,
|
||||
Keywords: uniqueKeywords,
|
||||
})
|
||||
cfg := base.CreateGlobalConfig()
|
||||
cfg.Rules = rules
|
||||
cfg.Keywords = uniqueKeywords
|
||||
return detect.NewDetector(cfg)
|
||||
}
|
||||
Reference in new issue
Block a user