mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 13:34:23 +01:00
Make config generation utils public (#1480)
* chore(generate): make utils public * chore(generate): change validate log messages * chore(generate): split functions into files * chore(config): add warning for public funcs
This commit is contained in:
1 parent
3be7faa1ff
commit
bd81872eee
114 files changed
+862
-713
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package rules
|
||||
|
||||
import (
|
||||
"github.com/zricethezav/gitleaks/v8/cmd/generate/config/utils"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
@@ -19,7 +20,7 @@ func Snyk() *config.Rule {
|
||||
Description: "Uncovered a Snyk API token, potentially compromising software vulnerability scanning and code security.",
|
||||
RuleID: "snyk-api-token",
|
||||
|
||||
Regex: generateSemiGenericRegex(keywords, hex8_4_4_4_12(), true),
|
||||
Regex: utils.GenerateSemiGenericRegex(keywords, utils.Hex8_4_4_4_12(), true),
|
||||
Keywords: keywords,
|
||||
}
|
||||
|
||||
@@ -35,5 +36,5 @@ func Snyk() *config.Rule {
|
||||
`SNYK_API_TOKEN = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
||||
`SNYK_OAUTH_TOKEN = "12345678-ABCD-ABCD-ABCD-1234567890AB"`, // gitleaks:allow
|
||||
}
|
||||
return validate(r, tps, nil)
|
||||
return utils.Validate(r, tps, nil)
|
||||
}
|
||||
Reference in new issue
Block a user